Merge "Fix 5579440: Add transport control view to tablet unlock screens" into ics-mr1
diff --git a/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java
index 6f24eba..daefc9a 100644
--- a/core/java/com/android/internal/widget/DigitalClock.java
+++ b/core/java/com/android/internal/widget/DigitalClock.java
@@ -106,7 +106,8 @@
private String mAmString, mPmString;
AmPm(View parent, Typeface tf) {
- mAmPmTextView = (TextView) parent.findViewById(R.id.am_pm);
+ // No longer used, uncomment if we decide to use AM/PM indicator again
+ // mAmPmTextView = (TextView) parent.findViewById(R.id.am_pm);
if (mAmPmTextView != null && tf != null) {
mAmPmTextView.setTypeface(tf);
}
diff --git a/core/res/res/drawable-hdpi/transportcontrol_bg.9.png b/core/res/res/drawable-hdpi/transportcontrol_bg.9.png
new file mode 100644
index 0000000..ebd6f8a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/transportcontrol_bg.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/transportcontrol_bg.9.png b/core/res/res/drawable-mdpi/transportcontrol_bg.9.png
new file mode 100644
index 0000000..d5a339f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/transportcontrol_bg.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/transportcontrol_bg.9.png b/core/res/res/drawable-xhdpi/transportcontrol_bg.9.png
new file mode 100644
index 0000000..b690a2a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/transportcontrol_bg.9.png
Binary files differ
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml
index b58f081..f972843 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml
@@ -17,45 +17,69 @@
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="match_parent">
- <View
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- />
-
+ <!-- left side: status and music -->
<RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:layout_width="0dip"
+ android:gravity="center">
- <!-- left side: status -->
- <include layout="@layout/keyguard_screen_status_land"
- android:layout_width="wrap_content"
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
android:layout_height="wrap_content"
- android:layout_marginLeft="102dip"
- android:paddingTop="50dip"
- android:layout_centerVertical="true"
- android:layout_alignParentLeft="true"/>
+ android:layout_marginBottom="24dip">
- <!-- right side: password -->
+ <!-- Music transport control underneath -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <!-- Status -->
+ <include layout="@layout/keyguard_screen_status_land"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="50dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
+
+ </RelativeLayout>
+
+ <!-- right side: password -->
+ <LinearLayout
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center">
+
<LinearLayout
- android:layout_width="330dip"
- android:layout_height="wrap_content"
android:orientation="vertical"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="155dip">
-
+ android:layout_width="330dip"
+ android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
+ android:layout_gravity="center"
android:background="@drawable/lockscreen_password_field_dark">
<EditText android:id="@+id/passwordEntry"
@@ -88,6 +112,7 @@
android:visibility="gone"
/>
+ <!-- The IME switcher button is only shown in ASCII password mode (not PIN) -->
<ImageView android:id="@+id/switch_ime_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -103,33 +128,29 @@
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
- android:layout_width="330dip"
+ android:layout_width="match_parent"
android:layout_height="330dip"
android:background="#40000000"
android:layout_marginTop="5dip"
android:keyBackground="@drawable/btn_keyboard_key_ics"
android:visibility="gone"
/>
+
+ <!-- Emergency call button. Generally not used on tablet devices. -->
+ <Button
+ android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:drawableLeft="@drawable/ic_emergency"
+ android:drawablePadding="8dip"
+ android:text="@string/lockscreen_emergency_call"
+ android:visibility="gone"
+ style="@style/Widget.Button.Transparent"
+ />
+
</LinearLayout>
- </RelativeLayout>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- />
-
- <!-- emergency call button NOT CURRENTLY USED -->
- <Button
- android:id="@+id/emergencyCallButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- android:text="@string/lockscreen_emergency_call"
- android:visibility="gone"
- style="@style/Widget.Button.Transparent"
- />
+ </LinearLayout>
</LinearLayout>
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml
index cadb5f8..8b65b22 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml
@@ -16,23 +16,48 @@
** limitations under the License.
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="match_parent">
- <!-- top: status -->
+ <!-- top: status and emergency/forgot pattern buttons -->
<RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1">
- <include layout="@layout/keyguard_screen_status_port"
- android:layout_width="wrap_content"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:gravity="center">
+
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
android:layout_height="wrap_content"
- android:layout_marginTop="134dip"
- android:layout_marginLeft="266dip"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"/>
+ android:gravity="center">
+
+ <!-- Music transport control -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <include layout="@layout/keyguard_screen_status_port"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="100dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
+
</RelativeLayout>
<!-- bottom: password -->
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
index 3a7c1e1..4fafc3c 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
@@ -23,15 +23,14 @@
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="left"
- >
+ android:gravity="right">
<TextView
android:id="@+id/carrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
+ android:textSize="16sp"
android:drawablePadding="4dip"
android:layout_marginTop="32dip"
android:singleLine="true"
@@ -72,19 +71,6 @@
android:layout_marginBottom="6dip"
/>
- <TextView android:id="@+id/am_pm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/timeDisplayBackground"
- android:layout_alignBaseline="@id/timeDisplayBackground"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="30sp"
- android:layout_marginLeft="8dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/lockscreen_clock_am_pm"
- />
-
</com.android.internal.widget.DigitalClock>
<LinearLayout
@@ -99,15 +85,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"/>
+ android:textSize="16sp"/>
<TextView
android:id="@+id/alarm_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="30dip"
+ android:layout_marginLeft="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"/>
+ android:drawablePadding="4dip"
+ android:textSize="16sp"/>
</LinearLayout>
@@ -117,7 +104,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
- android:textSize="17sp"
+ android:textSize="16sp"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
@@ -127,7 +114,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
+ android:textSize="16sp"
android:layout_marginTop="20dip"
android:singleLine="false"
android:textColor="@color/lockscreen_owner_info"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml b/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
index c02341e..dfab3e3 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
@@ -23,9 +23,8 @@
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="140dip"
android:layout_marginTop="20dip"
- android:gravity="left"
+ android:gravity="right"
>
<TextView
@@ -33,7 +32,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
+ android:textSize="16sp"
android:drawablePadding="4dip"
android:layout_marginTop="32dip"
android:singleLine="true"
@@ -73,19 +72,6 @@
android:layout_alignTop="@id/timeDisplayBackground"
/>
- <TextView android:id="@+id/am_pm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/timeDisplayBackground"
- android:layout_alignBaseline="@id/timeDisplayBackground"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="30sp"
- android:layout_marginLeft="8dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/lockscreen_clock_am_pm"
- />
-
</com.android.internal.widget.DigitalClock>
<LinearLayout
@@ -100,15 +86,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"/>
+ android:textSize="16sp"/>
<TextView
android:id="@+id/alarm_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="30dip"
+ android:layout_marginLeft="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"/>
+ android:drawablePadding="4dip"
+ android:textSize="16sp"/>
</LinearLayout>
@@ -117,7 +104,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
- android:textSize="17sp"
+ android:textSize="16sp"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
@@ -128,7 +115,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
+ android:textSize="16sp"
android:singleLine="false"
android:visibility="invisible"
android:textColor="@color/lockscreen_owner_info"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
index 23b2fcb..73dadb4 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
@@ -30,15 +30,40 @@
<!-- top: status -->
<RelativeLayout
- android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
- android:orientation="vertical">
- <include layout="@layout/keyguard_screen_status_port"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
+ android:gravity="center">
+
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
android:layout_height="wrap_content"
- android:layout_marginTop="134dip"
- android:layout_marginLeft="266dip"/>
+ android:gravity="center">
+
+ <!-- Music transport control -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <include layout="@layout/keyguard_screen_status_port"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="100dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
+
</RelativeLayout>
<LinearLayout
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index 66223f2..10b1ace 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -27,19 +27,40 @@
android:orientation="horizontal"
android:id="@+id/root">
- <!-- left side: status -->
+ <!-- left side: status and music -->
<RelativeLayout
android:layout_height="match_parent"
android:layout_weight="1"
- android:layout_width="0dip">
+ android:layout_width="0dip"
+ android:gravity="center">
- <include layout="@layout/keyguard_screen_status_land"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="102dip"
- android:layout_marginTop="320dip"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"/>
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
+ android:layout_height="wrap_content">
+
+ <!-- Music transport control underneath -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <include layout="@layout/keyguard_screen_status_land"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="82dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
</RelativeLayout>
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
index 7ac41b5..70d18cc 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
@@ -27,19 +27,41 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- left side: status -->
+ <!-- left side: status and music -->
<RelativeLayout
android:layout_height="match_parent"
android:layout_weight="1"
- android:layout_width="0dip">
+ android:layout_width="0dip"
+ android:gravity="center">
- <include layout="@layout/keyguard_screen_status_land"
- android:layout_width="wrap_content"
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
android:layout_height="wrap_content"
- android:layout_marginLeft="102dip"
- android:layout_marginTop="320dip"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"/>
+ android:layout_marginBottom="24dip">
+
+ <!-- Music transport control underneath -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <include layout="@layout/keyguard_screen_status_land"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="50dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
</RelativeLayout>
@@ -58,22 +80,23 @@
<!-- Emergency and forgot pattern buttons. -->
<LinearLayout
+ android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lockPattern"
android:layout_alignLeft="@id/lockPattern"
android:layout_alignRight="@id/lockPattern"
android:layout_marginTop="28dip"
- android:layout_marginLeft="28dip"
- android:layout_marginRight="28dip"
- android:orientation="horizontal">
+ android:gravity="center"
+ style="?android:attr/buttonBarStyle"
+ android:weightSum="2">
<Button android:id="@+id/forgotPatternButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
+ style="?android:attr/buttonBarButtonStyle"
+ android:drawableLeft="@drawable/lockscreen_forgot_password_button"
android:drawablePadding="8dip"
android:text="@string/lockscreen_forgot_pattern_button_text"
android:visibility="gone"
@@ -83,7 +106,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- style="@style/Widget.Button.Transparent"
+ style="?android:attr/buttonBarButtonStyle"
android:drawableLeft="@drawable/ic_emergency"
android:drawablePadding="8dip"
android:text="@string/lockscreen_emergency_call"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
index 1f6058f..7a623ce 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
@@ -23,32 +23,72 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- top: status and emergency/forgot pattern buttons -->
- <LinearLayout
+ <!-- top: status -->
+ <RelativeLayout
android:layout_height="0dip"
android:layout_weight="1"
android:layout_width="match_parent"
- android:orientation="vertical">
+ android:gravity="center">
- <include layout="@layout/keyguard_screen_status_port"
- android:layout_width="wrap_content"
+ <RelativeLayout android:id="@+id/transport_bg_protect"
+ android:layout_width="512dip"
android:layout_height="wrap_content"
- android:layout_marginTop="134dip"
- android:layout_marginLeft="266dip"/>
+ android:gravity="center">
+
+ <!-- Music transport control -->
+ <include android:id="@+id/transport"
+ layout="@layout/keyguard_transport_control"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_rowSpan="3"
+ android:layout_columnSpan="1"
+ android:layout_gravity="fill"
+ android:layout_width="match_parent"
+ android:layout_height="512dip"
+ />
+
+ <include layout="@layout/keyguard_screen_status_land"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginTop="50dip"
+ android:layout_marginBottom="100dip"
+ android:layout_marginRight="64dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ </RelativeLayout>
+
+ </RelativeLayout>
+
+ <!-- bottom: lock pattern, emergency dialer and forgot pattern button -->
+ <LinearLayout
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
+ android:layout_width="354dip"
+ android:layout_height="354dip"
+ android:layout_marginTop="50dip"/>
<!-- Emergency and forgot pattern buttons. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:gravity="center_horizontal">
+ style="?android:attr/buttonBarStyle"
+ android:gravity="center"
+ android:weightSum="2">
<Button android:id="@+id/forgotPatternButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
+ style="?android:attr/buttonBarButtonStyle"
+ android:drawableLeft="@drawable/lockscreen_forgot_password_button"
android:drawablePadding="8dip"
android:text="@string/lockscreen_forgot_pattern_button_text"
android:visibility="gone"
@@ -58,7 +98,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- style="@style/Widget.Button.Transparent"
+ style="?android:attr/buttonBarButtonStyle"
android:drawableLeft="@drawable/ic_emergency"
android:drawablePadding="8dip"
android:text="@string/lockscreen_emergency_call"
@@ -69,19 +109,5 @@
</LinearLayout>
- <!-- right side: lock pattern -->
- <LinearLayout
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:gravity="center"
- >
- <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
- android:layout_width="354dip"
- android:layout_height="354dip"
- android:layout_marginTop="50dip"
- />
- </LinearLayout>
-
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
diff --git a/core/res/res/layout-sw600dp/keyguard_transport_control.xml b/core/res/res/layout-sw600dp/keyguard_transport_control.xml
new file mode 100644
index 0000000..86b103e
--- /dev/null
+++ b/core/res/res/layout-sw600dp/keyguard_transport_control.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- *** Note *** This should mirror the file in layout/ with the exception of the background set
+ here for adding a drop shadow on tablets. -->
+
+<com.android.internal.widget.TransportControlView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/transport_controls"
+ android:background="@drawable/transportcontrol_bg">
+
+ <!-- FrameLayout used as scrim to show between album art and buttons -->
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:foreground="@drawable/ic_lockscreen_player_background">
+ <!-- We use ImageView for its cropping features, otherwise could be android:background -->
+ <ImageView
+ android:id="@+id/albumart"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="fill"
+ android:scaleType="centerCrop"
+ android:adjustViewBounds="false"
+ />
+ </FrameLayout>
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom">
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dip"
+ android:layout_marginLeft="16dip"
+ android:layout_marginRight="16dip"
+ android:gravity="center_horizontal"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginTop="5dip">
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+ <ImageView
+ android:id="@+id/btn_prev"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:src="@drawable/ic_media_previous"
+ android:clickable="true"
+ android:background="?android:attr/selectableItemBackground"
+ android:padding="10dip"
+ android:contentDescription="@string/lockscreen_transport_prev_description"/>
+ </FrameLayout>
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+ <ImageView
+ android:id="@+id/btn_play"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:clickable="true"
+ android:src="@drawable/ic_media_play"
+ android:background="?android:attr/selectableItemBackground"
+ android:padding="10dip"
+ android:contentDescription="@string/lockscreen_transport_play_description"/>
+ </FrameLayout>
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+ <ImageView
+ android:id="@+id/btn_next"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:clickable="true"
+ android:src="@drawable/ic_media_next"
+ android:background="?android:attr/selectableItemBackground"
+ android:padding="10dip"
+ android:contentDescription="@string/lockscreen_transport_next_description"/>
+ </FrameLayout>
+ </LinearLayout>
+ </LinearLayout>
+
+</com.android.internal.widget.TransportControlView>
diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml
index 5b488c0..921bcf4 100644
--- a/core/res/res/values-sw600dp/dimens.xml
+++ b/core/res/res/values-sw600dp/dimens.xml
@@ -43,7 +43,7 @@
<dimen name="action_bar_subtitle_bottom_margin">9dip</dimen>
<!-- Size of clock font in LockScreen. -->
- <dimen name="keyguard_pattern_unlock_clock_font_size">98sp</dimen>
+ <dimen name="keyguard_pattern_unlock_clock_font_size">112sp</dimen>
<!-- Size of lockscreen outerring on unsecure unlock LockScreen -->
<dimen name="keyguard_lockscreen_outerring_diameter">364dp</dimen>
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index 0f21bdb..dd3b75d 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -244,8 +244,14 @@
// TODO: examine all widgets to derive clock status
mUpdateMonitor.reportClockVisible(false);
- // TODO: We should disable the wallpaper instead
- setBackgroundColor(0xff000000);
+ // If there's not a bg protection view containing the transport, then show a black
+ // background. Otherwise, allow the normal background to show.
+ if (findViewById(R.id.transport_bg_protect) == null) {
+ // TODO: We should disable the wallpaper instead
+ setBackgroundColor(0xff000000);
+ } else {
+ resetBackground();
+ }
}
public void requestHide(View view) {