Update conversation item style.

1) Don't print sender/recipient name in message body.
2) Do the split conversation icon view.
3) Adjust font sizes and colors.
This commit is contained in:
Moxie Marlinspike
2012-07-19 19:23:49 -07:00
parent eeeeac126c
commit a7cc47d259
15 changed files with 705 additions and 477 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?android:attr/listViewWhiteStyle"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:listSelector="@drawable/chat_history_selector"
android:drawSelectorOnTop="true"
android:transcriptMode="alwaysScroll"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarStyle="insideInset"
android:scrollbarAlwaysDrawVerticalTrack="false"
android:scrollbarStyle="insideOverlay"
android:stackFromBottom="true"
android:fadingEdge="none"
android:layout_marginBottom="1dip"/>

View File

@@ -1,159 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<org.thoughtcrime.securesms.ConversationItem-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/conversation_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10px"
android:paddingTop="5px"
android:paddingRight="10px"
android:paddingBottom="10px"
android:orientation="horizontal">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- <android.widget.QuickContactBadge android:id="@+id/contact_photo"-->
<!-- android:layout_width="60dp"-->
<!-- android:layout_height="60dp"-->
<!-- android:cropToPadding="true"-->
<!-- android:layout_marginRight="10px"-->
<!-- android:scaleType="centerCrop"-->
<!-- android:visibility="gone" />-->
<ImageView android:id="@+id/contact_photo"
android:layout_width="60dp"
android:layout_height="60dp"
android:cropToPadding="true"
android:layout_marginRight="10px"
android:scaleType="centerCrop"
android:visibility="gone" />
<LinearLayout android:id="@+id/conversation_item_parent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<TextView android:id="@+id/conversation_item_body"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#ff000000"
android:textSize="18sp" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="7dip"
android:paddingBottom="7dip">
<ImageView
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxWidth="178dip"
android:maxHeight="178dip"
android:adjustViewBounds="true"
android:background="@android:drawable/picture_frame"
android:visibility="gone" />
<ImageButton
android:id="@+id/play_slideshow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/mms_play_btn"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_download_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/mms_download_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Download"
android:visibility="gone" />
<TextView android:id="@+id/mms_label_downloading"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:text="Downloading"
android:visibility="gone" />
</LinearLayout>
<TextView android:id="@+id/conversation_item_date"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#bf000000"
android:paddingTop="3px"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout android:id="@+id/indicators_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<ImageView
android:id="@+id/key_exchange_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/key"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_pending_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_pending"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_secure_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_lock_small"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_failed_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_not_delivered"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<!--</org.thoughtcrime.securesms.ConversationItem>-->
</LinearLayout>

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationItem
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/conversation_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="10dip"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="org.thoughtcrime.securesms.components.ImageDivet"
position="right"
android:id="@id/contact_photo"
android:layout_alignParentLeft="true"
android:layout_width="60dp"
android:layout_height="60dp"
android:cropToPadding="true"
android:layout_marginRight="10dip"
android:scaleType="centerCrop" />
<LinearLayout android:id="@+id/conversation_item_parent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/indicators_parent"
android:layout_toRightOf="@id/contact_photo"
android:orientation="vertical" >
<TextView android:id="@+id/conversation_item_body"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#ff000000"
android:textSize="16sp" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="7dip"
android:paddingBottom="7dip">
<ImageView
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxWidth="178dip"
android:maxHeight="178dip"
android:adjustViewBounds="true"
android:background="@android:drawable/picture_frame"
android:visibility="gone" />
<ImageButton
android:id="@+id/play_slideshow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/mms_play_btn"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_download_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/mms_download_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Download"
android:visibility="gone" />
<TextView android:id="@+id/mms_label_downloading"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:text="Downloading"
android:visibility="gone" />
</LinearLayout>
<TextView android:id="@+id/conversation_item_date"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:gravity="left"
android:textColor="#ffcccccc"
android:paddingTop="1dip"/>
</LinearLayout>
<LinearLayout android:id="@+id/indicators_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_alignParentRight="true">
<ImageView
android:id="@+id/key_exchange_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/key"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_pending_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_pending"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_secure_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_lock_small"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_failed_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_not_delivered"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>
</org.thoughtcrime.securesms.ConversationItem>

View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationItem
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/conversation_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dip"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout android:id="@+id/indicators_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_alignParentLeft="true">
<ImageView
android:id="@+id/key_exchange_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/key"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_pending_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_pending"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_secure_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_lock_small"
android:visibility="gone" />
<ImageView
android:id="@+id/sms_failed_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_sms_mms_not_delivered"
android:visibility="gone" />
</LinearLayout>
<LinearLayout android:id="@+id/conversation_item_parent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/indicators_parent"
android:layout_toLeftOf="@+id/contact_photo"
android:orientation="vertical" >
<TextView android:id="@+id/conversation_item_body"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:gravity="right"
android:textColor="#ff000000"
android:textSize="16sp" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="7dip"
android:paddingBottom="7dip">
<ImageView
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxWidth="178dip"
android:maxHeight="178dip"
android:adjustViewBounds="true"
android:background="@android:drawable/picture_frame"
android:visibility="gone" />
<ImageButton
android:id="@+id/play_slideshow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/mms_play_btn"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mms_download_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/mms_download_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Download"
android:visibility="gone" />
<TextView android:id="@+id/mms_label_downloading"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:text="Downloading"
android:visibility="gone" />
</LinearLayout>
<TextView android:id="@+id/conversation_item_date"
android:autoLink="all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:linksClickable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:gravity="right"
android:textColor="#ffcccccc"
android:paddingTop="1dip"/>
</LinearLayout>
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="org.thoughtcrime.securesms.components.ImageDivet"
position="left"
android:id="@id/contact_photo"
android:layout_alignParentRight="true"
android:layout_width="60dp"
android:layout_height="60dp"
android:cropToPadding="true"
android:layout_marginLeft="10dip"
android:layout_marginRight="0dip"
android:padding="0dip"
android:scaleType="centerCrop" />
</RelativeLayout>
</org.thoughtcrime.securesms.ConversationItem>

View File

@@ -28,7 +28,7 @@
android:key="pref_all_mms"
android:summary="Use TextSecure for viewing and storing all incoming multimedia messages"
android:title="Use for all MMS" />
</PreferenceCategory>
<PreferenceCategory android:title="Input Settings">
@@ -39,103 +39,84 @@
</PreferenceCategory>
<PreferenceCategory android:title="Display Settings">
<Preference android:key="pref_choose_identity"
android:title="Choose Identity"
android:summary="Choose your contact entry from the contacts list."/>
<CheckBoxPreference android:defaultValue="true"
android:key="pref_dark_threads"
android:summary="Display dark background in thread list"
android:title="Dark Thread List Theme" />
<CheckBoxPreference android:defaultValue="false"
android:key="pref_dark_conversation"
android:summary="Display dark background in conversation view"
android:title="Dark Conversation Theme" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_conversation_list_icons"
android:summary="Show contact photo icons in list of conversation threads"
android:title="List Photos" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_conversation_icons"
android:summary="Show contact photo icons in conversation"
android:title="Conversation Photos" />
android:title="Choose Identity"
android:summary="Choose your contact entry from the contacts list."/>
</PreferenceCategory>
<PreferenceCategory android:title="Encryption Settings">
<Preference android:key="pref_change_passphrase"
android:title="Change Passphrase"
android:summary="Change my passphrase"/>
<CheckBoxPreference android:defaultValue="true"
android:key="pref_auto_complete_key_exchange"
android:title="Complete Key Exchanges"
android:summary="Automatically complete key exchanges for new sessions or for existing sessions with the same identity key" />
<Preference android:key="pref_change_passphrase"
android:title="Change Passphrase"
android:summary="Change my passphrase"/>
<CheckBoxPreference android:defaultValue="true"
android:key="pref_auto_complete_key_exchange"
android:title="Complete Key Exchanges"
android:summary="Automatically complete key exchanges for new sessions or for existing sessions with the same identity key" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_key_tag_whitespace"
android:summary="Include a whitespace tag at the end of every non-encrypted message"
android:title="Include whitespace tag" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_send_identity_key"
android:summary="Sign key exchange messages with identity key"
android:title="Sign Key Exchange" />
android:key="pref_send_identity_key"
android:summary="Sign key exchange messages with identity key"
android:title="Sign Key Exchange" />
<CheckBoxPreference android:defaultValue="false"
android:key="pref_timeout_passphrase"
android:summary="Forget passphrase from memory after some interval"
android:title="Timeout passphrase" />
android:key="pref_timeout_passphrase"
android:summary="Forget passphrase from memory after some interval"
android:title="Timeout passphrase" />
<org.thoughtcrime.securesms.preferences.PassphraseTimeoutPreference
android:key="pref_timeout_interval"
android:defaultValue="300"
android:title="Timeout interval"
android:summary="The amount of time to wait before forgetting passphrase from memory"
android:dependency="pref_timeout_passphrase"
android:dialogTitle="Select Passphrase Timeout" />
android:key="pref_timeout_interval"
android:defaultValue="300"
android:title="Timeout interval"
android:summary="The amount of time to wait before forgetting passphrase from memory"
android:dependency="pref_timeout_passphrase"
android:dialogTitle="Select Passphrase Timeout" />
</PreferenceCategory>
<PreferenceCategory android:title="Identity Key Settings">
<Preference android:key="pref_view_identity"
android:title="View My Identity Key"
android:summary="View my identity key"/>
<Preference android:key="pref_export_identity"
android:title="Export My Identity Key"
android:summary="Export my identity key"/>
<Preference android:key="pref_import_identity"
android:title="Import Contact's Key"
android:summary="Import an identity key from a contact"/>
<Preference android:key="pref_manage_identity"
android:title="Manage Identity Keys"
android:summary="Manage configured identity keys"/>
<Preference android:key="pref_view_identity"
android:title="View My Identity Key"
android:summary="View my identity key"/>
<Preference android:key="pref_export_identity"
android:title="Export My Identity Key"
android:summary="Export my identity key"/>
<Preference android:key="pref_import_identity"
android:title="Import Contact's Key"
android:summary="Import an identity key from a contact"/>
<Preference android:key="pref_manage_identity"
android:title="Manage Identity Keys"
android:summary="Manage configured identity keys"/>
</PreferenceCategory>
<PreferenceCategory android:title="Notification Settings">
<CheckBoxPreference android:key="pref_key_enable_notifications"
android:title="Notifications"
android:summary="Display message notifications in status bar"
android:defaultValue="true" />
<ListPreference
android:key="pref_led_color"
android:defaultValue="green"
android:title="LED Color"
android:dependency="pref_key_enable_notifications"
android:summary="Change notification LED color"
android:entries="@array/pref_led_color_entries"
android:entryValues="@array/pref_led_color_values"
android:dialogTitle="Select LED Color" />
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
android:key="pref_led_color"
android:defaultValue="green"
android:title="LED Color"
android:dependency="pref_key_enable_notifications"
android:summary="Change notification LED color"
android:entries="@array/pref_led_color_entries"
android:entryValues="@array/pref_led_color_values"
android:dialogTitle="Select LED Color" />
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
android:key="pref_led_blink"
android:defaultValue="500,2000"
android:title="LED Blink Pattern"
@@ -143,9 +124,9 @@
android:summary="Change notification LED blink pattern"
android:entries="@array/pref_led_blink_pattern_entries"
android:entryValues="@array/pref_led_blink_pattern_values"
android:dialogTitle="LED Blink Pattern" />
android:dialogTitle="LED Blink Pattern" />
<RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
android:dependency="pref_key_enable_notifications"
android:key="pref_key_ringtone"