diff options
| author | Selim Cinek <cinek@google.com> | 2014-05-20 02:27:17 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-20 02:27:17 +0000 |
| commit | 2f4a82af91faf76aa7dd59b22c1354f06410b634 (patch) | |
| tree | 1ebaa242f93ba0558825b713a56e6542981c413f /packages | |
| parent | e704324a01000cad912c3c637e6341dd82306763 (diff) | |
| parent | 863834bd96bdebcf21f4c4a7d8285d4858c061e4 (diff) | |
| download | frameworks_base-2f4a82af91faf76aa7dd59b22c1354f06410b634.zip frameworks_base-2f4a82af91faf76aa7dd59b22c1354f06410b634.tar.gz frameworks_base-2f4a82af91faf76aa7dd59b22c1354f06410b634.tar.bz2 | |
Merge "Fixed a big with the vetobutton, circumventing double tapping."
Diffstat (limited to 'packages')
3 files changed, 12 insertions, 2 deletions
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml index a401195..5fabd3e 100644 --- a/packages/SystemUI/res/layout/status_bar_notification_row.xml +++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml @@ -27,7 +27,7 @@ <Button android:id="@+id/veto" android:layout_width="48dp" - android:layout_height="8dp" + android:layout_height="0dp" android:gravity="end" android:layout_marginEnd="-80dp" android:background="@null" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java index 0f214a2..dc3d92a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java @@ -81,7 +81,8 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView AnimationUtils.loadInterpolator(context, android.R.interpolator.fast_out_slow_in); mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context, android.R.interpolator.linear_out_slow_in); - mMaxNotificationHeight = getResources().getDimensionPixelSize(R.dimen.notification_max_height); + mMaxNotificationHeight = getResources().getDimensionPixelSize( + R.dimen.notification_max_height); setClipChildren(false); setClipToPadding(false); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 48d1196..8f92a4c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -53,6 +53,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationContentView mPrivateLayout; private int mMaxExpandHeight; private boolean mIsBelowSpeedBump; + private View mVetoButton; public ExpandableNotificationRow(Context context, AttributeSet attrs) { super(context, attrs); @@ -63,6 +64,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { super.onFinishInflate(); mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic); mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded); + mVetoButton = findViewById(R.id.veto); } @Override @@ -256,4 +258,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void notifyContentUpdated() { mPrivateLayout.notifyContentUpdated(); } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + int newHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY); + mVetoButton.measure(widthMeasureSpec, newHeightSpec); + } } |
