From f852a42b0412decf701a001614048758eb1ccd6f Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 3 Jun 2016 13:33:43 -0700 Subject: [PATCH] Fix jittery action bar during transitions Fixes a bug where the action bar would get cut off slightly resulting in a bad transition when transforming between action bars that were correct and those that were cut off. Fixes: 28935363 Change-Id: I7d8eeb5e5fa545820a8979ea09816b330bdb384b --- core/java/android/app/Notification.java | 4 ++ .../notification_material_action_list.xml | 3 +- ...otification_template_material_big_base.xml | 72 ++++++++++--------- ...fication_template_material_big_picture.xml | 3 +- ...otification_template_material_big_text.xml | 4 +- .../notification_template_material_inbox.xml | 3 +- ...tification_template_material_messaging.xml | 3 +- core/res/res/values/symbols.xml | 1 + 8 files changed, 55 insertions(+), 38 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 456f592a45365..dc91f9b93fed3 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3393,6 +3393,8 @@ public class Notification implements Parcelable big.setTextViewText(R.id.notification_material_reply_text_2, null); big.setViewVisibility(R.id.notification_material_reply_text_3, View.GONE); big.setTextViewText(R.id.notification_material_reply_text_3, null); + + big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target, 0); } private RemoteViews applyStandardTemplateWithActions(int layoutId) { @@ -3415,6 +3417,8 @@ public class Notification implements Parcelable if (N > 0) { big.setViewVisibility(R.id.actions_container, View.VISIBLE); big.setViewVisibility(R.id.actions, View.VISIBLE); + big.setViewLayoutMarginBottomDimen(R.id.notification_action_list_margin_target, + R.dimen.notification_action_list_height); if (N>MAX_ACTION_BUTTONS) N=MAX_ACTION_BUTTONS; for (int i=0; i + android:layout_height="wrap_content" + android:layout_gravity="bottom"> - - - - - - - - + android:layout_gravity="top" + > + + + + + + + + + - - - + + - + diff --git a/core/res/res/layout/notification_template_material_big_picture.xml b/core/res/res/layout/notification_template_material_big_picture.xml index d87b9d90e48fd..83c0fec004b66 100644 --- a/core/res/res/layout/notification_template_material_big_picture.xml +++ b/core/res/res/layout/notification_template_material_big_picture.xml @@ -30,6 +30,7 @@ android:layout_marginTop="@dimen/notification_content_margin_top" android:clipToPadding="false" android:orientation="vertical" + android:id="@+id/notification_action_list_margin_target" > - + diff --git a/core/res/res/layout/notification_template_material_big_text.xml b/core/res/res/layout/notification_template_material_big_text.xml index 71600ef7b1345..f4f783ecc6fb3 100644 --- a/core/res/res/layout/notification_template_material_big_text.xml +++ b/core/res/res/layout/notification_template_material_big_text.xml @@ -24,10 +24,12 @@ @@ -61,7 +63,7 @@ android:id="@+id/notification_material_reply_container" android:layout_width="match_parent" android:layout_height="wrap_content" /> - + diff --git a/core/res/res/layout/notification_template_material_inbox.xml b/core/res/res/layout/notification_template_material_inbox.xml index 0e93d0bc16356..7820e39e777c6 100644 --- a/core/res/res/layout/notification_template_material_inbox.xml +++ b/core/res/res/layout/notification_template_material_inbox.xml @@ -23,6 +23,7 @@ > - + diff --git a/core/res/res/layout/notification_template_material_messaging.xml b/core/res/res/layout/notification_template_material_messaging.xml index d95ff056c22a6..07b1100ee93b6 100644 --- a/core/res/res/layout/notification_template_material_messaging.xml +++ b/core/res/res/layout/notification_template_material_messaging.xml @@ -22,6 +22,7 @@ > - + diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 2fbcdf2c56779..7e9b57c7a49b3 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2603,6 +2603,7 @@ +