am e25c4d10: Merge "Fix 3339257: Update lockscreen keyboard to fit Holo theme" into honeycomb

* commit 'e25c4d1077071e33795ec0316b504f6cd2a0ba08':
  Fix 3339257: Update lockscreen keyboard to fit Holo theme
This commit is contained in:
Jim Miller
2011-01-19 20:18:40 -08:00
committed by Android Git Automerger
21 changed files with 456 additions and 187 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_bg_default_holo_dark" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_bg_disabled_holo_dark" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_bg_activated_holo_dark" />
<iten android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_bg_focused_holo_dark" />
<item android:state_enabled="true" android:drawable="@drawable/textfield_bg_default_holo_dark" />
<item android:state_focused="true" android:drawable="@drawable/textfield_bg_disabled_focused_holo_dark" />
<item android:drawable="@drawable/textfield_bg_disabled_holo_dark" />
</selector>

View File

@@ -20,76 +20,88 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
android:orientation="vertical">
<!-- left side: status -->
<RelativeLayout
android:layout_height="match_parent"
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_width="0dip">
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- left side: status -->
<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:paddingTop="50dip"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"/>
<!-- right side: password -->
<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">
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:gravity="center"
android:textSize="24sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="@drawable/lockscreen_password_field_dark"
android:textColor="#ffffffff"
/>
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="330dip"
android:layout_height="330dip"
android:background="#00000000"
android:layout_marginTop="5dip"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
</LinearLayout>
</RelativeLayout>
<!-- right side: password -->
<LinearLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:orientation="vertical"
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center">
/>
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="330dip"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center"
android:textSize="24sp"
android:layout_marginTop="120dip"
android:layout_marginBottom="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="@drawable/password_field_default"
android:textColor="#ffffffff"
/>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboardAlpha"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"
/>
<!-- Numeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="330dip"
android:layout_height="260dip"
android:background="#00000000"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
/>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboardAlpha"
android:layout_width="450dip"
android:layout_height="230dip"
android:background="#00000000"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
/>
<!-- emergency call button NOT CURRENTLY USED -->
<Button
android:id="@+id/emergencyCall"
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"
/>
<!-- emergency call button -->
<Button
android:id="@+id/emergencyCall"
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>

View File

@@ -56,7 +56,7 @@
android:layout_marginTop="120dip"
android:layout_marginBottom="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="@drawable/password_field_default"
android:background="@drawable/lockscreen_password_field_dark"
android:textColor="#ffffffff"
/>
@@ -69,7 +69,7 @@
/>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboardAlpha"
android:layout_width="450dip"
android:layout_width="match_parent"
android:layout_height="230dip"
android:background="#00000000"
android:keyBackground="@drawable/btn_keyboard_key_fulltrans"

View File

@@ -17,6 +17,9 @@
*/
-->
<resources>
<!-- Default height of a key in the password keyboard for alpha -->
<dimen name="password_keyboard_key_height_alpha">100dip</dimen>
<dimen name="password_keyboard_key_height_numeric">75dip</dimen>
<!-- Minimum width of the search view text entry area. -->
<dimen name="search_view_text_min_width">256dip</dimen>
</resources>

View File

@@ -24,15 +24,17 @@
<dimen name="status_bar_icon_size">32dip</dimen>
<!-- Size of the giant number (unread count) in the notifications -->
<dimen name="status_bar_content_number_size">48sp</dimen>
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<!-- Margin for permanent screen decorations at the bottom. -->
<dimen name="screen_margin_bottom">48dip</dimen>
<!-- Default height of a key in the password keyboard for alpha -->
<dimen name="password_keyboard_key_height_alpha">0.35in</dimen>
<dimen name="password_keyboard_key_height_alpha">75dip</dimen>
<!-- Default height of a key in the password keyboard for numeric -->
<dimen name="password_keyboard_key_height_numeric">0.47in</dimen>
<dimen name="password_keyboard_key_height_numeric">75dip</dimen>
<!-- keyboardHeight = key_height*4 + key_bottom_gap*3 -->
<dimen name="password_keyboard_height">48.0mm</dimen>
<!-- The width that is used when creating thumbnails of applications. -->
<dimen name="thumbnail_width">230dp</dimen>

View File

@@ -2,7 +2,7 @@
<!--
/*
**
** Copyright 2008, The Android Open Source Project
** Copyright 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.
@@ -19,26 +19,15 @@
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>
android:horizontalGap="0px"
android:verticalGap="0px">
<Row android:rowEdgeFlags="top">
<Key android:keyLabel="1" android:keyEdgeFlags="left"/>
<Key android:keyLabel="2"/>
<Key android:keyLabel="3"/>
<Key android:keyLabel="4"/>
<Key android:keyLabel="5"/>
<Key android:keyLabel="6"/>
<Key android:keyLabel="7"/>
<Key android:keyLabel="8"/>
<Key android:keyLabel="9"/>
<Key android:keyLabel="0" android:keyEdgeFlags="right"/>
</Row>
<Row>
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"
android:codes="9"/>
<Key android:keyLabel="q" android:keyEdgeFlags="left"/>
<Key android:keyLabel="w"/>
<Key android:keyLabel="e"/>
@@ -48,12 +37,21 @@
<Key android:keyLabel="u"/>
<Key android:keyLabel="i"/>
<Key android:keyLabel="o"/>
<Key android:keyLabel="p" android:keyEdgeFlags="right"/>
<Key android:keyLabel="p"/>
<Key android:keyIcon="@drawable/sym_keyboard_delete"
android:codes="-5"
android:keyWidth="9.331%p"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true"
android:keyEdgeFlags="right"/>
</Row>
<Row>
<Key android:keyLabel="a" android:horizontalGap="5%p"
<Row android:keyWidth="8.157%p">
<Key android:codes="-2"
android:keyLabel="@string/password_keyboard_label_symbol_key"
android:keyWidth="11.167%p"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="a"/>
<Key android:keyLabel="s"/>
<Key android:keyLabel="d"/>
<Key android:keyLabel="f"/>
@@ -61,14 +59,22 @@
<Key android:keyLabel="h"/>
<Key android:keyLabel="j"/>
<Key android:keyLabel="k"/>
<Key android:keyLabel="l" android:keyEdgeFlags="right"/>
<Key android:keyLabel="l"/>
<Key android:codes="10"
android:keyIcon="@drawable/sym_keyboard_ok"
android:iconPreview="@drawable/sym_keyboard_feedback_ok"
android:keyWidth="15.750%p"
android:keyEdgeFlags="right"/>
</Row>
<Row>
<Key android:codes="-1" android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="15%p" android:isModifier="true"
<Row android:keyWidth="8.042%p">
<Key android:codes="-1"
android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="15.192%p"
android:isModifier="true"
android:iconPreview="@drawable/sym_keyboard_feedback_shift"
android:isSticky="true" android:keyEdgeFlags="left"/>
android:isSticky="true"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="z"/>
<Key android:keyLabel="x"/>
<Key android:keyLabel="c"/>
@@ -76,26 +82,26 @@
<Key android:keyLabel="b"/>
<Key android:keyLabel="n"/>
<Key android:keyLabel="m"/>
<Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete"
android:keyWidth="15%p" android:keyEdgeFlags="right"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true"/>
<Key android:keyLabel="," />
<Key android:keyLabel="." />
<Key android:codes="-1"
android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="12.530%p"
android:isModifier="true"
android:iconPreview="@drawable/sym_keyboard_feedback_shift"
android:isSticky="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyboardMode="@+id/mode_normal" android:rowEdgeFlags="bottom">
<Key android:codes="-2" android:keyLabel="@string/password_keyboard_label_symbol_key"
android:keyWidth="20%p" android:keyEdgeFlags="left"/>
<Key android:keyLabel="," />
<Key android:keyLabel="-" />
<Key android:codes="32" android:keyIcon="@drawable/sym_keyboard_space"
<Row android:keyWidth="8.042%p"
android:keyboardMode="@+id/mode_normal">
<Key android:keyLabel="/" android:horizontalGap="24.126%p"/>
<Key android:codes="32"
android:keyIcon="@drawable/sym_keyboard_space"
android:iconPreview="@drawable/sym_keyboard_feedback_space"
android:keyWidth="20%p"/>
<Key android:keyLabel="=" />
<Key android:keyLabel="."
android:keyWidth="10%p"/>
<Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok"
android:iconPreview="@drawable/sym_keyboard_feedback_ok"
android:keyWidth="20%p" android:keyEdgeFlags="right"/>
android:keyWidth="37.454%p"/>
<Key android:keyLabel="'" />
<Key android:keyLabel="-" />
</Row>
</Keyboard>

View File

@@ -2,7 +2,7 @@
<!--
/*
**
** Copyright 2008, The Android Open Source Project
** Copyright 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.
@@ -19,82 +19,89 @@
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
>
android:horizontalGap="0px"
android:verticalGap="0px">
<Row android:rowEdgeFlags="top">
<Key android:keyLabel="\@" android:keyEdgeFlags="left"/>
<Key android:keyLabel="\#"/>
<Key android:keyLabel="$"/>
<Key android:keyLabel="%"/>
<Key android:keyLabel="&amp;"/>
<Key android:keyLabel="*"/>
<Key android:keyLabel="-"/>
<Key android:keyLabel="+"/>
<Key android:keyLabel="("/>
<Key android:keyLabel=")" android:keyEdgeFlags="right"/>
</Row>
<Row>
<Key android:keyLabel="q" android:keyEdgeFlags="left"/>
<Key android:keyLabel="w"/>
<Key android:keyLabel="e"/>
<Key android:keyLabel="r"/>
<Key android:keyLabel="t"/>
<Key android:keyLabel="y"/>
<Key android:keyLabel="u"/>
<Key android:keyLabel="i"/>
<Key android:keyLabel="o"/>
<Key android:keyLabel="p" android:keyEdgeFlags="right"/>
</Row>
<Row>
<Key android:keyLabel="a" android:horizontalGap="5%p"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="s"/>
<Key android:keyLabel="d"/>
<Key android:keyLabel="f"/>
<Key android:keyLabel="g"/>
<Key android:keyLabel="h"/>
<Key android:keyLabel="j"/>
<Key android:keyLabel="k"/>
<Key android:keyLabel="l" android:keyEdgeFlags="right"/>
</Row>
<Row>
<Key android:codes="-1" android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="15%p" android:isModifier="true"
android:iconPreview="@drawable/sym_keyboard_feedback_shift"
android:isSticky="true" android:keyEdgeFlags="left"/>
<Key android:keyLabel="z"/>
<Key android:keyLabel="x"/>
<Key android:keyLabel="c"/>
<Key android:keyLabel="v"/>
<Key android:keyLabel="b"/>
<Key android:keyLabel="n"/>
<Key android:keyLabel="m"/>
<Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete"
android:keyWidth="15%p" android:keyEdgeFlags="right"
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"
android:codes="9"/>
<Key android:keyLabel="Q" android:keyEdgeFlags="left"/>
<Key android:keyLabel="W"/>
<Key android:keyLabel="E"/>
<Key android:keyLabel="R"/>
<Key android:keyLabel="T"/>
<Key android:keyLabel="Y"/>
<Key android:keyLabel="U"/>
<Key android:keyLabel="I"/>
<Key android:keyLabel="O"/>
<Key android:keyLabel="P"/>
<Key android:keyIcon="@drawable/sym_keyboard_delete"
android:codes="-5"
android:keyWidth="9.331%p"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true"/>
android:isRepeatable="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyboardMode="@+id/mode_normal" android:rowEdgeFlags="bottom">
<Key android:codes="-2" android:keyLabel="@string/password_keyboard_label_symbol_key"
android:keyWidth="20%p" android:keyEdgeFlags="left"/>
<Key android:keyLabel="," />
<Key android:keyLabel="_" />
<Key android:codes="32" android:keyIcon="@drawable/sym_keyboard_space"
android:iconPreview="@drawable/sym_keyboard_feedback_space"
android:keyWidth="20%p"/>
<Key android:keyLabel="+" />
<Key android:keyLabel="."/>
<Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok"
<Row android:keyWidth="8.157%p">
<Key android:codes="-2"
android:keyLabel="@string/password_keyboard_label_symbol_key"
android:keyWidth="11.167%p"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="A"/>
<Key android:keyLabel="S"/>
<Key android:keyLabel="D"/>
<Key android:keyLabel="F"/>
<Key android:keyLabel="G"/>
<Key android:keyLabel="H"/>
<Key android:keyLabel="J"/>
<Key android:keyLabel="K"/>
<Key android:keyLabel="L"/>
<Key android:codes="10"
android:keyIcon="@drawable/sym_keyboard_ok"
android:iconPreview="@drawable/sym_keyboard_feedback_ok"
android:keyWidth="20%p" android:keyEdgeFlags="right"/>
android:keyWidth="15.750%p"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.042%p">
<Key android:codes="-1"
android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="15.192%p"
android:isModifier="true"
android:iconPreview="@drawable/sym_keyboard_feedback_shift"
android:isSticky="true"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="Z"/>
<Key android:keyLabel="X"/>
<Key android:keyLabel="C"/>
<Key android:keyLabel="V"/>
<Key android:keyLabel="B"/>
<Key android:keyLabel="N"/>
<Key android:keyLabel="M"/>
<Key android:keyLabel="!" />
<Key android:keyLabel="\?" />
<Key android:codes="-1"
android:keyIcon="@drawable/sym_keyboard_shift"
android:keyWidth="12.530%p"
android:isModifier="true"
android:iconPreview="@drawable/sym_keyboard_feedback_shift"
android:isSticky="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.042%p"
android:keyboardMode="@+id/mode_normal">
<Key android:keyLabel="\@" android:horizontalGap="24.126%p"/>
<Key android:codes="32"
android:keyIcon="@drawable/sym_keyboard_space"
android:iconPreview="@drawable/sym_keyboard_feedback_space"
android:keyWidth="37.454%p"/>
<Key android:keyLabel="&quot;" />
<Key android:keyLabel="_" />
</Row>
</Keyboard>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 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.
*/
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="8.272%p"
keyboardHeight="@dimen/password_keyboard_height"
android:keyHeight="@dimen/password_keyboard_key_height_alpha"
android:horizontalGap="0px"
android:verticalGap="0px">
<Row android:keyWidth="8.272%p">
<Key android:keyLabel="Tab"
android:codes="9"/>
<Key android:keyLabel="1" android:keyEdgeFlags="left"/>
<Key android:keyLabel="2"/>
<Key android:keyLabel="3"/>
<Key android:keyLabel="4"/>
<Key android:keyLabel="5"/>
<Key android:keyLabel="6"/>
<Key android:keyLabel="7"/>
<Key android:keyLabel="8"/>
<Key android:keyLabel="9"/>
<Key android:keyLabel="0"/>
<Key android:keyIcon="@drawable/sym_keyboard_delete"
android:codes="-5"
android:keyWidth="9.331%p"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.157%p">
<Key android:codes="-2"
android:keyLabel="@string/password_keyboard_label_alpha_key"
android:keyWidth="11.167%p"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="\#"/>
<Key android:keyLabel="$"/>
<Key android:keyLabel="%"/>
<Key android:keyLabel="&amp;"/>
<Key android:keyLabel="*"/>
<Key android:keyLabel="-"/>
<Key android:keyLabel="+"/>
<Key android:keyLabel="("/>
<Key android:keyLabel=")"/>
<Key android:codes="10"
android:keyIcon="@drawable/sym_keyboard_ok"
android:iconPreview="@drawable/sym_keyboard_feedback_ok"
android:keyWidth="15.750%p"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.042%p">
<Key android:codes="-1"
android:keyLabel="@string/password_keyboard_label_alt_key"
android:keyWidth="15.192%p"
android:isModifier="true"
android:isSticky="true"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="&lt;"/>
<Key android:keyLabel="&gt;"/>
<Key android:keyLabel="="/>
<Key android:keyLabel=":"/>
<Key android:keyLabel=";"/>
<Key android:keyLabel=","/>
<Key android:keyLabel="."/>
<Key android:keyLabel="!" />
<Key android:keyLabel="\?" />
<Key android:codes="-1"
android:keyLabel="@string/password_keyboard_label_alt_key"
android:keyWidth="12.530%p"
android:isModifier="true"
android:isSticky="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.042%p">
<Key android:keyLabel="\@" android:horizontalGap="16.084%p"/>
<Key android:keyLabel="/" />
<Key android:codes="32"
android:keyIcon="@drawable/sym_keyboard_space"
android:iconPreview="@drawable/sym_keyboard_feedback_space"
android:keyWidth="37.454%p"/>
<Key android:keyLabel="\'" />
<Key android:keyLabel="-" />
</Row>
</Keyboard>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 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.
*/
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyHeight="@dimen/password_keyboard_key_height_alpha">
<Row android:keyWidth="8.272%p"
android:rowEdgeFlags="top">
<Key android:keyLabel="Tab" android:codes="9"/>
<Key android:keyLabel="~" />
<Key android:keyLabel="`" />
<Key android:keyLabel="|" />
<Key android:keyLabel="•" />
<Key android:keyLabel="√" />
<Key android:keyLabel="π" />
<Key android:keyLabel="÷" />
<Key android:keyLabel="×" />
<Key android:keyLabel="§" />
<Key android:keyLabel="Δ" />
<Key android:keyIcon="@drawable/sym_keyboard_delete"
android:codes="-5"
android:keyWidth="9.331%p"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.157%p">
<Key android:codes="-2"
android:keyLabel="@string/password_keyboard_label_alpha_key"
android:keyWidth="11.167%p"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="£" />
<Key android:keyLabel="¢" />
<Key android:keyLabel="€" />
<Key android:keyLabel="¥" />
<Key android:keyLabel="^"/>
<Key android:keyLabel="°" />
<Key android:keyLabel="±" />
<Key android:keyLabel="{" />
<Key android:keyLabel="}" />
<Key android:codes="10"
android:keyIcon="@drawable/sym_keyboard_ok"
android:iconPreview="@drawable/sym_keyboard_feedback_ok"
android:keyWidth="15.750%p"
android:keyEdgeFlags="right"/>
</Row>
<Row android:keyWidth="8.042%p">
<Key android:codes="-1"
android:keyLabel="@string/password_keyboard_label_alt_key"
android:keyWidth="15.192%p"
android:isModifier="true"
android:isSticky="true"
android:keyEdgeFlags="left"/>
<Key android:keyLabel="\\" />
<Key android:keyLabel="©" />
<Key android:keyLabel="®" />
<Key android:keyLabel="™" />
<Key android:keyLabel="℅" />
<Key android:keyLabel="[" />
<Key android:keyLabel="]" />
<Key android:keyLabel="¡" />
<Key android:keyLabel="¿" />
<Key android:codes="-1"
android:keyLabel="@string/password_keyboard_label_alt_key"
android:keyWidth="12.530%p"
android:isModifier="true"
android:isSticky="true"
android:keyEdgeFlags="right"/>
</Row>
<!-- This row is intentionally not marked as a bottom row -->
<Row android:keyWidth="8.042%p">
<Key android:codes="32" android:horizontalGap="32.168%p"
android:keyIcon="@drawable/sym_keyboard_space"
android:iconPreview="@drawable/sym_keyboard_feedback_space"
android:keyWidth="37.454%p"/>
</Row>
</Keyboard>

View File

@@ -100,17 +100,27 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
|| DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == quality
|| DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == quality;
// TODO: re-enable on phones with keyboards
final boolean isPhysicalKbShowing = false;
mKeyboardView = (PasswordEntryKeyboardView) findViewById(R.id.keyboard);
mKeyboardViewAlpha = (PasswordEntryKeyboardView) findViewById(R.id.keyboardAlpha);
mPasswordEntry = (EditText) findViewById(R.id.passwordEntry);
mPasswordEntry.setOnEditorActionListener(this);
mPasswordEntry.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (mIsAlpha && !isPhysicalKbShowing) {
mKeyboardViewAlpha.setVisibility(
mKeyboardViewAlpha.getVisibility() == View.VISIBLE
? View.GONE : View.VISIBLE);
mCallback.pokeWakelock();
}
}
});
mEmergencyCallButton = (Button) findViewById(R.id.emergencyCall);
mEmergencyCallButton.setOnClickListener(this);
mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
mKeyboardHelper = new PasswordEntryKeyboardHelper(context, mKeyboardView, this, false);
// TODO: re-enable on phones with keyboards
boolean isPhysicalKbShowing = false;
//mCreationHardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;
if (mKeyboardViewAlpha == null || !mIsAlpha) {
mKeyboardHelper.setKeyboardMode(mIsAlpha ?
@@ -123,24 +133,21 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
mKeyboardHelper.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
mKeyboardHelperAlpha.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA);
mKeyboardView.setVisibility(View.GONE);
mKeyboardViewAlpha.setVisibility(isPhysicalKbShowing ? View.INVISIBLE : View.VISIBLE);
mPasswordEntry.setWidth(mKeyboardViewAlpha.getLayoutParams().width);
}
mPasswordEntry.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0,
0, 0);
mPasswordEntry.requestFocus();
// This allows keyboards with overlapping qwerty/numeric keys to choose just the
// numeric keys.
if (mIsAlpha) {
mPasswordEntry.setKeyListener(TextKeyListener.getInstance());
mStatusView.setHelpMessage(R.string.keyguard_password_enter_password_code,
StatusView.LOCK_ICON);
// mStatusView.setHelpMessage(R.string.keyguard_password_enter_password_code,
// StatusView.LOCK_ICON);
} else {
mPasswordEntry.setKeyListener(DigitsKeyListener.getInstance());
mStatusView.setHelpMessage(R.string.keyguard_password_enter_pin_code,
StatusView.LOCK_ICON);
//mStatusView.setHelpMessage(R.string.keyguard_password_enter_pin_code,
// StatusView.LOCK_ICON);
}
mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ?