summaryrefslogtreecommitdiffstats
path: root/core/res
diff options
context:
space:
mode:
authorGeoffrey Borggaard <geoffreyb@google.com>2013-08-28 22:13:10 -0400
committerGeoffrey Borggaard <geoffreyb@google.com>2013-08-30 23:02:10 +0000
commit8135f3a9d306f5cd23c1a4f86c86a577060487c3 (patch)
tree7c79cdafde363e5669920cc2f98166b86b67c884 /core/res
parent6627e5b2aef2783cfa505a48195d7b8153eda25c (diff)
downloadframeworks_base-8135f3a9d306f5cd23c1a4f86c86a577060487c3.zip
frameworks_base-8135f3a9d306f5cd23c1a4f86c86a577060487c3.tar.gz
frameworks_base-8135f3a9d306f5cd23c1a4f86c86a577060487c3.tar.bz2
UX improvements to the restrictions PIN
As per Rachel. Remove the title, change the hint text. Don't make the dialog disappear after failed attempts. Bug: 10542734 Change-Id: I1cae3d74bd4da06364626d63faf945f629cf6537
Diffstat (limited to 'core/res')
-rw-r--r--core/res/res/layout/restrictions_pin_challenge.xml81
-rw-r--r--core/res/res/values/strings.xml10
-rw-r--r--core/res/res/values/symbols.xml6
3 files changed, 69 insertions, 28 deletions
diff --git a/core/res/res/layout/restrictions_pin_challenge.xml b/core/res/res/layout/restrictions_pin_challenge.xml
index 954af92..f41924c 100644
--- a/core/res/res/layout/restrictions_pin_challenge.xml
+++ b/core/res/res/layout/restrictions_pin_challenge.xml
@@ -18,42 +18,73 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="48dp"
- android:layout_marginBottom="48dp"
android:overScrollMode="ifContentScrolls">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="8dip"
android:orientation="vertical">
-
- <TextView android:id="@+id/pin_message"
- style="?android:attr/textAppearanceMedium"
- android:layout_marginTop="16dp"
- android:layout_marginBottom="16dp"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/restr_pin_create_pin"
- android:textColor="?android:attr/textColorSecondary" />
+ android:padding="8dip"
+ android:orientation="vertical">
- <EditText android:id="@+id/pin_text"
- style="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="16dp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/restr_pin_enter_pin"
- android:inputType="numberPassword"
- android:textColor="?android:attr/textColorPrimary" />
+ <EditText android:id="@+id/pin_text"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:layout_marginRight="8dip"
+ android:layout_marginEnd="8dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberPassword"
+ android:textColor="?android:attr/textColorPrimary" />
- <TextView android:id="@+id/pin_error_message"
- style="?android:attr/textAppearanceSmall"
- android:layout_marginBottom="16dp"
+ <TextView android:id="@+id/pin_error_message"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/restr_pin_incorrect"
+ android:gravity="center"/>
+ </LinearLayout>
+
+ <LinearLayout android:id="@+id/buttonPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/restr_pin_error_doesnt_match"
- android:textColor="#FFFF0000" />
-
+ android:minHeight="@dimen/alert_dialog_button_bar_height"
+ android:orientation="vertical"
+ android:divider="?android:attr/dividerHorizontal"
+ android:showDividers="beginning"
+ android:dividerPadding="0dip">
+ <LinearLayout
+ style="?android:attr/buttonBarStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layoutDirection="locale"
+ android:measureWithLargestChild="true">
+ <Button android:id="@+id/pin_cancel_button"
+ android:layout_width="wrap_content"
+ android:layout_gravity="start"
+ android:layout_weight="1"
+ android:maxLines="2"
+ android:minHeight="@dimen/alert_dialog_button_bar_height"
+ style="?android:attr/buttonBarButtonStyle"
+ android:textSize="14sp"
+ android:layout_height="wrap_content"
+ android:text="@string/cancel" />
+ <Button android:id="@+id/pin_ok_button"
+ android:layout_width="wrap_content"
+ android:layout_gravity="end"
+ android:layout_weight="1"
+ android:maxLines="2"
+ style="?android:attr/buttonBarButtonStyle"
+ android:textSize="14sp"
+ android:minHeight="@dimen/alert_dialog_button_bar_height"
+ android:layout_height="wrap_content"
+ android:text="@string/ok" />
+ </LinearLayout>
+ </LinearLayout>
</LinearLayout>
-
</ScrollView>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 4b32e2b..f5f9bf6 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4296,8 +4296,12 @@
<!-- Print fail reason: unknown. [CHAR LIMIT=25] -->
<string name="reason_unknown">unknown</string>
+ <!-- PIN entry dialog title for entering the administrator PIN [CHAR LIMIT=none] -->
+ <string name="restr_pin_enter_admin_pin">Enter administrator PIN</string>
<!-- PIN entry dialog label/hint for PIN [CHAR LIMIT=none] -->
<string name="restr_pin_enter_pin">Enter PIN</string>
+ <!-- PIN entry dialog label/hint for incorrect PIN entry [CHAR LIMIT=none] -->
+ <string name="restr_pin_incorrect">Incorrect</string>
<!-- PIN entry dialog label/hint for old PIN [CHAR LIMIT=none] -->
<string name="restr_pin_enter_old_pin">Current PIN</string>
<!-- PIN entry dialog label for new PIN [CHAR LIMIT=none] -->
@@ -4313,9 +4317,11 @@
<!-- PIN entry dialog countdown message for next chance to enter the PIN [CHAR LIMIT=none] -->
<!-- Phrase describing a time duration using seconds [CHAR LIMIT=16] -->
<plurals name="restr_pin_countdown">
- <item quantity="one">Incorrect PIN. Try again in 1 second.</item>
- <item quantity="other">Incorrect PIN. Try again in <xliff:g id="count">%d</xliff:g> seconds.</item>
+ <item quantity="one">Try again in 1 second</item>
+ <item quantity="other">Try again in <xliff:g id="count">%d</xliff:g> seconds</item>
</plurals>
+ <!-- PIN entry dialog tells the user to not enter a PIN for a while. [CHAR LIMIT=none] -->
+ <string name="restr_pin_try_later">Try again later</string>
<!-- Toast bar message when hiding the transient navigation bar [CHAR LIMIT=35] -->
<string name="transient_navigation_confirmation">Swipe edge of screen to reveal bar</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index f008b10..448b50c 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -212,7 +212,8 @@
<java-symbol type="id" name="sms_short_code_remember_undo_instruction" />
<java-symbol type="id" name="breadcrumb_section" />
<java-symbol type="id" name="action_bar_spinner" />
- <java-symbol type="id" name="pin_message" />
+ <java-symbol type="id" name="pin_cancel_button" />
+ <java-symbol type="id" name="pin_ok_button" />
<java-symbol type="id" name="pin_text" />
<java-symbol type="id" name="pin_new_text" />
<java-symbol type="id" name="pin_confirm_text" />
@@ -870,7 +871,10 @@
<java-symbol type="string" name="mediaSize_na_ledger" />
<java-symbol type="string" name="mediaSize_na_tabloid" />
<java-symbol type="string" name="reason_unknown" />
+ <java-symbol type="string" name="restr_pin_enter_admin_pin" />
<java-symbol type="string" name="restr_pin_enter_pin" />
+ <java-symbol type="string" name="restr_pin_incorrect" />
+ <java-symbol type="string" name="restr_pin_try_later" />
<java-symbol type="string" name="write_fail_reason_cancelled" />
<java-symbol type="string" name="write_fail_reason_cannot_write" />
<java-symbol type="string" name="transient_navigation_confirmation" />