diff options
author | Jason Monk <jmonk@google.com> | 2015-06-12 12:32:50 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-06-16 09:15:39 -0400 |
commit | 2cdafc6be386bb767404e42fc728a1a810aa896a (patch) | |
tree | d8b5dc9dc8ab39d0ec4721c800f14e3c413327de /src/com/android/settings/DataUsageSummary.java | |
parent | edb7b0d9a900a4a560d0777032600b52f38efd23 (diff) | |
download | packages_apps_Settings-2cdafc6be386bb767404e42fc728a1a810aa896a.zip packages_apps_Settings-2cdafc6be386bb767404e42fc728a1a810aa896a.tar.gz packages_apps_Settings-2cdafc6be386bb767404e42fc728a1a810aa896a.tar.bz2 |
Layout refinement for app lists
Make all app lists (or at least all current app lists) use the same
base layout for icon, label, and sizing/padding. This way they
should look the same.
Bug: 21727125
Bug: 21726922
Bug: 21853632
Change-Id: I3cffadb9e7b5184d4209deacd4ea70ec1d4f71b4
Diffstat (limited to 'src/com/android/settings/DataUsageSummary.java')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 744ed3f..a4ee961 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -1882,10 +1882,10 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable @Override public View getView(int position, View convertView, ViewGroup parent) { final AppItem item = mItems.get(position); + LayoutInflater inflater = LayoutInflater.from(parent.getContext()); if (getItemViewType(position) == 1) { if (convertView == null) { - convertView = Utils.inflateCategoryHeader(LayoutInflater.from( - parent.getContext()), parent); + convertView = Utils.inflateCategoryHeader(inflater, parent); } final TextView title = (TextView) convertView.findViewById(android.R.id.title); @@ -1893,8 +1893,9 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable } else { if (convertView == null) { - convertView = LayoutInflater.from(parent.getContext()).inflate( - R.layout.data_usage_item, parent, false); + convertView = inflater.inflate(R.layout.data_usage_item, parent, false); + inflater.inflate(R.layout.widget_progress_bar, + (ViewGroup) convertView.findViewById(android.R.id.widget_frame)); if (mInsetSide > 0) { convertView.setPaddingRelative(mInsetSide, 0, mInsetSide, 0); @@ -1903,7 +1904,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable final Context context = parent.getContext(); - final TextView text1 = (TextView) convertView.findViewById(android.R.id.text1); + final TextView summary = (TextView) convertView.findViewById(android.R.id.summary); final ProgressBar progress = (ProgressBar) convertView.findViewById( android.R.id.progress); @@ -1911,10 +1912,10 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable UidDetailTask.bindView(mProvider, item, convertView); if (item.restricted && item.total <= 0) { - text1.setText(R.string.data_usage_app_restricted); + summary.setText(R.string.data_usage_app_restricted); progress.setVisibility(View.GONE); } else { - text1.setText(Formatter.formatFileSize(context, item.total)); + summary.setText(Formatter.formatFileSize(context, item.total)); progress.setVisibility(View.VISIBLE); } |