From de00b259e09ef9c1c6b79082776f6163dd148e6d Mon Sep 17 00:00:00 2001 From: Alexander Martinz Date: Wed, 27 Jan 2016 22:44:36 +0100 Subject: ProtectedApps: add up navigation and fix action bar icons * ProtectedApps has up navigation, but the lock pattern has not. I catch myself many times when trying to press the up arrow and noticing later on, that it is not there. * the drawable used as action bar icon is not white, tint it white and use it instead. TICKET: RM-208 Change-Id: Icdd24816af47b16efc38e4e8379811d412f50454 Signed-off-by: Alexander Martinz --- res/drawable/ic_lockscreen_ime_white.xml | 30 ++++++++++++++++++++++ res/drawable/ic_settings_lockscreen_white.xml | 29 +++++++++++++++++++++ res/values/cm_colors.xml | 3 +++ .../settings/applications/LockPatternActivity.java | 12 ++++++--- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 res/drawable/ic_lockscreen_ime_white.xml create mode 100644 res/drawable/ic_settings_lockscreen_white.xml diff --git a/res/drawable/ic_lockscreen_ime_white.xml b/res/drawable/ic_lockscreen_ime_white.xml new file mode 100644 index 0000000..9ea55c9 --- /dev/null +++ b/res/drawable/ic_lockscreen_ime_white.xml @@ -0,0 +1,30 @@ + + + + + + + \ No newline at end of file diff --git a/res/drawable/ic_settings_lockscreen_white.xml b/res/drawable/ic_settings_lockscreen_white.xml new file mode 100644 index 0000000..317b77a --- /dev/null +++ b/res/drawable/ic_settings_lockscreen_white.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/res/values/cm_colors.xml b/res/values/cm_colors.xml index fb761a7..4ed64af 100644 --- a/res/values/cm_colors.xml +++ b/res/values/cm_colors.xml @@ -89,4 +89,7 @@ limitations under the License. #DD2C00 #D7D7D7 + + + @android:color/white diff --git a/src/com/android/settings/applications/LockPatternActivity.java b/src/com/android/settings/applications/LockPatternActivity.java index a99aeb4..9ab51b5 100644 --- a/src/com/android/settings/applications/LockPatternActivity.java +++ b/src/com/android/settings/applications/LockPatternActivity.java @@ -139,7 +139,7 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese menu.clear(); if (!mCreate) { menu.add(0, MENU_RESET, 0, R.string.lockpattern_reset_button) - .setIcon(R.drawable.ic_lockscreen_ime) + .setIcon(R.drawable.ic_lockscreen_ime_white) .setAlphabeticShortcut('r') .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); @@ -158,6 +158,10 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese switchToAccount(); } return true; + case android.R.id.home: + setResult(RESULT_CANCELED); + finish(); + return true; default: return false; } @@ -175,7 +179,7 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese mPatternLockHeader.setText(mFingerPrintSetUp ? getResources().getString(R.string.pa_pattern_or_fingerprint_header) : getResources().getString(R.string.lockpattern_settings_enable_summary)); - mItem.setIcon(R.drawable.ic_lockscreen_ime); + mItem.setIcon(R.drawable.ic_lockscreen_ime_white); mAccountView.clearFocusOnInput(); mAccountView.setVisibility(View.GONE); mLockPatternView.setVisibility(View.VISIBLE); @@ -184,7 +188,7 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese private void switchToAccount() { mPatternLockHeader.setText(getResources() .getString(R.string.lockpattern_settings_reset_summary)); - mItem.setIcon(R.drawable.ic_settings_lockscreen); + mItem.setIcon(R.drawable.ic_settings_lockscreen_white); mAccountView.setVisibility(View.VISIBLE); mLockPatternView.setVisibility(View.GONE); } @@ -193,6 +197,8 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese super.onCreate(savedInstanceState); setContentView(R.layout.patternlock); + getActionBar().setDisplayHomeAsUpEnabled(true); + mPatternLockHeader = (TextView) findViewById(R.id.pattern_lock_header); mCancel = (Button) findViewById(R.id.pattern_lock_btn_cancel); mCancel.setOnClickListener(mCancelOnClickListener); -- cgit v1.1