Merge "Final touches to material theme for phones" into lmp-dev
diff --git a/res/layout/crypt_keeper_password_entry.xml b/res/layout/crypt_keeper_password_entry.xml
index ecbfefd..6e99527 100644
--- a/res/layout/crypt_keeper_password_entry.xml
+++ b/res/layout/crypt_keeper_password_entry.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
@@ -20,29 +20,36 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
->
+ android:orientation="vertical">
+
<include layout="@layout/crypt_keeper_status" />
<LinearLayout
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:layout_width="match_parent"
- android:layout_marginStart="8dip"
- android:layout_marginEnd="8dip"
- android:orientation="horizontal"
- >
- <include layout="@layout/crypt_keeper_password_field" />
+ android:layout_weight="1"
+ android:layout_marginStart="@dimen/crypt_keeper_edit_text_margin"
+ android:layout_marginEnd="@dimen/crypt_keeper_edit_text_margin"
+ android:orientation="vertical"
+ android:gravity="center_vertical">
+
+ <LinearLayout
+ android:background="@color/crypt_keeper_password_background"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <include layout="@layout/crypt_keeper_password_field" />
+ </LinearLayout>
+
</LinearLayout>
+
<!-- Emergency call button.
Text is set by CryptKeeper.updateEmergencyCallButtonState() -->
<Button android:id="@+id/emergencyCallButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginTop="16dip"
- style="?android:attr/borderlessButtonStyle"
- android:textSize="14sp"
- android:drawablePadding="6dip"
- />
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="@dimen/crypt_keeper_emergency_call_space_above"
+ style="?android:attr/borderlessButtonStyle" />
</LinearLayout>
diff --git a/res/layout/crypt_keeper_password_field.xml b/res/layout/crypt_keeper_password_field.xml
index 9a2a24d..2d98b25 100644
--- a/res/layout/crypt_keeper_password_field.xml
+++ b/res/layout/crypt_keeper_password_field.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
@@ -20,16 +20,13 @@
<!-- Contents of the password entry field for CryptKeeper. Comes with an IME
switcher, if necessary. Assumed to be in a horizontal LinearLayout. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
- android:singleLine="true"
android:inputType="textPassword"
- android:imeOptions="flagForceAscii|actionDone"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center_horizontal"
- />
+ style="@style/TextAppearance.CryptKeeper_PasswordEntry" />
<ImageView android:id="@+id/switch_ime_button"
android:layout_width="wrap_content"
@@ -37,9 +34,9 @@
android:src="@drawable/ic_lockscreen_ime"
android:clickable="true"
android:contentDescription="@string/crypt_keeper_switch_input_method"
- android:padding="8dip"
+ android:padding="@dimen/crypt_keeper_edit_text_ime_padding"
android:layout_gravity="center"
android:background="?android:attr/selectableItemBackground"
- android:visibility="gone"
- />
+ android:visibility="gone" />
+
</merge>
diff --git a/res/layout/crypt_keeper_pattern_entry.xml b/res/layout/crypt_keeper_pattern_entry.xml
index 2538809..80e318f 100644
--- a/res/layout/crypt_keeper_pattern_entry.xml
+++ b/res/layout/crypt_keeper_pattern_entry.xml
@@ -20,18 +20,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
->
+ android:orientation="vertical">
+
<include layout="@layout/crypt_keeper_status" />
<LinearLayout
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:layout_width="match_parent"
- android:layout_marginStart="8dip"
- android:layout_marginEnd="8dip"
- android:orientation="horizontal"
- >
- <include layout="@layout/crypt_keeper_pattern_field" />
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center_vertical">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="@dimen/crypt_keeper_edit_text_margin"
+ android:layout_marginEnd="@dimen/crypt_keeper_edit_text_margin"
+ android:orientation="horizontal" >
+ <include layout="@layout/crypt_keeper_pattern_field" />
+ </LinearLayout>
+
</LinearLayout>
<!-- Emergency call button.
@@ -40,9 +48,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:layout_marginTop="16dip"
- style="?android:attr/borderlessButtonStyle"
- android:drawablePadding="6dip"
- />
+ android:layout_marginTop="@dimen/crypt_keeper_emergency_call_space_above"
+ style="?android:attr/borderlessButtonStyle" />
</LinearLayout>
diff --git a/res/layout/crypt_keeper_pattern_field.xml b/res/layout/crypt_keeper_pattern_field.xml
index a24d9aa..cf6a29f 100644
--- a/res/layout/crypt_keeper_pattern_field.xml
+++ b/res/layout/crypt_keeper_pattern_field.xml
@@ -20,11 +20,11 @@
<!-- Contents of the password entry field for CryptKeeper. Comes with an IME
switcher, if necessary. Assumed to be in a horizontal LinearLayout. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/lock_pattern_background"
- />
+ android:background="@color/lock_pattern_background" />
<ImageView android:id="@+id/switch_ime_button"
android:layout_width="wrap_content"
@@ -32,9 +32,9 @@
android:src="@drawable/ic_lockscreen_ime"
android:clickable="true"
android:contentDescription="@string/crypt_keeper_switch_input_method"
- android:padding="8dip"
+ android:padding="@dimen/crypt_keeper_edit_text_ime_padding"
android:layout_gravity="center"
android:background="?android:attr/selectableItemBackground"
- android:visibility="gone"
- />
+ android:visibility="gone" />
+
</merge>
diff --git a/res/layout/crypt_keeper_pin_entry.xml b/res/layout/crypt_keeper_pin_entry.xml
index 0f1f1e7..0bcbec5 100644
--- a/res/layout/crypt_keeper_pin_entry.xml
+++ b/res/layout/crypt_keeper_pin_entry.xml
@@ -20,29 +20,36 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
->
+ android:orientation="vertical">
+
<include layout="@layout/crypt_keeper_status" />
<LinearLayout
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
android:layout_width="match_parent"
- android:layout_marginStart="8dip"
- android:layout_marginEnd="8dip"
- android:orientation="horizontal"
- >
- <include layout="@layout/crypt_keeper_pin_field" />
+ android:layout_weight="1"
+ android:layout_marginStart="@dimen/crypt_keeper_edit_text_margin"
+ android:layout_marginEnd="@dimen/crypt_keeper_edit_text_margin"
+ android:orientation="vertical"
+ android:gravity="center_vertical">
+
+ <LinearLayout
+ android:background="@color/crypt_keeper_password_background"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <include layout="@layout/crypt_keeper_pin_field" />
+ </LinearLayout>
+
</LinearLayout>
<!-- Emergency call button.
- Text and icon are set by CryptKeeper.updateEmergencyCallButtonState() -->
+ Text is set by CryptKeeper.updateEmergencyCallButtonState() -->
<Button android:id="@+id/emergencyCallButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginTop="16dip"
- style="?android:attr/borderlessButtonStyle"
- android:drawablePadding="6dip"
- />
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="@dimen/crypt_keeper_emergency_call_space_above"
+ style="?android:attr/borderlessButtonStyle" />
</LinearLayout>
diff --git a/res/layout/crypt_keeper_pin_field.xml b/res/layout/crypt_keeper_pin_field.xml
index dd9d233..2fc1e81 100644
--- a/res/layout/crypt_keeper_pin_field.xml
+++ b/res/layout/crypt_keeper_pin_field.xml
@@ -20,16 +20,13 @@
<!-- Contents of the password entry field for CryptKeeper. Comes with an IME
switcher, if necessary. Assumed to be in a horizontal LinearLayout. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
- android:singleLine="true"
android:inputType="numberPassword"
- android:imeOptions="flagForceAscii|actionDone"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center_horizontal"
- />
+ style="@style/TextAppearance.CryptKeeper_PasswordEntry" />
<ImageView android:id="@+id/switch_ime_button"
android:layout_width="wrap_content"
@@ -37,9 +34,9 @@
android:src="@drawable/ic_lockscreen_ime"
android:clickable="true"
android:contentDescription="@string/crypt_keeper_switch_input_method"
- android:padding="8dip"
+ android:padding="@dimen/crypt_keeper_edit_text_ime_padding"
android:layout_gravity="center"
android:background="?android:attr/selectableItemBackground"
- android:visibility="gone"
- />
+ android:visibility="gone" />
+
</merge>
diff --git a/res/layout/crypt_keeper_status.xml b/res/layout/crypt_keeper_status.xml
index 9015613..72f7aec 100644
--- a/res/layout/crypt_keeper_status.xml
+++ b/res/layout/crypt_keeper_status.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
->
+ android:layout_gravity="center_horizontal">
+
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
@@ -33,11 +33,10 @@
android:layout_marginStart="8dip"
android:layout_marginEnd="8dip"
android:textSize="18sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/enter_password"
- android:drawableLeft="@*android:drawable/ic_lock_idle_lock"
- android:layout_gravity="center_horizontal"
- />
+ android:layout_gravity="center_horizontal" />
+
<TextView
android:id="@+id/owner_info"
android:layout_width="match_parent"
@@ -49,6 +48,6 @@
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:textSize="16sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
</LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index b523801..b2a6bb9 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -34,6 +34,7 @@
<color name="crypt_keeper_clock_background">#ff9a9a9a</color>
<color name="crypt_keeper_clock_foreground">#ff666666</color>
<color name="crypt_keeper_clock_am_pm">#ff9a9a9a</color>
+ <color name="crypt_keeper_password_background">#70606060</color>
<color name="divider_color">#20ffffff</color>
<color name="title_color">@android:color/holo_blue_light</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ae654e4..29d311f 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -171,4 +171,13 @@
<dimen name="wifi_assistant_padding">25dp</dimen>
<dimen name="wifi_assistant_text_padding">16dp</dimen>
+ <!-- CryptKeeper edit text margin -->
+ <dimen name="crypt_keeper_edit_text_margin">16dip</dimen>
+
+ <!-- CryptKeeper emergency call button dimensions -->
+ <dimen name="crypt_keeper_emergency_call_space_above">16dip</dimen>
+
+ <!-- CryptKeeper edit text ime icon padding -->
+ <dimen name="crypt_keeper_edit_text_ime_padding">8dip</dimen>
+
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 32a205d..1923ce6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -82,6 +82,15 @@
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
+ <style name="TextAppearance.CryptKeeper_PasswordEntry" parent="android:TextAppearance.Material">
+ <item name="android:textSize">36sp</item>
+ <item name="android:gravity">center_horizontal</item>
+ <item name="android:background">@null</item>
+ <item name="android:textCursorDrawable">@null</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:imeOptions">flagForceAscii|actionDone</item>
+ </style>
+
<style name="TallTitleBarTheme" parent="android:Theme.NoTitleBar">
<item name="android:windowContentOverlay">@null</item>
</style>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 44b83b1..54b5d41 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -150,6 +150,10 @@
</style>
<style name="Theme.CryptKeeper" parent="@android:style/Theme.Material.NoActionBar">
+ <item name="android:windowTranslucentStatus">false</item>
+ <item name="android:windowTranslucentNavigation">false</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
+
<!-- LockPatternView colors -->
<item name="@*android:regularColor">@color/unlock_pattern_view_regular_color</item>
<item name="@*android:successColor">@color/unlock_pattern_view_success_color</item>