Fix 3148496: Update LockScreen layouts on large device
This updates the layouts to conform to the latest UX spec on large devices and fixes a bug where the IME shown for PIN selection was the QWERTY keyboard. Change-Id: Ib9f0b1631f11c8eff6898bfff9447d3dad75cc42
This commit is contained in:
@@ -689,23 +689,13 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="ChooseLockPattern"
|
||||
android:label="@string/lockpattern_change_lock_pattern_label"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
<activity android:name="ChooseLockPattern" android:exported="false"/>
|
||||
|
||||
<activity android:name="ChooseLockPassword"
|
||||
android:label="@string/lockpattern_change_lock_pin_label"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
<activity android:name="ChooseLockPassword" android:exported="false"/>
|
||||
|
||||
<activity android:name="ChooseLockPatternTutorial"
|
||||
android:label="@string/lockpattern_change_lock_pattern_label">
|
||||
</activity>
|
||||
<activity android:name="ChooseLockPatternTutorial"/>
|
||||
|
||||
<activity android:name="ChooseLockPatternExample"
|
||||
android:label="@string/lockpattern_change_lock_pattern_label">
|
||||
</activity>
|
||||
<activity android:name="ChooseLockPatternExample"/>
|
||||
|
||||
<!-- Runs in the phone process since it needs access to the Phone object -->
|
||||
<activity android:name=".deviceinfo.Status"
|
||||
|
@@ -16,15 +16,16 @@
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="72dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- "Enter PIN(Password) to unlock" -->
|
||||
@@ -61,12 +62,31 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Spacer between password entry and keyboard -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1" />
|
||||
<!-- confirm / restart buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- left / top button: skip, or re-try -->
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpassword_cancel_label"/>
|
||||
|
||||
<!-- right / bottom button: confirm or ok -->
|
||||
<Button android:id="@+id/next_button"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpassword_continue_label"/>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- Alphanumeric keyboard -->
|
||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||
android:layout_alignParentBottom="true"
|
||||
@@ -77,33 +97,4 @@
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="140dip"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toLeftOf="@id/next_button"
|
||||
android:text="@string/lockpassword_cancel_label"
|
||||
/>
|
||||
|
||||
<Button android:id="@+id/next_button"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/lockpassword_continue_label"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
@@ -21,62 +21,69 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- left side: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<!-- right side: pattern and messages -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<RelativeLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0">
|
||||
android:layout_weight="1">
|
||||
|
||||
<!-- left side: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="354dip"
|
||||
android:layout_height="354dip"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="72dip"
|
||||
android:layout_marginLeft="111dip"
|
||||
aspect="square"/>
|
||||
|
||||
<!-- right side: instructions and buttons -->
|
||||
<!-- header message -->
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:gravity="left"/>
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="78dip"
|
||||
android:layout_marginTop="88dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toRightOf="@id/lockPattern"
|
||||
android:layout_marginLeft="100dip"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<!-- footer message -->
|
||||
<TextView android:id="@+id/footerText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/headerText"
|
||||
android:layout_marginTop="16dip"
|
||||
android:layout_toRightOf="@id/lockPattern"
|
||||
android:layout_marginLeft="100dip"
|
||||
android:textSize="22sp"
|
||||
android:layout_marginTop="40dip"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!-- confirm / restart buttons -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<!-- right / bottom button: confirm or ok -->
|
||||
<Button android:id="@+id/footerRightButton"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="140dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_confirm_button_text"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- left / top button: skip, or re-try -->
|
||||
<Button android:id="@+id/footerLeftButton"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="140dip"
|
||||
android:layout_toLeftOf="@id/footerRightButton"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_restart_button_text"/>
|
||||
|
||||
</RelativeLayout>
|
||||
<!-- right / bottom button: confirm or ok -->
|
||||
<Button android:id="@+id/footerRightButton"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_confirm_button_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
|
||||
|
@@ -17,16 +17,16 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- This is the same layout as choose_lock_password. TODO: find out why merge fails -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<!-- This is the same layout as choose_lock_password. TODO: find out why merge tag fails -->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="72dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- "Enter PIN(Password) to unlock" -->
|
||||
@@ -63,12 +63,31 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Spacer between password entry and keyboard -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1" />
|
||||
<!-- confirm / restart buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- left / top button: skip, or re-try -->
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpassword_cancel_label"/>
|
||||
|
||||
<!-- right / bottom button: confirm or ok -->
|
||||
<Button android:id="@+id/next_button"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpassword_continue_label"/>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- Alphanumeric keyboard -->
|
||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||
android:layout_alignParentBottom="true"
|
||||
@@ -79,30 +98,4 @@
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="visible">
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:layout_toLeftOf="@id/next_button"
|
||||
android:text="@string/lockpassword_cancel_label"
|
||||
/>
|
||||
|
||||
<Button android:id="@+id/next_button"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawableRight="@drawable/ic_btn_next"
|
||||
android:drawablePadding="10dip"
|
||||
android:text="@string/lockpassword_continue_label"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
@@ -21,33 +21,42 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- left side: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- right side: instructions and buttons -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<RelativeLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0">
|
||||
android:layout_weight="1">
|
||||
|
||||
<!-- left side: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="354dip"
|
||||
android:layout_height="354dip"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="72dip"
|
||||
android:layout_marginLeft="111dip"
|
||||
aspect="square"/>
|
||||
|
||||
<!-- right side: instructions and buttons -->
|
||||
<!-- header message -->
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="88dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toRightOf="@id/lockPattern"
|
||||
android:layout_marginLeft="100dip"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<!-- footer message -->
|
||||
<TextView android:id="@+id/footerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dip"
|
||||
android:gravity="left"
|
||||
android:layout_below="@id/headerText"
|
||||
android:layout_marginTop="16dip"
|
||||
android:layout_toRightOf="@id/lockPattern"
|
||||
android:layout_marginLeft="100dip"
|
||||
android:textSize="22sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/background_dark"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- header text ('Enter Pin') -->
|
||||
@@ -72,6 +71,7 @@
|
||||
android:background="#00000000"
|
||||
android:layout_marginBottom="30dip"
|
||||
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -91,8 +91,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawableRight="@drawable/ic_btn_next"
|
||||
android:drawablePadding="10dip"
|
||||
android:text="@string/lockpassword_continue_label"
|
||||
/>
|
||||
|
||||
|
@@ -14,78 +14,69 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black">
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- takes up all space above button bar at bottom -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<!-- top: instructions and buttons -->
|
||||
<!-- header message -->
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="78dip"
|
||||
android:layout_marginTop="96dip"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<!-- footer message -->
|
||||
<TextView android:id="@+id/footerText"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="78dip"
|
||||
android:layout_marginTop="16dip"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!-- bottom: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="354dip"
|
||||
android:layout_height="354dip"
|
||||
android:layout_marginTop="80dip"
|
||||
aspect="square"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<View
|
||||
android:background="@*android:drawable/code_lock_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dip" />
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- bottom line looks bad when button bar is their too, omit in this case -->
|
||||
<!--View
|
||||
android:background="@*android:drawable/code_lock_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dip" /-->
|
||||
|
||||
<TextView android:id="@+id/footerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@android:style/ButtonBar"
|
||||
android:orientation="horizontal"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button android:id="@+id/footerLeftButton"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="140dip"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_restart_button_text"/>
|
||||
android:layout_alignParentRight="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:visibility="invisible"
|
||||
android:layout_height="0dip"
|
||||
android:layout_width="1dip"
|
||||
android:layout_weight="1" />
|
||||
<!-- left / top button: skip, or re-try -->
|
||||
<Button android:id="@+id/footerLeftButton"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_restart_button_text"/>
|
||||
|
||||
<Button android:id="@+id/footerRightButton"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="140dip"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:drawableRight="@drawable/ic_btn_next"
|
||||
android:drawablePadding="3dip"
|
||||
android:text="@string/lockpattern_confirm_button_text"/>
|
||||
<!-- right / bottom button: confirm or ok -->
|
||||
<Button android:id="@+id/footerRightButton"
|
||||
android:layout_width="140dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="@string/lockpattern_confirm_button_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
|
@@ -23,7 +23,6 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/background_dark"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- header text ('Enter Pin') -->
|
||||
@@ -75,6 +74,7 @@
|
||||
android:background="#00000000"
|
||||
android:layout_marginBottom="30dip"
|
||||
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
|
@@ -17,35 +17,35 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black">
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- top: instructions and buttons -->
|
||||
<!-- header message -->
|
||||
<TextView android:id="@+id/headerText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<View
|
||||
android:background="@*android:drawable/code_lock_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dip" />
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<View
|
||||
android:background="@*android:drawable/code_lock_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dip" />
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="78dip"
|
||||
android:layout_marginTop="96dip"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<!-- footer message -->
|
||||
<TextView android:id="@+id/footerText"
|
||||
android:layout_width="542dip"
|
||||
android:layout_height="78dip"
|
||||
android:layout_marginTop="16dip"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<!-- bottom: lock pattern -->
|
||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||
android:layout_width="354dip"
|
||||
android:layout_height="354dip"
|
||||
android:layout_marginTop="80dip"
|
||||
aspect="square"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
|
@@ -29,6 +29,7 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.Selection;
|
||||
import android.text.Spannable;
|
||||
import android.text.TextUtils;
|
||||
@@ -191,6 +192,10 @@ public class ChooseLockPassword extends PreferenceActivity {
|
||||
mHeaderText = (TextView) view.findViewById(R.id.headerText);
|
||||
mKeyboardView.requestFocus();
|
||||
|
||||
int currentType = mPasswordEntry.getInputType();
|
||||
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
||||
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||
|
||||
Intent intent = getActivity().getIntent();
|
||||
final boolean confirmCredentials = intent.getBooleanExtra("confirm_credentials", true);
|
||||
if (savedInstanceState == null) {
|
||||
|
@@ -26,6 +26,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.InputType;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -98,6 +99,11 @@ public class ConfirmLockPassword extends PreferenceActivity {
|
||||
mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
|
||||
: PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
|
||||
mKeyboardView.requestFocus();
|
||||
|
||||
int currentType = mPasswordEntry.getInputType();
|
||||
mPasswordEntry.setInputType(isAlpha ? currentType
|
||||
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user