summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2015-12-02 15:43:28 -0800
committerAdnan Begovic <adnan@cyngn.com>2015-12-07 15:24:07 -0800
commitd10e52b5754ed3b89d1ae737d512383b37cf55ed (patch)
tree3ff69a581b71b8db8492ceaeda312d0dbc7b2c9f /packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
parentd0199cf86871823d510d35890ab6ae1a891b2cbf (diff)
downloadframeworks_base-d10e52b5754ed3b89d1ae737d512383b37cf55ed.zip
frameworks_base-d10e52b5754ed3b89d1ae737d512383b37cf55ed.tar.gz
frameworks_base-d10e52b5754ed3b89d1ae737d512383b37cf55ed.tar.bz2
SystemUI: Move remove button impl to QSDragPanel.
Expose a few methods to make attaching listeners to objects in the detail adapter possible. Change-Id: Ic72f27f7db4323de4a7b45643230bd20f8c8b4b5
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSPanel.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanel.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 7d9b48b..1e6867d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -57,7 +57,6 @@ public class QSPanel extends ViewGroup {
protected final ArrayList<TileRecord> mRecords = new ArrayList<>();
protected View mDetail;
protected ViewGroup mDetailContent;
- protected TextView mDetailRemoveButton;
protected TextView mDetailSettingsButton;
protected TextView mDetailDoneButton;
protected View mBrightnessView;
@@ -95,10 +94,12 @@ public class QSPanel extends ViewGroup {
setupViews();
}
+ /**
+ * THIS IS OVERRIDDEN in QSDragPanel
+ */
protected void setupViews() {
mDetail = LayoutInflater.from(mContext).inflate(R.layout.qs_detail, this, false);
mDetailContent = (ViewGroup) mDetail.findViewById(android.R.id.content);
- mDetailRemoveButton = (TextView) mDetail.findViewById(android.R.id.button3);
mDetailSettingsButton = (TextView) mDetail.findViewById(android.R.id.button2);
mDetailDoneButton = (TextView) mDetail.findViewById(android.R.id.button1);
updateDetailText();
@@ -149,7 +150,6 @@ public class QSPanel extends ViewGroup {
protected void updateDetailText() {
mDetailDoneButton.setText(R.string.quick_settings_done);
mDetailSettingsButton.setText(R.string.quick_settings_more_settings);
- mDetailRemoveButton.setText(R.string.quick_settings_remove);
}
public void setBrightnessMirror(BrightnessMirrorController c) {
@@ -201,7 +201,6 @@ public class QSPanel extends ViewGroup {
super.onConfigurationChanged(newConfig);
FontSizeUtils.updateFontSize(mDetailDoneButton, R.dimen.qs_detail_button_text_size);
FontSizeUtils.updateFontSize(mDetailSettingsButton, R.dimen.qs_detail_button_text_size);
- FontSizeUtils.updateFontSize(mDetailRemoveButton, R.dimen.qs_detail_button_text_size);
// We need to poke the detail views as well as they might not be attached to the view
// hierarchy but reused at a later point.
@@ -408,7 +407,7 @@ public class QSPanel extends ViewGroup {
handleShowDetailImpl(r, show, x, y);
}
- protected final void handleShowDetailImpl(Record r, boolean show, int x, int y) {
+ protected void handleShowDetailImpl(Record r, boolean show, int x, int y) {
boolean visibleDiff = (mDetailRecord != null) != show;
if (!visibleDiff && mDetailRecord == r) return; // already in right state
DetailAdapter detailAdapter = null;
@@ -427,16 +426,6 @@ public class QSPanel extends ViewGroup {
}
});
- final StatusBarPanelCustomTile customTile = detailAdapter.getCustomTile();
- mDetailRemoveButton.setVisibility(customTile != null ? VISIBLE : GONE);
- mDetailRemoveButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- mHost.collapsePanels();
- mHost.removeCustomTile(customTile);
- }
- });
-
mDetailContent.removeAllViews();
mDetail.bringToFront();
mDetailContent.addView(r.detailView);