From ee234b65f8a9f9c1c6dbceef74a7f8bfca41457e Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 16 Aug 2013 02:17:26 -0400 Subject: [PATCH] Return to old style chips for accounts, folders and messages. My circle design stopped being even a little bit useful when we stopped showing the "complex" versions of the shapes --- res/layout/accounts_item.xml | 128 ++++----- res/layout/folder_list_item.xml | 74 +++-- res/layout/message_list_item.xml | 254 ++++++++++-------- res/layout/message_view_header.xml | 2 +- src/com/fsck/k9/activity/Accounts.java | 11 +- src/com/fsck/k9/activity/FolderList.java | 4 +- .../fsck/k9/fragment/MessageListFragment.java | 15 +- src/com/fsck/k9/view/MessageHeader.java | 5 +- 8 files changed, 251 insertions(+), 242 deletions(-) diff --git a/res/layout/accounts_item.xml b/res/layout/accounts_item.xml index 48b9a5194..a03852968 100644 --- a/res/layout/accounts_item.xml +++ b/res/layout/accounts_item.xml @@ -1,77 +1,81 @@ + android:id="@+id/accounts_item_layout" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:orientation="horizontal" + android:descendantFocusability="blocksDescendants" + android:gravity="center_vertical"> + android:id="@+id/chip" + android:layout_height="match_parent" + android:layout_width="8dip" + android:background="#ff336699" + android:layout_marginRight="8dip" + /> + + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_vertical" + android:paddingLeft="1dip"> + android:id="@+id/description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:singleLine="true" + android:ellipsize="end" + android:textColor="?android:attr/textColorPrimary" + android:textAppearance="?android:attr/textAppearanceMedium"/> + android:id="@+id/email" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:singleLine="true" + android:ellipsize="end" + android:textColor="?android:attr/textColorSecondary" + android:textAppearance="?android:attr/textAppearanceSmall"/> - - - - - + - + + + + + + + diff --git a/res/layout/folder_list_item.xml b/res/layout/folder_list_item.xml index bbc885428..67ab56640 100644 --- a/res/layout/folder_list_item.xml +++ b/res/layout/folder_list_item.xml @@ -1,51 +1,49 @@ - - - - + android:minHeight="?android:attr/listPreferredItemHeight" + android:paddingRight="4dip" + android:paddingBottom="2dip" + android:orientation="horizontal" + android:gravity="center_vertical"> - + + + + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_vertical" + android:paddingLeft="6dip"> + android:id="@+id/folder_name" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textColor="?android:attr/textColorPrimary" + android:textAppearance="?android:attr/textAppearanceLarge"/> + + - + diff --git a/res/layout/message_list_item.xml b/res/layout/message_list_item.xml index 4021fb556..260f2e894 100644 --- a/res/layout/message_list_item.xml +++ b/res/layout/message_list_item.xml @@ -1,125 +1,147 @@ + android:layout_width="match_parent" + android:layout_height="wrap_content" - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/res/layout/message_view_header.xml b/res/layout/message_view_header.xml index 9487c8666..d9686a850 100644 --- a/res/layout/message_view_header.xml +++ b/res/layout/message_view_header.xml @@ -18,7 +18,7 @@