mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 17:48:39 +00:00
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:
@@ -18,7 +18,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/white_background"
|
||||
android:background="?conversation_background"
|
||||
android:gravity="bottom">
|
||||
|
||||
<fragment
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dip"
|
||||
android:background="#fff">
|
||||
android:background="?conversation_background">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/attachment_editor"
|
||||
@@ -51,7 +51,8 @@
|
||||
android:id="@+id/attachment_thumbnail"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="150dip"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Attachment Thumbnail"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@@ -70,9 +71,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View android:background="#eeeeee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
<View android:background="?conversation_editor_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_panel"
|
||||
@@ -97,7 +98,7 @@
|
||||
android:maxLength="1000"
|
||||
android:maxLines="4"
|
||||
android:nextFocusRight="@+id/send_button"
|
||||
android:textColor="@android:color/black" />
|
||||
android:textColor="?conversation_editor_text_color" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/send_button"
|
||||
@@ -108,19 +109,17 @@
|
||||
android:contentDescription="@string/conversation_activity__send"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_send_holo_light"
|
||||
android:src="?conversation_send_button"
|
||||
android:clickable="false"
|
||||
android:enabled="false" />
|
||||
<!-- android:tint="#66ffffff" />-->
|
||||
|
||||
"
|
||||
|
||||
</LinearLayout>
|
||||
<TextView android:id="@+id/space_left"
|
||||
android:paddingLeft="5dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="160/160 (1)"
|
||||
/>
|
||||
<TextView android:id="@+id/space_left"
|
||||
android:paddingLeft="5dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="160/160 (1)" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
@@ -9,8 +9,9 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:background="?conversation_card_background">
|
||||
|
||||
<view xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
class="org.thoughtcrime.securesms.components.ImageDivet"
|
||||
@@ -20,14 +21,15 @@
|
||||
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_height="match_parent"
|
||||
android:layout_toLeftOf="@+id/indicators_parent"
|
||||
android:layout_toRightOf="@id/contact_photo"
|
||||
android:background="?conversation_background"
|
||||
android:paddingLeft="10dip"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView android:id="@+id/conversation_item_body"
|
||||
@@ -35,14 +37,16 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:linksClickable="true"
|
||||
android:paddingTop="5dip"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#ff000000"
|
||||
android:textColor="?conversation_text_primary_color"
|
||||
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:visibility="gone"
|
||||
android:paddingTop="7dip"
|
||||
android:paddingBottom="7dip">
|
||||
|
||||
@@ -54,7 +58,8 @@
|
||||
android:scaleType="centerInside"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@android:drawable/picture_frame"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Message Media"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/play_slideshow_button"
|
||||
@@ -62,7 +67,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/mms_play_btn"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Play Button"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -91,16 +97,18 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dip"
|
||||
android:gravity="left">
|
||||
|
||||
<ImageView android:id="@+id/delivered_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="3dip"
|
||||
android:src="@drawable/ic_sms_mms_delivered"
|
||||
android:visibility="gone" />
|
||||
android:src="?conversation_delivered_indicator"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Delivered Indicator"/>
|
||||
|
||||
<TextView android:id="@+id/group_message_status"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -108,7 +116,7 @@
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="left"
|
||||
android:textColor="#ffcccccc"
|
||||
android:textColor="?conversation_text_secondary_color"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="8dip"
|
||||
android:paddingTop="1dip"/>
|
||||
@@ -120,7 +128,7 @@
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="left"
|
||||
android:textColor="#ffcccccc"
|
||||
android:textColor="?conversation_text_secondary_color"
|
||||
android:paddingTop="1dip"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -128,34 +136,35 @@
|
||||
|
||||
<LinearLayout android:id="@+id/indicators_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentRight="true">
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?conversation_background">
|
||||
|
||||
<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/ic_menu_login"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Key Exchange Indicator"/>
|
||||
|
||||
<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_menu_lock_holo_light"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Secure Message Indicator"/>
|
||||
|
||||
<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_list_alert_sms_failed"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Send Failed Indicator"/>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@@ -7,48 +7,51 @@
|
||||
android:paddingLeft="10dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<RelativeLayout android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:background="?conversation_card_background">
|
||||
|
||||
<LinearLayout android:id="@+id/indicators_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true">
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?conversation_background">
|
||||
|
||||
<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/ic_menu_login"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Key Exchange Indicator"/>
|
||||
|
||||
<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_menu_lock_holo_light"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Secure Message Indicator"/>
|
||||
|
||||
<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_list_alert_sms_failed"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Send Failed Indicator"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/conversation_item_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toRightOf="@id/indicators_parent"
|
||||
android:layout_toLeftOf="@+id/contact_photo"
|
||||
android:background="?conversation_background"
|
||||
android:paddingRight="10dip"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView android:id="@+id/conversation_item_body"
|
||||
@@ -58,13 +61,14 @@
|
||||
android:linksClickable="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:gravity="right"
|
||||
android:textColor="#ff000000"
|
||||
android:textColor="?conversation_text_primary_color"
|
||||
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:visibility="gone"
|
||||
android:paddingTop="7dip"
|
||||
android:paddingBottom="7dip">
|
||||
|
||||
@@ -76,7 +80,8 @@
|
||||
android:scaleType="centerInside"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@android:drawable/picture_frame"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Media Message"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/play_slideshow_button"
|
||||
@@ -84,7 +89,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/mms_play_btn"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Play Button"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -113,16 +119,18 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dip"
|
||||
android:gravity="right">
|
||||
|
||||
<ImageView android:id="@+id/delivered_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="3dip"
|
||||
android:src="@drawable/ic_sms_mms_delivered"
|
||||
android:visibility="gone" />
|
||||
android:src="?conversation_delivered_indicator"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Delivered Indicator"/>
|
||||
|
||||
<TextView android:id="@+id/group_message_status"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -130,7 +138,7 @@
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="right"
|
||||
android:textColor="#ffcccccc"
|
||||
android:textColor="?conversation_text_secondary_color"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="8dip"
|
||||
android:paddingTop="1dip"/>
|
||||
@@ -142,7 +150,7 @@
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="right"
|
||||
android:textColor="#ffcccccc"
|
||||
android:textColor="?conversation_text_secondary_color"
|
||||
android:paddingTop="1dip"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -158,7 +166,6 @@
|
||||
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" />
|
||||
|
@@ -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"
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<TextView android:id="@+id/text1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:textColor="@drawable/text_color_black"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_gravity="center_horizontal|center_vertical" />
|
||||
|
@@ -8,7 +8,7 @@
|
||||
android:paddingBottom="5dip"
|
||||
android:paddingLeft="5dip"
|
||||
android:paddingRight="5dip"
|
||||
android:background="@drawable/white_background"
|
||||
android:background="?conversation_background"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<org.thoughtcrime.securesms.contacts.RecipientsEditor android:id="@+id/recipients_text"
|
||||
|
Reference in New Issue
Block a user