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
12 changed files with 9 additions and 222 deletions
|
@ -13,7 +13,7 @@
|
|||
android:layout_height="20dip"
|
||||
android:layout_centerVertical="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
|
||||
android:id="@+id/date"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
|
@ -22,8 +22,7 @@
|
|||
android:layout_width="70dip"
|
||||
android:paddingRight="3dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="right|bottom"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_toLeftOf="@+id/widgets" />
|
||||
<TextView
|
||||
|
@ -32,7 +31,6 @@
|
|||
android:singleLine="true"
|
||||
android:layout_width="110dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingLeft="3dip"
|
||||
|
@ -46,7 +44,6 @@
|
|||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="10dip"
|
||||
android:layout_marginRight="1dip"
|
||||
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_height="fill_parent"
|
||||
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
|
||||
android:id="@+id/subject"
|
||||
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_iso8601</item>
|
||||
</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>
|
||||
|
|
|
@ -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_common">dd-MMM-yyyy</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>
|
||||
|
|
|
@ -25,20 +25,12 @@
|
|||
android:entryValues="@array/settings_theme_values"
|
||||
android:dialogTitle="@string/settings_theme_label" />
|
||||
|
||||
<ListPreference
|
||||
<ListPreference
|
||||
android:key="dateFormat"
|
||||
android:title="@string/date_format_label"
|
||||
android:entries="@array/date_formats"
|
||||
android:entryValues="@array/date_formats"
|
||||
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 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;
|
||||
|
||||
public enum MessageListWidgetSide
|
||||
{
|
||||
LEFT, RIGHT
|
||||
}
|
||||
|
||||
private static MessageListWidgetSide messageListWidgetSide = MessageListWidgetSide.RIGHT;
|
||||
|
||||
private static BACKGROUND_OPS backgroundOps = BACKGROUND_OPS.WHEN_CHECKED;
|
||||
/**
|
||||
* 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.putString("backgroundOperations", Email.backgroundOps.toString());
|
||||
editor.putInt("theme", theme);
|
||||
editor.putString("messageListWidgetSide", messageListWidgetSide.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -499,7 +491,6 @@ public class Email extends Application
|
|||
}
|
||||
|
||||
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());
|
||||
|
||||
/*
|
||||
|
@ -568,16 +559,6 @@ public class Email extends Application
|
|||
{
|
||||
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);
|
||||
View view;
|
||||
|
||||
if ((convertView != null)
|
||||
&& (
|
||||
(convertView.getId() == R.layout.message_list_item_left)
|
||||
|| (convertView.getId() == R.layout.message_list_item_right)
|
||||
)
|
||||
)
|
||||
if ((convertView != null) && (convertView.getId() == R.layout.message_list_item))
|
||||
{
|
||||
view = convertView;
|
||||
}
|
||||
else
|
||||
{
|
||||
int layoutId;
|
||||
if (Email.getMessageListWidgetSide()==Email.MessageListWidgetSide.LEFT)
|
||||
{
|
||||
layoutId = R.layout.message_list_item_left;
|
||||
}
|
||||
else
|
||||
{
|
||||
layoutId = R.layout.message_list_item_right;
|
||||
}
|
||||
view = mInflater.inflate(layoutId, parent, false);
|
||||
view.setId(layoutId);
|
||||
view = mInflater.inflate(R.layout.message_list_item, parent, false);
|
||||
view.setId(R.layout.message_list_item);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.preference.Preference;
|
|||
import android.view.KeyEvent;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.Email.MessageListWidgetSide;
|
||||
import com.android.email.K9PreferenceActivity;
|
||||
import com.android.email.Preferences;
|
||||
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_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_DEBUG_LOGGING = "debug_logging";
|
||||
private static final String PREFERENCE_SENSITIVE_LOGGING = "sensitive_logging";
|
||||
|
||||
private ListPreference mTheme;
|
||||
private ListPreference mDateFormat;
|
||||
private ListPreference mMessageListWidgetSide;
|
||||
private ListPreference mBackgroundOps;
|
||||
private CheckBoxPreference mDebugLogging;
|
||||
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);
|
||||
initBackgroundOps = Email.getBackgroundOps().toString();
|
||||
mBackgroundOps.setValue(initBackgroundOps);
|
||||
|
@ -143,7 +125,6 @@ public class Prefs extends K9PreferenceActivity
|
|||
{
|
||||
SharedPreferences preferences = Preferences.getPreferences(this).getPreferences();
|
||||
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_SENSITIVE = mSensitiveLogging.isChecked();
|
||||
String newBackgroundOps = mBackgroundOps.getValue();
|
||||
|
|
Loading…
Reference in a new issue