Merge "Fix icon size for Data Usage / Battery Stats / Process Stats"
This commit is contained in:
committed by
Android (Google) Code Review
commit
bf4ea4bd8c
@@ -18,20 +18,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingTop="8dip"
|
||||
android:paddingBottom="8dip"
|
||||
android:columnCount="3">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/app_icon_size"
|
||||
android:layout_height="@dimen/app_icon_size"
|
||||
android:layout_width="@android:dimen/app_icon_size"
|
||||
android:layout_height="@android:dimen/app_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_rowSpan="3"
|
||||
android:layout_marginEnd="8dip"
|
||||
android:scaleType="centerInside"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<TextView
|
||||
|
@@ -16,7 +16,9 @@
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||
|
||||
<include layout="@layout/app_percentage_item" />
|
||||
|
||||
|
25
res/layout/preference_app_percentage.xml
Normal file
25
res/layout/preference_app_percentage.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||
|
||||
<include layout="@layout/app_percentage_item" />
|
||||
|
||||
</LinearLayout>
|
@@ -27,15 +27,15 @@
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="5dip"
|
||||
android:paddingBottom="5dip"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||
|
||||
<include layout="@layout/app_percentage_item" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Force stop and report buttons -->
|
||||
|
@@ -90,9 +90,6 @@
|
||||
<!-- Default text size for caption preview samples. Uses dp rather than sp because captions are not scaled. -->
|
||||
<dimen name="caption_preview_text_size">48dp</dimen>
|
||||
|
||||
<!-- Dashboard image tile size -->
|
||||
<dimen name="app_icon_size">24dp</dimen>
|
||||
|
||||
<!-- ActionBar height -->
|
||||
<dimen name="actionbar_size">56dip</dimen>
|
||||
|
||||
|
@@ -47,7 +47,7 @@ public class ProcessStatsPreference extends Preference {
|
||||
public ProcessStatsPreference(Context context, AttributeSet attrs, int defStyleAttr,
|
||||
int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
setLayoutResource(R.layout.app_percentage_item);
|
||||
setLayoutResource(R.layout.preference_app_percentage);
|
||||
}
|
||||
|
||||
public void init(Drawable icon, ProcStatsEntry entry) {
|
||||
|
@@ -37,7 +37,7 @@ public class PowerGaugePreference extends Preference {
|
||||
|
||||
public PowerGaugePreference(Context context, Drawable icon, BatteryEntry info) {
|
||||
super(context);
|
||||
setLayoutResource(R.layout.app_percentage_item);
|
||||
setLayoutResource(R.layout.preference_app_percentage);
|
||||
setIcon(icon != null ? icon : new ColorDrawable(0));
|
||||
mInfo = info;
|
||||
}
|
||||
|
Reference in New Issue
Block a user