mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 14:50:14 -05:00
Revert "Fixed issue 858: Added option to choose which side the widgets in message list will be on"
This reverts commit b334e397431225280f30e5297f73392f331f2dc3.
This commit is contained in:
parent
dc61614443
commit
6fdf69d45b
@ -13,7 +13,7 @@
|
|||||||
android:layout_height="20dip"
|
android:layout_height="20dip"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_alignParentLeft="true" />
|
android:layout_alignParentLeft="true" />
|
||||||
<include layout="@layout/message_list_widgets_right" android:id="@+id/widgets" />
|
<include layout="@layout/message_list_widgets" android:id="@+id/widgets" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/date"
|
android:id="@+id/date"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
@ -22,8 +22,7 @@
|
|||||||
android:layout_width="70dip"
|
android:layout_width="70dip"
|
||||||
android:paddingRight="3dip"
|
android:paddingRight="3dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right"
|
android:gravity="right|bottom"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignWithParentIfMissing="true"
|
android:layout_alignWithParentIfMissing="true"
|
||||||
android:layout_toLeftOf="@+id/widgets" />
|
android:layout_toLeftOf="@+id/widgets" />
|
||||||
<TextView
|
<TextView
|
||||||
@ -32,7 +31,6 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:layout_width="110dip"
|
android:layout_width="110dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:paddingLeft="3dip"
|
android:paddingLeft="3dip"
|
||||||
@ -46,7 +44,6 @@
|
|||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:paddingLeft="10dip"
|
android:paddingLeft="10dip"
|
||||||
android:layout_marginRight="1dip"
|
android:layout_marginRight="1dip"
|
||||||
android:layout_alignWithParentIfMissing="true"
|
android:layout_alignWithParentIfMissing="true"
|
@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingRight="1dip"
|
|
||||||
android:paddingTop="2dip"
|
|
||||||
android:background="@drawable/message_list_item_background">
|
|
||||||
<View
|
|
||||||
android:id="@+id/chip"
|
|
||||||
android:background="@drawable/appointment_indicator_leftside_1"
|
|
||||||
android:layout_width="4dip"
|
|
||||||
android:layout_height="20dip"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentLeft="true" />
|
|
||||||
<include
|
|
||||||
layout="@layout/message_list_widgets_left"
|
|
||||||
android:id="@+id/widgets"
|
|
||||||
android:layout_toRightOf="@+id/chip" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subject"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="5dip"
|
|
||||||
android:paddingRight="3dip"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignWithParentIfMissing="true"
|
|
||||||
android:layout_toRightOf="@+id/widgets"
|
|
||||||
android:layout_toLeftOf="@+id/from"/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/from"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_width="110dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingRight="3dip"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:layout_toLeftOf="@+id/date" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/date"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:layout_width="70dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="right"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentRight="true" />
|
|
||||||
</RelativeLayout>
|
|
@ -13,7 +13,7 @@
|
|||||||
android:layout_width="4dip"
|
android:layout_width="4dip"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_centerVertical="true" />
|
android:layout_centerVertical="true" />
|
||||||
<include layout="@layout/message_list_widgets_right" android:id="@+id/widgets" />
|
<include layout="@layout/message_list_widgets" android:id="@+id/widgets" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subject"
|
android:id="@+id/subject"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
@ -1,54 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="38dip"
|
|
||||||
android:paddingRight="1dip"
|
|
||||||
android:paddingTop="2dip"
|
|
||||||
android:background="#999999"
|
|
||||||
>
|
|
||||||
<View
|
|
||||||
android:id="@+id/chip"
|
|
||||||
android:background="@drawable/appointment_indicator_leftside_1"
|
|
||||||
android:layout_width="4dip"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentLeft="true"/>
|
|
||||||
<include
|
|
||||||
layout="@layout/message_list_widgets_left"
|
|
||||||
android:id="@+id/widgets"
|
|
||||||
android:layout_toRightOf="@+id/chip" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subject"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="5dip"
|
|
||||||
android:layout_toRightOf="@+id/widgets" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/from"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="5dip"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_toRightOf="@+id/widgets" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/date"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:gravity="right|bottom"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_toRightOf="@+id/from"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
</RelativeLayout>
|
|
@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dip"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:paddingLeft="5dip"
|
|
||||||
>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/flagged"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:focusable="false"
|
|
||||||
style="?android:attr/starStyle"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
/>
|
|
||||||
<!-- http://stackoverflow.com/questions/1121192/android-custom-listview-unable-to-click-on-items
|
|
||||||
we want something a bit bigger than it is right now -->
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/selected_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:focusable="false"
|
|
||||||
android:button="@drawable/checkbox"
|
|
||||||
android:background="@drawable/checkbox_background"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
@ -212,15 +212,5 @@
|
|||||||
<item>@string/date_format_common</item>
|
<item>@string/date_format_common</item>
|
||||||
<item>@string/date_format_iso8601</item>
|
<item>@string/date_format_iso8601</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="message_list_widget_side_entries">
|
|
||||||
<item>@string/message_list_widget_left_side</item>
|
|
||||||
<item>@string/message_list_widget_right_side</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="message_list_widget_side_values">
|
|
||||||
<item>LEFT</item>
|
|
||||||
<item>RIGHT</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -571,9 +571,6 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
|||||||
<string name="date_format_medium">MEDIUM</string>
|
<string name="date_format_medium">MEDIUM</string>
|
||||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||||
<string name="date_format_iso8601">yyyy-MM-dd</string>
|
<string name="date_format_iso8601">yyyy-MM-dd</string>
|
||||||
|
|
||||||
<string name="message_list_widget_side_label">Message list's widget side</string>
|
|
||||||
<string name="message_list_widget_left_side">Left</string>
|
|
||||||
<string name="message_list_widget_right_side">Right</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -25,20 +25,12 @@
|
|||||||
android:entryValues="@array/settings_theme_values"
|
android:entryValues="@array/settings_theme_values"
|
||||||
android:dialogTitle="@string/settings_theme_label" />
|
android:dialogTitle="@string/settings_theme_label" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="dateFormat"
|
android:key="dateFormat"
|
||||||
android:title="@string/date_format_label"
|
android:title="@string/date_format_label"
|
||||||
android:entries="@array/date_formats"
|
android:entries="@array/date_formats"
|
||||||
android:entryValues="@array/date_formats"
|
android:entryValues="@array/date_formats"
|
||||||
android:dialogTitle="@string/date_format_label" />
|
android:dialogTitle="@string/date_format_label" />
|
||||||
|
|
||||||
<ListPreference
|
|
||||||
android:key="messageListWidgetSide"
|
|
||||||
android:title="@string/message_list_widget_side_label"
|
|
||||||
android:entries="@array/message_list_widget_side_entries"
|
|
||||||
android:entryValues="@array/message_list_widget_side_values"
|
|
||||||
android:dialogTitle="@string/message_list_widget_side_label" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/operational_preferences" android:key="operational_preferences">
|
<PreferenceCategory android:title="@string/operational_preferences" android:key="operational_preferences">
|
||||||
|
@ -33,13 +33,6 @@ public class Email extends Application
|
|||||||
|
|
||||||
private static int theme = android.R.style.Theme_Light;
|
private static int theme = android.R.style.Theme_Light;
|
||||||
|
|
||||||
public enum MessageListWidgetSide
|
|
||||||
{
|
|
||||||
LEFT, RIGHT
|
|
||||||
}
|
|
||||||
|
|
||||||
private static MessageListWidgetSide messageListWidgetSide = MessageListWidgetSide.RIGHT;
|
|
||||||
|
|
||||||
private static BACKGROUND_OPS backgroundOps = BACKGROUND_OPS.WHEN_CHECKED;
|
private static BACKGROUND_OPS backgroundOps = BACKGROUND_OPS.WHEN_CHECKED;
|
||||||
/**
|
/**
|
||||||
* Some log messages can be sent to a file, so that the logs
|
* Some log messages can be sent to a file, so that the logs
|
||||||
@ -476,7 +469,6 @@ public class Email extends Application
|
|||||||
editor.putBoolean("enableSensitiveLogging", Email.DEBUG_SENSITIVE);
|
editor.putBoolean("enableSensitiveLogging", Email.DEBUG_SENSITIVE);
|
||||||
editor.putString("backgroundOperations", Email.backgroundOps.toString());
|
editor.putString("backgroundOperations", Email.backgroundOps.toString());
|
||||||
editor.putInt("theme", theme);
|
editor.putInt("theme", theme);
|
||||||
editor.putString("messageListWidgetSide", messageListWidgetSide.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -499,7 +491,6 @@ public class Email extends Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
Email.setK9Theme(sprefs.getInt("theme", android.R.style.Theme_Light));
|
Email.setK9Theme(sprefs.getInt("theme", android.R.style.Theme_Light));
|
||||||
Email.setMessageListWidgetSide(MessageListWidgetSide.valueOf(sprefs.getString("messageListWidgetSide", MessageListWidgetSide.RIGHT.toString())));
|
|
||||||
MessagingController.getInstance(this).resetVisibleLimits(prefs.getAccounts());
|
MessagingController.getInstance(this).resetVisibleLimits(prefs.getAccounts());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -568,16 +559,6 @@ public class Email extends Application
|
|||||||
{
|
{
|
||||||
Email.backgroundOps = BACKGROUND_OPS.valueOf(nbackgroundOps);
|
Email.backgroundOps = BACKGROUND_OPS.valueOf(nbackgroundOps);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MessageListWidgetSide getMessageListWidgetSide()
|
|
||||||
{
|
|
||||||
return Email.messageListWidgetSide;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setMessageListWidgetSide(MessageListWidgetSide messageListWidgetSide)
|
|
||||||
{
|
|
||||||
Email.messageListWidgetSide = messageListWidgetSide;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1745,28 +1745,14 @@ public class MessageList
|
|||||||
MessageInfoHolder message = (MessageInfoHolder) getItem(position);
|
MessageInfoHolder message = (MessageInfoHolder) getItem(position);
|
||||||
View view;
|
View view;
|
||||||
|
|
||||||
if ((convertView != null)
|
if ((convertView != null) && (convertView.getId() == R.layout.message_list_item))
|
||||||
&& (
|
|
||||||
(convertView.getId() == R.layout.message_list_item_left)
|
|
||||||
|| (convertView.getId() == R.layout.message_list_item_right)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
view = convertView;
|
view = convertView;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int layoutId;
|
view = mInflater.inflate(R.layout.message_list_item, parent, false);
|
||||||
if (Email.getMessageListWidgetSide()==Email.MessageListWidgetSide.LEFT)
|
view.setId(R.layout.message_list_item);
|
||||||
{
|
|
||||||
layoutId = R.layout.message_list_item_left;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
layoutId = R.layout.message_list_item_right;
|
|
||||||
}
|
|
||||||
view = mInflater.inflate(layoutId, parent, false);
|
|
||||||
view.setId(layoutId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ import android.preference.Preference;
|
|||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
import com.android.email.Email;
|
import com.android.email.Email;
|
||||||
import com.android.email.Email.MessageListWidgetSide;
|
|
||||||
import com.android.email.K9PreferenceActivity;
|
import com.android.email.K9PreferenceActivity;
|
||||||
import com.android.email.Preferences;
|
import com.android.email.Preferences;
|
||||||
import com.android.email.R;
|
import com.android.email.R;
|
||||||
@ -23,14 +22,12 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
|
|
||||||
private static final String PREFERENCE_THEME = "theme";
|
private static final String PREFERENCE_THEME = "theme";
|
||||||
private static final String PREFERENCE_DATE_FORMAT = "dateFormat";
|
private static final String PREFERENCE_DATE_FORMAT = "dateFormat";
|
||||||
private static final String PREFERENCE_MESSAGE_LIST_WIDGET_SIDE = "messageListWidgetSide";
|
|
||||||
private static final String PREFERENCE_BACKGROUND_OPS = "background_ops";
|
private static final String PREFERENCE_BACKGROUND_OPS = "background_ops";
|
||||||
private static final String PREFERENCE_DEBUG_LOGGING = "debug_logging";
|
private static final String PREFERENCE_DEBUG_LOGGING = "debug_logging";
|
||||||
private static final String PREFERENCE_SENSITIVE_LOGGING = "sensitive_logging";
|
private static final String PREFERENCE_SENSITIVE_LOGGING = "sensitive_logging";
|
||||||
|
|
||||||
private ListPreference mTheme;
|
private ListPreference mTheme;
|
||||||
private ListPreference mDateFormat;
|
private ListPreference mDateFormat;
|
||||||
private ListPreference mMessageListWidgetSide;
|
|
||||||
private ListPreference mBackgroundOps;
|
private ListPreference mBackgroundOps;
|
||||||
private CheckBoxPreference mDebugLogging;
|
private CheckBoxPreference mDebugLogging;
|
||||||
private CheckBoxPreference mSensitiveLogging;
|
private CheckBoxPreference mSensitiveLogging;
|
||||||
@ -94,21 +91,6 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mMessageListWidgetSide = (ListPreference) findPreference(PREFERENCE_MESSAGE_LIST_WIDGET_SIDE);
|
|
||||||
mMessageListWidgetSide.setValue(Email.getMessageListWidgetSide().toString());
|
|
||||||
mMessageListWidgetSide.setSummary(mMessageListWidgetSide.getEntry());
|
|
||||||
mMessageListWidgetSide.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
|
|
||||||
{
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue)
|
|
||||||
{
|
|
||||||
final String summary = newValue.toString();
|
|
||||||
int index = mMessageListWidgetSide.findIndexOfValue(summary);
|
|
||||||
mMessageListWidgetSide.setSummary(mMessageListWidgetSide.getEntries()[index]);
|
|
||||||
mMessageListWidgetSide.setValue(summary);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mBackgroundOps = (ListPreference) findPreference(PREFERENCE_BACKGROUND_OPS);
|
mBackgroundOps = (ListPreference) findPreference(PREFERENCE_BACKGROUND_OPS);
|
||||||
initBackgroundOps = Email.getBackgroundOps().toString();
|
initBackgroundOps = Email.getBackgroundOps().toString();
|
||||||
mBackgroundOps.setValue(initBackgroundOps);
|
mBackgroundOps.setValue(initBackgroundOps);
|
||||||
@ -143,7 +125,6 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
{
|
{
|
||||||
SharedPreferences preferences = Preferences.getPreferences(this).getPreferences();
|
SharedPreferences preferences = Preferences.getPreferences(this).getPreferences();
|
||||||
Email.setK9Theme(mTheme.getValue().equals("dark") ? android.R.style.Theme : android.R.style.Theme_Light);
|
Email.setK9Theme(mTheme.getValue().equals("dark") ? android.R.style.Theme : android.R.style.Theme_Light);
|
||||||
Email.setMessageListWidgetSide(MessageListWidgetSide.valueOf(mMessageListWidgetSide.getValue()));
|
|
||||||
Email.DEBUG = mDebugLogging.isChecked();
|
Email.DEBUG = mDebugLogging.isChecked();
|
||||||
Email.DEBUG_SENSITIVE = mSensitiveLogging.isChecked();
|
Email.DEBUG_SENSITIVE = mSensitiveLogging.isChecked();
|
||||||
String newBackgroundOps = mBackgroundOps.getValue();
|
String newBackgroundOps = mBackgroundOps.getValue();
|
||||||
|
Loading…
Reference in New Issue
Block a user