Theme Support

1) Broke out the UI elements of the major Activites into stylable
   attributes.

2) Created a 'light' and 'dark' theme for the newly stylable attrs.

3) Touched up some of the UI spacing.

4) Implemented dynamic theme switching support.
This commit is contained in:
Moxie Marlinspike
2013-06-21 11:56:59 -07:00
parent 2ffc70a95b
commit 5263ac1f1a
62 changed files with 443 additions and 156 deletions

View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationListItem xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="10dip"
>
<org.thoughtcrime.securesms.ConversationListItem
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<FrameLayout android:id="@+id/contact_photo_frame"
android:layout_width="wrap_content"
@@ -11,6 +10,7 @@
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:visibility="visible">
<QuickContactBadge android:id="@+id/contact_photo_badge"
style="?android:attr/quickContactBadgeStyleWindowLarge"
android:visibility="gone" />
@@ -20,7 +20,8 @@
android:layout_height="60dp"
android:cropToPadding="true"
android:scaleType="centerCrop"
android:visibility="gone" />
android:visibility="gone"
android:contentDescription="Contact Photo Image"/>
</FrameLayout>
<!--<CheckBox android:id="@+id/checkbox"-->
@@ -37,18 +38,19 @@
android:singleLine="true"
android:layout_marginTop="6dip"
android:layout_marginRight="5dip"
android:layout_marginLeft="5dip"
android:layout_marginLeft="10dip"
android:layout_marginBottom="10dip"
android:layout_alignTop="@id/contact_photo_frame"
android:layout_toRightOf="@id/contact_photo_frame"
android:layout_alignWithParentIfMissing="true"
android:ellipsize="marquee"
android:textColor="#000000"/>
android:ellipsize="marquee"/>
<!--android:layout_toLeftOf="@id/checkbox"-->
<TextView android:id="@+id/date"
android:layout_marginBottom="10dip"
android:layout_marginLeft="5dip"
android:paddingRight="10dip"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -64,7 +66,8 @@
android:layout_alignBottom="@id/date"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/ic_list_alert_sms_failed" />
android:src="@drawable/ic_list_alert_sms_failed"
android:contentDescription="Error Alert"/>
<ImageView android:id="@+id/attachment"
android:layout_marginLeft="3dip"
@@ -73,7 +76,8 @@
android:visibility="gone"
android:layout_toLeftOf="@id/error"
android:layout_alignBottom="@id/date"
android:src="@drawable/ic_attachment_universal_small" />
android:src="@drawable/ic_attachment_universal_small"
android:contentDescription="Attachment Indicator"/>
<TextView android:id="@+id/subject"
android:layout_width="wrap_content"
@@ -81,7 +85,7 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
android:layout_marginBottom="10dip"
android:layout_marginLeft="5dip"
android:layout_marginLeft="10dip"
android:layout_alignBottom="@id/contact_photo_frame"
android:layout_toRightOf="@id/contact_photo_frame"
android:layout_toLeftOf="@id/date"