Fix LockScreen Settings on phones.

Change-Id: Ibbb0bcb4f34ba442d9ec678277718d3141f9d807
This commit is contained in:
Jim Miller
2011-03-30 21:16:48 -07:00
parent c4d9d80906
commit 30cf12cc17
7 changed files with 335 additions and 113 deletions

View File

@@ -39,7 +39,7 @@
android:layout_marginBottom="10dip"
android:gravity="left"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<!-- Password entry field -->
@@ -74,6 +74,7 @@
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
<RelativeLayout

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
<!-- left side: lock pattern -->
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="300dip"
android:layout_height="300dip"
android:layout_gravity="center_horizontal"
aspect="square"/>
<!-- right side: instructions and buttons -->
<!-- header message -->
<ScrollView
android:layout_width="300dip"
android:layout_height="180dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/lockPattern"
android:layout_marginLeft="25dip">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dip">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/lock_title"
android:paddingBottom="10dip"
style="?android:attr/textAppearanceLarge"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="18sp"
android:text="@string/lock_intro_message"
/>
</LinearLayout>
</ScrollView>
<LinearLayout
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/skip_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>
</RelativeLayout>
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>

View File

@@ -16,12 +16,93 @@
** limitations under the License.
*/
-->
<!-- This is basically the same layout as choose_lock_password. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@android:color/background_dark"
android:gravity="center_horizontal">
<!-- This is basically the same layout now, but will likely change -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<include
layout="@layout/choose_lock_password"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- "Enter PIN(Password) to unlock" -->
<TextView android:id="@+id/headerText"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_marginRight="6dip"
android:layout_marginLeft="6dip"
android:layout_marginTop="10dip"
android:layout_marginBottom="10dip"
android:gravity="left"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<!-- Password entry field -->
<EditText android:id="@+id/password_entry"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:textStyle="bold"
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center"
android:textSize="24sp"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:background="@drawable/password_field_default"
android:textColor="#ffffffff"
/>
</LinearLayout>
<!-- Spacer between password entry and keyboard -->
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
</merge>
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="@android:drawable/bottom_bar"
android:visibility="gone">
<Button android:id="@+id/cancel_button"
android:layout_width="150dip"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_alignParentLeft="true"
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>

View File

@@ -29,14 +29,13 @@
android:layout_height="wrap_content"
android:gravity="center"
android:lines="2"
android:textAppearance="?android:attr/textAppearanceLarge"/>
android:textAppearance="?android:attr/textAppearanceMedium"/>
<!-- spacer above text entry field -->
<View
android:id="@+id/spacerBottom"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_marginTop="6dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
@@ -49,8 +48,7 @@
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center"
android:textSize="32sp"
android:layout_marginTop="15dip"
android:textSize="24sp"
android:layout_marginLeft="30dip"
android:layout_marginRight="30dip"
android:textAppearance="?android:attr/textAppearanceLarge"
@@ -64,39 +62,30 @@
android:layout_height="0dip"
android:layout_weight="1" />
<LinearLayout
style="@style/SecurityPreferenceButtonContainer"
android:orientation="horizontal">
<!-- left : cancel -->
<Button android:id="@+id/cancel_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_cancel_label"/>
<!-- right : continue -->
<Button android:id="@+id/next_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_continue_label"/>
</LinearLayout>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:layout_marginBottom="30dip"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="@android:drawable/bottom_bar">
<Button android:id="@+id/cancel_button"
android:layout_width="150dip"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_alignParentLeft="true"
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>

View File

@@ -58,33 +58,19 @@
</LinearLayout>
<LinearLayout
style="@style/SecurityPreferenceButtonContainer"
android:orientation="horizontal">
<LinearLayout style="@android:style/ButtonBar"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- left : cancel, or re-try -->
<Button android:id="@+id/footerLeftButton"
android:layout_height="wrap_content"
android:layout_width="140dip"
android:ellipsize="marquee"
android:singleLine="true"
android:text="@string/lockpattern_restart_button_text"/>
<View
android:visibility="invisible"
android:layout_height="0dip"
android:layout_width="1dip"
android:layout_weight="1" />
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right : confirm or ok -->
<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"/>
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
<!-- 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.
@@ -17,71 +17,68 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ScrollView
android:layout_width="match_parent"
android:gravity="center_horizontal">
<!-- top: instructions and buttons -->
<!-- header message -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dip">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/lock_title"
android:paddingBottom="10dip"
android:layout_marginTop="3dip"
style="?android:attr/textAppearanceLarge"
/>
<TextView
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginTop="10dip"
android:textSize="18sp"
android:text="@string/lock_intro_message"
/>
</LinearLayout>
</ScrollView>
<LinearLayout style="@android:style/ButtonBar"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</ScrollView>
<!-- bottom: lock pattern -->
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="300dip"
android:layout_height="300dip"
aspect="square"/>
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
<LinearLayout
style="@style/SecurityPreferenceButtonContainer"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/skip_button"
android:layout_height="wrap_content"
android:layout_width="140dip"
android:ellipsize="marquee"
android:singleLine="true"
android:text="@string/skip_button_label"
/>
<!-- Placeholder to get blank space between the two buttons -->
<View
android:visibility="invisible"
android:layout_height="0dip"
android:layout_width="1dip"
android:layout_weight="1" />
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
android:layout_height="wrap_content"
android:layout_width="140dip"
android:drawableRight="@drawable/ic_btn_next"
android:drawablePadding="3dip"
android:ellipsize="marquee"
android:singleLine="true"
android:text="@string/next_button_label"
/>
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>
</LinearLayout >
</LinearLayout>

View File

@@ -17,11 +17,86 @@
*/
-->
<!-- This is basically the same layout now, but will likely change -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<include
layout="@layout/choose_lock_password"
android:layout_width="match_parent"
android:layout_height="match_parent"
<!-- This is the same layout as choose_lock_password -->
<LinearLayout 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">
<!-- header text ('Enter Pin') -->
<TextView android:id="@+id/headerText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:lines="2"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<!-- spacer above text entry field -->
<View
android:id="@+id/spacerBottom"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_marginTop="6dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
</merge>
<!-- Password entry field -->
<EditText android:id="@+id/password_entry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textStyle="bold"
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center"
android:textSize="24sp"
android:layout_marginLeft="30dip"
android:layout_marginRight="30dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:background="@drawable/password_field_default"
android:textColor="#ffffffff"
/>
<!-- Spacer between password entry and keyboard -->
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
<View
android:layout_width="match_parent"
android:layout_height="0dip"
/>
<LinearLayout
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/cancel_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>
</LinearLayout>