Merge "Fix 5044158: layout and asset work on lockscreen PIN mode"

This commit is contained in:
Jim Miller
2011-08-03 19:41:45 -07:00
committed by Android (Google) Code Review
46 changed files with 123 additions and 77 deletions

View File

@@ -29,6 +29,7 @@ import android.util.Log;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewRootImpl;
import com.android.internal.R;
@@ -62,7 +63,8 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener {
mContext = context;
mTargetView = targetView;
mKeyboardView = keyboardView;
if (useFullScreenWidth || mKeyboardView.getLayoutParams().width == -1) {
if (useFullScreenWidth
|| mKeyboardView.getLayoutParams().width == ViewGroup.LayoutParams.MATCH_PARENT) {
createKeyboards();
} else {
createKeyboardsWithSpecificSize(mKeyboardView.getLayoutParams().width,

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

View File

@@ -0,0 +1,42 @@
<?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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Functional keys. -->
<item android:state_single="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_dark_pressed_holo" />
<item android:state_single="true"
android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_dark_pressed_on_holo" />
<item android:state_checkable="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_dark_pressed_off_holo" />
<item android:state_checkable="true" android:state_checked="true"
android:drawable="@drawable/btn_keyboard_key_dark_normal_on_holo" />
<item android:state_checkable="true"
android:drawable="@drawable/btn_keyboard_key_dark_normal_off_holo" />
<!-- Normal keys -->
<item android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_light_pressed_holo" />
<item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
</selector>

View File

@@ -118,41 +118,36 @@
/>
<!-- Column 1 -->
<Space android:layout_width="32dip" android:layout_rowSpan="7" />
<Space android:layout_width="16dip" android:layout_rowSpan="7" />
<!-- Column 2 - password entry field and PIN keyboard -->
<LinearLayout
android:orientation="vertical"
android:layout_gravity="center|fill"
android:layout_rowSpan="7">
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:layout_gravity="center"
android:textSize="24sp"
android:minEms="8"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="@drawable/lockscreen_password_field_dark"
android:textColor="?android:attr/textColorPrimary"
android:imeOptions="flagNoFullscreen"
/>
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="250dip"
android:layout_height="100dip"
android:layout_gravity="center"
android:background="#40000000"
android:layout_marginTop="5dip"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="fill"
android:gravity="center"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:textSize="24sp"
android:minEms="8"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="@drawable/lockscreen_password_field_dark"
android:textColor="?android:attr/textColorPrimary"
android:imeOptions="flagNoFullscreen|actionDone"
/>
</LinearLayout>
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="270dip"
android:layout_height="wrap_content"
android:layout_marginRight="4dip"
android:background="#40000000"
android:layout_marginTop="5dip"
android:keyBackground="@*android:drawable/btn_keyboard_key_ics"
android:visibility="gone"
android:layout_rowSpan="6"
/>
<!-- Music transport control -->
<include android:id="@+id/transport"

View File

@@ -94,31 +94,32 @@
android:drawablePadding="4dip"
/>
<Space android:layout_height="100dip"/>
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_gravity="center_vertical|fill_horizontal"
android:gravity="center_horizontal"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:gravity="center"
android:textSize="22sp"
android:textSize="36sp"
android:layout_marginLeft="16dip"
android:layout_marginRight="16dip"
android:background="@drawable/lockscreen_password_field_dark"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffffff"/>
<Space android:layout_gravity="fill" />
android:textColor="#ffffffff"
android:imeOptions="actionDone"/>
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="260dip"
android:layout_height="wrap_content"
android:layout_marginRight="4dip"
android:paddingTop="4dip"
android:paddingBottom="4dip"
android:background="#40000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:keyBackground="@*android:drawable/btn_keyboard_key_ics"
android:visibility="gone"
/>
@@ -139,7 +140,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dip"
android:layout_marginRight="16dip"
android:layout_gravity="center_horizontal"
android:drawableLeft="@*android:drawable/lockscreen_emergency_button"
style="?android:attr/buttonBarButtonStyle"
@@ -153,7 +153,7 @@
layout="@layout/keyguard_transport_control"
android:layout_row="0"
android:layout_column="0"
android:layout_rowSpan="4"
android:layout_rowSpan="3"
android:layout_columnSpan="1"
android:layout_gravity="fill"
/>

View File

@@ -22,7 +22,7 @@
<!-- Default height of a key in the password keyboard for alpha -->
<dimen name="password_keyboard_key_height_alpha">47dip</dimen>
<!-- Default height of a key in the password keyboard for numeric -->
<dimen name="password_keyboard_key_height_numeric">60dip</dimen>
<dimen name="password_keyboard_key_height_numeric">50dip</dimen>
<!-- Default correction for the space key in the password keyboard -->
<dimen name="password_keyboard_spacebar_vertical_correction">2dip</dimen>
<dimen name="preference_widget_width">72dp</dimen>

View File

@@ -50,12 +50,17 @@
<dimen name="fastscroll_thumb_height">52dp</dimen>
<!-- Min width for a tablet device -->
<dimen name="min_xlarge_screen_width">800dp</dimen>
<!-- Default height of a key in the password keyboard for alpha -->
<!-- Default height of a key in the password keyboard for alpha (used by keyguard) -->
<dimen name="password_keyboard_key_height_alpha">56dip</dimen>
<!-- Default height of a key in the password keyboard for numeric -->
<!-- Default height of a key in the password keyboard for numeric (used by keyguard) -->
<dimen name="password_keyboard_key_height_numeric">56dip</dimen>
<!-- Default correction for the space key in the password keyboard -->
<!-- Default correction for the space key in the password keyboard (used by keyguard) -->
<dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
<!-- Default horizontal gap between keys in the password keyboard (used by keyguard) -->
<dimen name="password_keyboard_horizontalGap">3dip</dimen>
<!-- Default vertical gap between keys in the password keyboard (used by keyguard) -->
<dimen name="password_keyboard_verticalGap">9dip</dimen>
<!-- Default target placement radius for MultiWaveView -->
<dimen name="multiwaveview_target_placement_radius">135dip</dimen>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -19,7 +19,8 @@
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="33.33%p"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_numeric"
>

View File

@@ -22,8 +22,8 @@
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
android:horizontalGap="0px"
android:verticalGap="0px">
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap">
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"

View File

@@ -22,8 +22,8 @@
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
android:horizontalGap="0px"
android:verticalGap="0px">
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap">
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"

View File

@@ -22,8 +22,8 @@
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
android:horizontalGap="0px"
android:verticalGap="0px">
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap">
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha">
<Row android:keyWidth="8.272%p"

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -19,7 +19,8 @@
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="33.33%p"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_numeric"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>
</Keyboard>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>

View File

@@ -20,8 +20,8 @@
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:horizontalGap="@dimen/password_keyboard_horizontalGap"
android:verticalGap="@dimen/password_keyboard_verticalGap"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>