diff options
12 files changed, 59 insertions, 85 deletions
diff --git a/packages/SettingsLib/res/drawable/ic_info.xml b/packages/SettingsLib/res/drawable/ic_info.xml new file mode 100644 index 000000000000..afe7e6b782ca --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_info.xml @@ -0,0 +1,25 @@ +<!-- + Copyright (C) 2016 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?android:attr/colorAccent"> + <path + android:fillColor="@android:color/white" + android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/> +</vector> diff --git a/packages/SettingsLib/res/drawable/ic_settings_lock_outline.xml b/packages/SettingsLib/res/drawable/ic_settings_lock_outline.xml deleted file mode 100644 index b3d7cf925ef2..000000000000 --- a/packages/SettingsLib/res/drawable/ic_settings_lock_outline.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2016 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. ---> - -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="21dp" - android:height="21dp" - android:viewportWidth="21.0" - android:viewportHeight="21.0" - android:tint="?android:attr/colorAccent"> - <path - android:fillColor="@android:color/white" - android:pathData="M8,16c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S6.9,16,8,16zM14,7h-1V5c0-2.8-2.2-5-5-5S3,2.2,3,5v2H2C0.9,7,0,7.9,0,9v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V9C16,7.9,15.1,7,14,7z M4.9,5c0-1.7,1.4-3.1,3.1-3.1s3.1,1.4,3.1,3.1v2H4.9V5z M14,19H2V9h12V19z" /> -</vector> diff --git a/packages/SettingsLib/res/layout/restricted_icon.xml b/packages/SettingsLib/res/layout/restricted_icon.xml index 227b6ebfc818..d57fb80c14b6 100644 --- a/packages/SettingsLib/res/layout/restricted_icon.xml +++ b/packages/SettingsLib/res/layout/restricted_icon.xml @@ -15,7 +15,7 @@ --> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/restricted_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_settings_lock_outline" + android:layout_width="@dimen/restricted_icon_size" + android:layout_height="@dimen/restricted_icon_size" + android:src="@drawable/ic_info" android:gravity="end|center_vertical" />
\ No newline at end of file diff --git a/packages/SettingsLib/res/layout/restricted_switch_widget.xml b/packages/SettingsLib/res/layout/restricted_switch_widget.xml index a132e747c7d5..618381203d05 100644 --- a/packages/SettingsLib/res/layout/restricted_switch_widget.xml +++ b/packages/SettingsLib/res/layout/restricted_switch_widget.xml @@ -16,9 +16,9 @@ <merge xmlns:android="http://schemas.android.com/apk/res/android"> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/restricted_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_settings_lock_outline" + android:layout_width="@dimen/restricted_icon_size" + android:layout_height="@dimen/restricted_icon_size" + android:src="@drawable/ic_info" android:gravity="end|center_vertical" /> <!-- Based off frameworks/base/core/res/res/layout/preference_widget_switch.xml --> <Switch xmlns:android="http://schemas.android.com/apk/res/android" diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml index 9f78e87d1231..c3b3cfc47bfd 100644 --- a/packages/SettingsLib/res/values/dimens.xml +++ b/packages/SettingsLib/res/values/dimens.xml @@ -33,8 +33,8 @@ <dimen name="user_spinner_item_height">56dp</dimen> <!-- Lock icon for preferences locked by admin --> - <dimen name="restricted_lock_icon_size">16dp</dimen> - <dimen name="restricted_lock_icon_padding">4dp</dimen> + <dimen name="restricted_icon_size">16dp</dimen> + <dimen name="restricted_icon_padding">4dp</dimen> <dimen name="wifi_preference_badge_padding">8dip</dimen> diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedDropDownPreference.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedDropDownPreference.java index c2f885dabe60..4c0450e38fa9 100644 --- a/packages/SettingsLib/src/com/android/settingslib/RestrictedDropDownPreference.java +++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedDropDownPreference.java @@ -49,7 +49,7 @@ public class RestrictedDropDownPreference extends DropDownPreference { mRestrictedPadlock = RestrictedLockUtils.getRestrictedPadlock(context); mRestrictedPadlockPadding = context.getResources().getDimensionPixelSize( - R.dimen.restricted_lock_icon_padding); + R.dimen.restricted_icon_padding); } private final OnItemSelectedListener mItemSelectedListener = new OnItemSelectedListener() { diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockImageSpan.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockImageSpan.java index e63130de6f4e..360a34c959f2 100644 --- a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockImageSpan.java +++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockImageSpan.java @@ -36,7 +36,7 @@ public class RestrictedLockImageSpan extends ImageSpan { mContext = context; mExtraPadding = mContext.getResources().getDimensionPixelSize( - R.dimen.restricted_lock_icon_padding); + R.dimen.restricted_icon_padding); mRestrictedPadlock = RestrictedLockUtils.getRestrictedPadlock(mContext); } @@ -53,7 +53,7 @@ public class RestrictedLockImageSpan extends ImageSpan { // Add extra padding before the padlock. float transX = x + mExtraPadding; - float transY = bottom - drawable.getBounds().bottom - paint.getFontMetricsInt().descent; + float transY = (bottom - drawable.getBounds().bottom) / 2.0f; canvas.translate(transX, transY); drawable.draw(canvas); diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java index 6d29c5f1a98e..d0c249f94740 100644 --- a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java @@ -49,9 +49,9 @@ public class RestrictedLockUtils { * @return drawables for displaying with settings that are locked by a device admin. */ public static Drawable getRestrictedPadlock(Context context) { - Drawable restrictedPadlock = context.getDrawable(R.drawable.ic_settings_lock_outline); + Drawable restrictedPadlock = context.getDrawable(R.drawable.ic_info); final int iconSize = context.getResources().getDimensionPixelSize( - R.dimen.restricted_lock_icon_size); + R.dimen.restricted_icon_size); restrictedPadlock.setBounds(0, 0, iconSize, iconSize); return restrictedPadlock; } diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java index 4280938de39c..0c0af243ff7b 100644 --- a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java +++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java @@ -54,7 +54,7 @@ public class RestrictedPreferenceHelper { mRestrictedPadlock = RestrictedLockUtils.getRestrictedPadlock(mContext); mRestrictedPadlockPadding = mContext.getResources().getDimensionPixelSize( - R.dimen.restricted_lock_icon_padding); + R.dimen.restricted_icon_padding); if (attrs != null) { final TypedArray attributes = context.obtainStyledAttributes(attrs, diff --git a/packages/SystemUI/res/drawable/ic_info.xml b/packages/SystemUI/res/drawable/ic_info.xml deleted file mode 100644 index 65e7bf5fa41d..000000000000 --- a/packages/SystemUI/res/drawable/ic_info.xml +++ /dev/null @@ -1,24 +0,0 @@ -<!-- -Copyright (C) 2014 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. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" - android:viewportHeight="24.0"> - <path - android:pathData="M12.000000,2.000000C6.500000,2.000000 2.000000,6.500000 2.000000,12.000000s4.500000,10.000000 10.000000,10.000000c5.500000,0.000000 10.000000,-4.500000 10.000000,-10.000000S17.500000,2.000000 12.000000,2.000000zM13.000000,17.000000l-2.000000,0.000000l0.000000,-6.000000l2.000000,0.000000L13.000000,17.000000zM13.000000,9.000000l-2.000000,0.000000L11.000000,7.000000l2.000000,0.000000L13.000000,9.000000z" - android:fillColor="#FFFFFF"/> -</vector> diff --git a/packages/SystemUI/res/layout/qs_tile_label.xml b/packages/SystemUI/res/layout/qs_tile_label.xml index 603ebbfc8ffb..b0dca9a66ddb 100644 --- a/packages/SystemUI/res/layout/qs_tile_label.xml +++ b/packages/SystemUI/res/layout/qs_tile_label.xml @@ -20,22 +20,22 @@ android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/tile_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/qs_tile_text" - android:gravity="center_horizontal" - android:minLines="2" - android:padding="0dp" - android:fontFamily="sans-serif-condensed" - android:textStyle="normal" - android:textSize="@dimen/qs_tile_text_size" - android:clickable="false" /> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/qs_tile_text" + android:gravity="center_horizontal" + android:minLines="2" + android:padding="0dp" + android:fontFamily="sans-serif-condensed" + android:textStyle="normal" + android:textSize="@dimen/qs_tile_text_size" + android:clickable="false" /> <ImageView android:id="@+id/restricted_padlock" - android:layout_width="@dimen/qs_tile_text_size" - android:layout_height="@dimen/qs_tile_text_size" - android:src="@drawable/ic_settings_lock_outline" - android:layout_marginLeft="@dimen/restricted_padlock_pading" - android:baselineAlignBottom="true" - android:scaleType="centerInside" - android:visibility="gone" /> + android:layout_width="@dimen/qs_tile_text_size" + android:layout_height="match_parent" + android:paddingBottom="@dimen/qs_tile_text_size" + android:src="@drawable/ic_info" + android:layout_marginLeft="@dimen/restricted_padlock_pading" + android:scaleType="centerInside" + android:visibility="gone" /> </LinearLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/qs_user_detail_item.xml b/packages/SystemUI/res/layout/qs_user_detail_item.xml index a22c3603632e..661d74a468e4 100644 --- a/packages/SystemUI/res/layout/qs_user_detail_item.xml +++ b/packages/SystemUI/res/layout/qs_user_detail_item.xml @@ -53,10 +53,10 @@ <ImageView android:id="@+id/restricted_padlock" android:layout_width="@dimen/qs_detail_item_secondary_text_size" - android:layout_height="@dimen/qs_detail_item_secondary_text_size" - android:src="@drawable/ic_settings_lock_outline" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:src="@drawable/ic_info" android:layout_marginLeft="@dimen/restricted_padlock_pading" - android:baselineAlignBottom="true" android:scaleType="centerInside" android:visibility="gone" /> </LinearLayout> |