Fix add network alignment
Bug: 26759951 Change-Id: I5ba657b5a4099d9f2f1ecf2f27a6a25908bc4a86
This commit is contained in:
29
res/drawable/ic_menu_add_inset.xml
Normal file
29
res/drawable/ic_menu_add_inset.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<inset
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:insetLeft="5dp">
|
||||||
|
<vector
|
||||||
|
android:width="24.0dp"
|
||||||
|
android:height="24.0dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0"
|
||||||
|
android:tint="?android:attr/colorAccent">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M19.0,13.0l-6.0,0.0l0.0,6.0l-2.0,0.0l0.0,-6.0L5.0,13.0l0.0,-2.0l6.0,0.0L11.0,5.0l2.0,0.0l0.0,6.0l6.0,0.0l0.0,2.0z"/>
|
||||||
|
</vector>
|
||||||
|
</inset>
|
@@ -180,11 +180,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
|||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
addPreferencesFromResource(R.xml.wifi_settings);
|
addPreferencesFromResource(R.xml.wifi_settings);
|
||||||
mAddPreference = new Preference(getContext());
|
mAddPreference = new Preference(getContext());
|
||||||
Drawable ic_add = getContext().getDrawable(R.drawable.ic_menu_add).mutate();
|
mAddPreference.setIcon(R.drawable.ic_menu_add_inset);
|
||||||
TypedValue tv = new TypedValue();
|
|
||||||
getContext().getTheme().resolveAttribute(android.R.attr.colorAccent, tv, true);
|
|
||||||
ic_add.setTint(getContext().getColor(tv.resourceId));
|
|
||||||
mAddPreference.setIcon(ic_add);
|
|
||||||
mAddPreference.setTitle(R.string.wifi_add_network);
|
mAddPreference.setTitle(R.string.wifi_add_network);
|
||||||
|
|
||||||
mUserBadgeCache = new AccessPointPreference.UserBadgeCache(getPackageManager());
|
mUserBadgeCache = new AccessPointPreference.UserBadgeCache(getPackageManager());
|
||||||
|
Reference in New Issue
Block a user