add theme to import/export activity

This commit is contained in:
Calvin Hu 2015-01-11 14:24:19 -10:00 committed by Jake McGinty
parent c89fbabbf3
commit e64c067636
48 changed files with 109 additions and 28 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="@color/touch_highlight" />
</shape>
<bitmap android:src="@drawable/card" />
</item>
<item android:drawable="@drawable/card" />
</selector>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="@color/import_export_touch_highlight_dark" />
</shape>
<layer-list android:src="@drawable/import_export_item_background_dark" />
</item>
<item android:drawable="@drawable/import_export_item_background_dark" />
</selector>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="@color/import_export_touch_highlight_light" />
</shape>
<layer-list android:src="@drawable/import_export_item_background_light" />
</item>
<item android:drawable="@drawable/import_export_item_background_light" />
</selector>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/import_export_item_background_shadow_dark" />
<corners android:radius="@dimen/conversation_item_corner_radius" />
</shape>
</item>
<item android:bottom="@dimen/conversation_item_drop_shadow_dist">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/import_export_item_background_dark" />
<corners android:radius="@dimen/conversation_item_corner_radius" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/import_export_item_background_shadow_light" />
<corners android:radius="@dimen/conversation_item_corner_radius" />
</shape>
</item>
<item android:bottom="@dimen/conversation_item_drop_shadow_dist">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/import_export_item_background_light" />
<corners android:radius="@dimen/conversation_item_corner_radius" />
</shape>
</item>
</layer-list>

View File

@ -2,7 +2,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffeaeaea"
android:layout_gravity="center_vertical"
android:gravity="center_vertical">
@ -11,8 +10,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:padding="8dip"
android:background="#ffeaeaea">
android:padding="8dip">
<!--LinearLayout android:id="@+id/export_encrypted_backup"
@ -20,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/clickable_card"
android:background="@drawable/clickable_card_light"
android:orientation="vertical">
<LinearLayout android:orientation="horizontal"
@ -61,7 +59,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/clickable_card"
android:background="?attr/import_export_item_card_background"
android:orientation="vertical">
<LinearLayout android:orientation="horizontal"
@ -76,7 +74,7 @@
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:src="@drawable/plaintext_backup"/>
android:src="?plaintext_backup"/>
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content"

View File

@ -2,7 +2,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffeaeaea"
android:layout_gravity="center_vertical"
android:gravity="center_vertical">
@ -11,14 +10,13 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:padding="8dip"
android:background="#ffeaeaea">
android:padding="8dip">
<LinearLayout android:id="@+id/import_sms"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/clickable_card"
android:background="?import_export_item_card_background"
android:orientation="vertical">
<LinearLayout android:orientation="horizontal"
@ -33,7 +31,7 @@
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:src="@drawable/stock_sms"/>
android:src="?stock_sms"/>
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content"
@ -58,7 +56,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/clickable_card"
android:background="?attr/import_export_item_card_background"
android:orientation="vertical">
<LinearLayout android:orientation="horizontal"
@ -73,7 +71,7 @@
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:src="@drawable/encrypted_backup"/>
android:src="?encrypted_backup"/>
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content"
@ -99,7 +97,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/clickable_card"
android:background="?attr/import_export_item_card_background"
android:orientation="vertical">
<LinearLayout android:orientation="horizontal"
@ -114,7 +112,7 @@
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:src="@drawable/plaintext_backup"/>
android:src="?plaintext_backup"/>
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content"

View File

@ -54,6 +54,13 @@
<attr name="contact_selection_label_text" format="reference|color" />
<attr name="conversation_selection_header_text" format="reference|color" />
<attr name="import_export_item_background_color" format="reference|color" />
<attr name="import_export_item_background_shadow_color" format="reference|color" />
<attr name="import_export_item_card_background" format="reference" />
<attr name="stock_sms" format="reference" />
<attr name="encrypted_backup" format="reference" />
<attr name="plaintext_backup" format="reference" />
<attr name="reminder_header_background" format="color"/>
<attr name="menu_new_conversation_icon" format="reference" />

View File

@ -22,7 +22,6 @@
<color name="textsecure_holo_blue_light">#ff33b5e5</color>
<color name="touch_highlight">#400099cc</color>
<color name="light_button">#33ffffff</color>
<color name="light_button_highlight">#66ffffff</color>
<color name="conversation_item_sent_background_dark">#ff284e0a</color>
@ -39,6 +38,12 @@
<color name="conversation_item_received_background_dark">#ff333333</color>
<color name="conversation_item_received_shadow_light">#ffd5d5d5</color>
<color name="conversation_item_received_shadow_dark">#ff222222</color>
<color name="import_export_item_background_light">#ffeeeeee</color>
<color name="import_export_item_background_dark">#ff333333</color>
<color name="import_export_item_background_shadow_light">#ffd5d5d5</color>
<color name="import_export_item_background_shadow_dark">#ff222222</color>
<color name="import_export_touch_highlight_light">#400099cc</color>
<color name="import_export_touch_highlight_dark">#40ffffff</color>
<color name="emoji_tab_indicator">#66ffffff</color>
<color name="emoji_tab_underline">#11ffffff</color>

View File

@ -82,7 +82,6 @@
<item name="android:textSize">16.0sp</item>
<item name="android:typeface">sans</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff333333</item>
<item name="android:gravity">left</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:shadowColor">#ffffff</item>

View File

@ -65,6 +65,13 @@
<item name="conversation_item_sent_push_pending_background">@drawable/conversation_item_sent_push_pending_shape</item>
<item name="conversation_item_sent_push_pending_triangle_background">@drawable/conversation_item_sent_push_pending_triangle_shape</item>
<item name="import_export_item_background_color">@color/import_export_item_background_light</item>
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_light</item>
<item name="import_export_item_card_background">@drawable/clickable_card_light</item>
<item name="stock_sms">@drawable/stock_sms_light</item>
<item name="encrypted_backup">@drawable/encrypted_backup_light</item>
<item name="plaintext_backup">@drawable/plaintext_backup_light</item>
<item name="menu_new_conversation_icon">@drawable/ic_action_new_holo_light</item>
<item name="menu_new_group_icon">@drawable/ic_action_add_group_holo_light</item>
<item name="menu_group_icon">@drawable/ic_menu_groups_holo_light</item>
@ -131,6 +138,13 @@
<item name="conversation_item_sent_push_pending_background">@drawable/conversation_item_sent_push_pending_shape_dark</item>
<item name="conversation_item_sent_push_pending_triangle_background">@drawable/conversation_item_sent_push_pending_triangle_shape_dark</item>
<item name="import_export_item_background_color">@color/import_export_item_background_dark</item>
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_dark</item>
<item name="import_export_item_card_background">@drawable/clickable_card_dark</item>
<item name="stock_sms">@drawable/stock_sms_dark</item>
<item name="encrypted_backup">@drawable/encrypted_backup_dark</item>
<item name="plaintext_backup">@drawable/plaintext_backup_dark</item>
<item name="actionbar_icon">@drawable/actionbar_icon_holo_dark</item>
<item name="lower_right_divet">@drawable/divet_lower_right_light</item>

View File

@ -10,6 +10,7 @@ import android.support.v7.app.ActionBar;
import android.view.MenuItem;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.util.DynamicTheme;
public class ImportExportActivity extends PassphraseRequiredActionBarActivity {
@ -18,9 +19,12 @@ public class ImportExportActivity extends PassphraseRequiredActionBarActivity {
private ViewPager viewPager;
private MasterSecret masterSecret;
private DynamicTheme dynamicTheme = new DynamicTheme();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
dynamicTheme.onCreate(this);
setContentView(R.layout.import_export_activity);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@ -29,6 +33,12 @@ public class ImportExportActivity extends PassphraseRequiredActionBarActivity {
initializeTabs();
}
@Override
public void onResume() {
super.onResume();
dynamicTheme.onResume(this);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
@ -106,4 +116,4 @@ public class ImportExportActivity extends PassphraseRequiredActionBarActivity {
}
}
}
}