summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/layout/notification_2025_template_collapsed_base.xml10
-rw-r--r--core/res/res/layout/notification_2025_template_collapsed_call.xml10
-rw-r--r--core/res/res/layout/notification_2025_template_collapsed_media.xml10
-rw-r--r--core/res/res/layout/notification_2025_text.xml8
4 files changed, 8 insertions, 30 deletions
diff --git a/core/res/res/layout/notification_2025_template_collapsed_base.xml b/core/res/res/layout/notification_2025_template_collapsed_base.xml
index e9e3edbc86dd..dc6cf0457f4a 100644
--- a/core/res/res/layout/notification_2025_template_collapsed_base.xml
+++ b/core/res/res/layout/notification_2025_template_collapsed_base.xml
@@ -125,15 +125,7 @@
android:layout_marginBottom="@dimen/notification_2025_additional_margin"
android:minHeight="@dimen/notification_headerless_line_height"
>
- <!-- This is the simplest way to keep this text vertically centered without
- gravity="center_vertical" which causes jumpiness in expansion animations. -->
- <include
- layout="@layout/notification_2025_text"
- android:layout_width="match_parent"
- android:layout_height="@dimen/notification_text_height"
- android:layout_gravity="center_vertical"
- android:layout_marginTop="0dp"
- />
+ <include layout="@layout/notification_2025_text" />
</com.android.internal.widget.NotificationVanishingFrameLayout>
<include
diff --git a/core/res/res/layout/notification_2025_template_collapsed_call.xml b/core/res/res/layout/notification_2025_template_collapsed_call.xml
index ee691e4d6894..ba45e1ab07a1 100644
--- a/core/res/res/layout/notification_2025_template_collapsed_call.xml
+++ b/core/res/res/layout/notification_2025_template_collapsed_call.xml
@@ -128,15 +128,7 @@
android:layout_height="wrap_content"
android:minHeight="@dimen/notification_headerless_line_height"
>
- <!-- This is the simplest way to keep this text vertically centered without
- gravity="center_vertical" which causes jumpiness in expansion animations. -->
- <include
- layout="@layout/notification_2025_text"
- android:layout_width="match_parent"
- android:layout_height="@dimen/notification_text_height"
- android:layout_gravity="center_vertical"
- android:layout_marginTop="0dp"
- />
+ <include layout="@layout/notification_2025_text" />
</com.android.internal.widget.NotificationVanishingFrameLayout>
</LinearLayout>
diff --git a/core/res/res/layout/notification_2025_template_collapsed_media.xml b/core/res/res/layout/notification_2025_template_collapsed_media.xml
index 91a44221b4c4..8a91409bc4ce 100644
--- a/core/res/res/layout/notification_2025_template_collapsed_media.xml
+++ b/core/res/res/layout/notification_2025_template_collapsed_media.xml
@@ -126,15 +126,7 @@
android:layout_marginBottom="@dimen/notification_2025_additional_margin"
android:layout_height="@dimen/notification_headerless_line_height"
>
- <!-- This is the simplest way to keep this text vertically centered without
- gravity="center_vertical" which causes jumpiness in expansion animations. -->
- <include
- layout="@layout/notification_template_text"
- android:layout_width="match_parent"
- android:layout_height="@dimen/notification_text_height"
- android:layout_gravity="center_vertical"
- android:layout_marginTop="0dp"
- />
+ <include layout="@layout/notification_2025_text" />
</com.android.internal.widget.NotificationVanishingFrameLayout>
<include
diff --git a/core/res/res/layout/notification_2025_text.xml b/core/res/res/layout/notification_2025_text.xml
index 474f6d2099c6..a725de44b0bf 100644
--- a/core/res/res/layout/notification_2025_text.xml
+++ b/core/res/res/layout/notification_2025_text.xml
@@ -13,14 +13,16 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
+<!-- Note that we prefer layout_gravity="center_vertical" over gravity="center_vertical", since the
+ latter can cause jumpiness in expansion animations. -->
<com.android.internal.widget.ImageFloatingTextView
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/Widget.DeviceDefault.Notification.Text"
android:id="@+id/text"
android:layout_width="match_parent"
- android:layout_height="@dimen/notification_text_height"
- android:layout_gravity="top"
- android:layout_marginTop="@dimen/notification_text_margin_top"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/notification_text_height"
+ android:layout_gravity="center_vertical"
android:ellipsize="end"
android:fadingEdge="horizontal"
android:gravity="top"