Messaging: Fix indicated issues in layouts

Follow AS recommendations

Change-Id: I7a5241651ccd3fd5ea5efce44db848e3bc3a1c12
This commit is contained in:
Michael W
2024-12-26 15:54:37 +01:00
parent bd46716d1a
commit 2a09fa3cb9
10 changed files with 19 additions and 14 deletions
+1 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -21,7 +22,6 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pending_item_view" android:id="@+id/pending_item_view"
android:layout_width="@dimen/pending_attachment_size" android:layout_width="@dimen/pending_attachment_size"
android:layout_height="@dimen/pending_attachment_size" android:layout_height="@dimen/pending_attachment_size"
+3 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -87,7 +88,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal"
android:baselineAligned="false">
<!-- Contains compose message bubble and character counter for SMS or attachments size <!-- Contains compose message bubble and character counter for SMS or attachments size
for MMS which should be left aligned --> for MMS which should be left aligned -->
+2 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -70,7 +71,7 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/contact_name" android:id="@+id/contact_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingBottom="4dp" android:paddingBottom="4dp"
+2 -2
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -24,14 +25,13 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<!-- This FrameLayout will take all available height (excluding media picker) <!-- This FrameLayout will take all available height (excluding media picker)
but setting height to 0dp causes it not to shrink properly in KK, so a height of match_parent but setting height to 0dp causes it not to shrink properly in KK, so a height of match_parent
works equally well --> works equally well -->
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
android:layout_weight="1" > android:layout_weight="1" >
<!-- Message list --> <!-- Message list -->
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
+3 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -66,7 +67,8 @@
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:clipToPadding="false" android:clipToPadding="false"
android:duplicateParentState="true" android:duplicateParentState="true"
android:padding="@dimen/conversation_list_item_view_padding"> android:padding="@dimen/conversation_list_item_view_padding"
android:baselineAligned="false">
<!-- Contact avatar on the left side of the view --> <!-- Contact avatar on the left side of the view -->
<FrameLayout <FrameLayout
+1 -1
View File
@@ -45,7 +45,7 @@
android:src="@drawable/ic_person_light" android:src="@drawable/ic_person_light"
android:scaleX="1.33" android:scaleX="1.33"
android:scaleY="1.33" android:scaleY="1.33"
android:tint="@color/primary_color" app:tint="@color/primary_color"
android:importantForAccessibility="no" android:importantForAccessibility="no"
android:contentDescription="@null" /> android:contentDescription="@null" />
</FrameLayout> </FrameLayout>
+1 -2
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -65,7 +66,6 @@
android:layout_marginTop="-2dp" android:layout_marginTop="-2dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dip" android:layout_height="0dip"
android:layout_weight="1"
android:drawSelectorOnTop="true" android:drawSelectorOnTop="true"
android:transcriptMode="alwaysScroll" android:transcriptMode="alwaysScroll"
android:stackFromBottom="true" android:stackFromBottom="true"
@@ -78,7 +78,6 @@
android:layout_above="@+id/bottom_line" android:layout_above="@+id/bottom_line"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dip" android:layout_height="0dip"
android:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_vertical" android:gravity="center_vertical"
android:visibility="gone" android:visibility="gone"
+2 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The Android Open Source Project Copyright (C) 2015 The Android Open Source Project
Copyright (C) 2024 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -33,7 +34,7 @@
style="@style/WidgetConversationListItemAvatar" style="@style/WidgetConversationListItemAvatar"
android:layout_width="@dimen/contact_icon_view_normal_size" android:layout_width="@dimen/contact_icon_view_normal_size"
android:layout_height="@dimen/contact_icon_view_normal_size" android:layout_height="@dimen/contact_icon_view_normal_size"
android:layout_centerVertical="true" android:layout_gravity="center_vertical"
android:scaleType="fitXY" android:scaleType="fitXY"
android:importantForAccessibility="no" android:importantForAccessibility="no"
android:contentDescription="@null" /> android:contentDescription="@null" />
+2 -2
View File
@@ -35,7 +35,7 @@
style="@style/WidgetConversationItemIncomingAvatarShadow" style="@style/WidgetConversationItemIncomingAvatarShadow"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_gravity="center_vertical"
android:src="@drawable/ic_widget_avatar_shadow" android:src="@drawable/ic_widget_avatar_shadow"
android:layout_marginTop="-4dp" android:layout_marginTop="-4dp"
android:importantForAccessibility="no" android:importantForAccessibility="no"
@@ -45,7 +45,7 @@
style="@style/WidgetConversationItemAvatarIncoming" style="@style/WidgetConversationItemAvatarIncoming"
android:layout_width="@dimen/contact_icon_view_normal_size" android:layout_width="@dimen/contact_icon_view_normal_size"
android:layout_height="@dimen/contact_icon_view_normal_size" android:layout_height="@dimen/contact_icon_view_normal_size"
android:layout_centerVertical="true" android:layout_gravity="center_vertical"
android:scaleType="fitXY" android:scaleType="fitXY"
android:importantForAccessibility="no" android:importantForAccessibility="no"
android:contentDescription="@null" /> android:contentDescription="@null" />
+2 -2
View File
@@ -36,7 +36,7 @@
style="@style/WidgetConversationItemOutgoingAvatarShadow" style="@style/WidgetConversationItemOutgoingAvatarShadow"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_gravity="center_vertical"
android:src="@drawable/ic_widget_avatar_shadow" android:src="@drawable/ic_widget_avatar_shadow"
android:layout_marginTop="-4dp" android:layout_marginTop="-4dp"
android:importantForAccessibility="no" android:importantForAccessibility="no"
@@ -45,7 +45,7 @@
android:id="@+id/avatarView" android:id="@+id/avatarView"
android:layout_width="@dimen/contact_icon_view_normal_size" android:layout_width="@dimen/contact_icon_view_normal_size"
android:layout_height="@dimen/contact_icon_view_normal_size" android:layout_height="@dimen/contact_icon_view_normal_size"
android:layout_centerVertical="true" android:layout_gravity="center_vertical"
android:scaleType="fitXY" android:scaleType="fitXY"
android:importantForAccessibility="no" android:importantForAccessibility="no"
android:contentDescription="@null" /> android:contentDescription="@null" />