sysui: refactor for extensibility.
Add dimens for qs detail icons.
Bug: 28748510
Change-Id: Ic2e5d8948af6d081a2554139f9ffeec0c5946696
(cherry picked from commit cdaea618b5a4e28a336295cdc9abd30e018f6a4b)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
index 2dd4a0a..dad8bea 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
@@ -42,6 +42,7 @@
private static final String TAG = "QSDetailItems";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+ private final int mQsDetailIconOverlaySize;
private final Context mContext;
private final H mHandler = new H();
private final Adapter mAdapter = new Adapter();
@@ -60,6 +61,8 @@
super(context, attrs);
mContext = context;
mTag = TAG;
+ mQsDetailIconOverlaySize = (int) getResources().getDimension(
+ R.dimen.qs_detail_icon_overlay_size);
}
public static QSDetailItems convertOrInflate(Context context, View convert, ViewGroup parent) {
@@ -182,8 +185,7 @@
iv.setImageResource(item.icon);
iv.getOverlay().clear();
if (item.overlay != null) {
- item.overlay.setBounds(0, 0, item.overlay.getIntrinsicWidth(),
- item.overlay.getIntrinsicHeight());
+ item.overlay.setBounds(0, 0, mQsDetailIconOverlaySize, mQsDetailIconOverlaySize);
iv.getOverlay().add(item.overlay);
}
final TextView title = (TextView) view.findViewById(android.R.id.title);