diff options
author | Alexander Martinz <eviscerationls@gmail.com> | 2016-01-27 22:44:36 +0100 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2016-01-28 14:12:52 -0800 |
commit | de00b259e09ef9c1c6b79082776f6163dd148e6d (patch) | |
tree | 24bcf81275e558393a231ca1614ff2bd679cc98c | |
parent | 62d50cc0b38fd8154e7a40da7f35f0d1ba031d12 (diff) | |
download | packages_apps_Settings-de00b259e09ef9c1c6b79082776f6163dd148e6d.zip packages_apps_Settings-de00b259e09ef9c1c6b79082776f6163dd148e6d.tar.gz packages_apps_Settings-de00b259e09ef9c1c6b79082776f6163dd148e6d.tar.bz2 |
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 <eviscerationls@gmail.com>
-rw-r--r-- | res/drawable/ic_lockscreen_ime_white.xml | 30 | ||||
-rw-r--r-- | res/drawable/ic_settings_lockscreen_white.xml | 29 | ||||
-rw-r--r-- | res/values/cm_colors.xml | 3 | ||||
-rw-r--r-- | src/com/android/settings/applications/LockPatternActivity.java | 12 |
4 files changed, 71 insertions, 3 deletions
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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 The CyanogenMod 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:fillColor="@color/action_bar_icon_tint" + android:pathData="M20 5H4c-1.1 0-1.99 .9 -1.99 2L2 17c0 1.1 .9 2 2 2h16c1.1 0 2-.9 +2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 +3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 +7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z" /> + <path + android:pathData="M0 0h24v24H0zm0 0h24v24H0z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 The CyanogenMod 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:pathData="M0 0h24v24H0z" /> + <path + android:fillColor="@color/action_bar_icon_tint" + android:pathData="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 +3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 +2v10c0 1.1 .9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z" /> +</vector>
\ 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. <!-- BlackList colors --> <color name="blacklist_enabled">#DD2C00</color> <color name="blacklist_disabled">#D7D7D7</color> + + <!-- Action bar icons --> + <color name="action_bar_icon_tint">@android:color/white</color> </resources> 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); |