Merge "Fix group name layout" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d7d84c0b7b
@@ -84,34 +84,21 @@
|
||||
android:layout_weight="1"
|
||||
style="@style/TextAppearance.NotificationImportanceChannel"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/TextAppearance.NotificationImportanceHeader"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="@*android:string/notification_header_divider_symbol" />
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
</LinearLayout>
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
<TextView
|
||||
android:id="@+id/delegate_name"
|
||||
android:layout_width="match_parent"
|
||||
@@ -121,6 +108,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:text="@string/notification_delegate_header"
|
||||
android:maxLines="1" />
|
||||
|
||||
|
||||
@@ -58,35 +58,21 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textDirection="locale"
|
||||
style="@style/TextAppearance.NotificationImportanceChannel"/>
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/TextAppearance.NotificationImportanceHeader"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="@*android:string/notification_header_divider_symbol" />
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textDirection="locale"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
</LinearLayout>
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textDirection="locale"
|
||||
android:ellipsize="end"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
<TextView
|
||||
android:id="@+id/delegate_name"
|
||||
android:layout_width="match_parent"
|
||||
@@ -96,6 +82,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:text="@string/notification_delegate_header"
|
||||
android:maxLines="1" />
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/notification_guts_conversation_icon_size"
|
||||
android:layout_centerVertical="true"
|
||||
@@ -78,34 +77,21 @@
|
||||
style="@style/TextAppearance.NotificationImportanceChannel"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/pkg_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/TextAppearance.NotificationImportanceHeader"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="@*android:string/notification_header_divider_symbol" />
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
</LinearLayout>
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:maxLines="1"/>
|
||||
<TextView
|
||||
android:id="@+id/group_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
|
||||
<TextView
|
||||
android:id="@+id/delegate_name"
|
||||
android:layout_width="match_parent"
|
||||
@@ -115,6 +101,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:textDirection="locale"
|
||||
android:text="@string/notification_delegate_header"
|
||||
android:maxLines="1" />
|
||||
|
||||
|
||||
@@ -368,14 +368,11 @@ public class NotificationConversationInfo extends LinearLayout implements
|
||||
}
|
||||
}
|
||||
TextView groupNameView = findViewById(R.id.group_name);
|
||||
View groupDivider = findViewById(R.id.group_divider);
|
||||
if (groupName != null) {
|
||||
groupNameView.setText(groupName);
|
||||
groupNameView.setVisibility(VISIBLE);
|
||||
groupDivider.setVisibility(VISIBLE);
|
||||
} else {
|
||||
groupNameView.setVisibility(GONE);
|
||||
groupDivider.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -375,14 +375,11 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G
|
||||
}
|
||||
}
|
||||
TextView groupNameView = findViewById(R.id.group_name);
|
||||
View divider = findViewById(R.id.group_divider);
|
||||
if (groupName != null) {
|
||||
groupNameView.setText(groupName);
|
||||
groupNameView.setVisibility(VISIBLE);
|
||||
divider.setVisibility(VISIBLE);
|
||||
} else {
|
||||
groupNameView.setVisibility(GONE);
|
||||
divider.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,14 +269,11 @@ public class PartialConversationInfo extends LinearLayout implements
|
||||
}
|
||||
}
|
||||
TextView groupNameView = findViewById(R.id.group_name);
|
||||
View groupDivider = findViewById(R.id.group_divider);
|
||||
if (groupName != null) {
|
||||
groupNameView.setText(groupName);
|
||||
groupNameView.setVisibility(VISIBLE);
|
||||
groupDivider.setVisibility(VISIBLE);
|
||||
} else {
|
||||
groupNameView.setVisibility(GONE);
|
||||
groupDivider.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -336,7 +336,6 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
assertTrue(textView.getText().toString().contains(group.getName()));
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
|
||||
assertEquals(VISIBLE, textView.getVisibility());
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.group_divider).getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -361,7 +360,6 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
|
||||
final TextView textView = mNotificationInfo.findViewById(R.id.group_name);
|
||||
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
|
||||
assertEquals(GONE, textView.getVisibility());
|
||||
assertEquals(GONE, mNotificationInfo.findViewById(R.id.group_divider).getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -236,8 +236,6 @@ public class NotificationInfoTest extends SysuiTestCase {
|
||||
true);
|
||||
final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
|
||||
assertEquals(GONE, nameView.getVisibility());
|
||||
final TextView dividerView = mNotificationInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(GONE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -288,8 +286,6 @@ public class NotificationInfoTest extends SysuiTestCase {
|
||||
true);
|
||||
final TextView groupNameView = mNotificationInfo.findViewById(R.id.group_name);
|
||||
assertEquals(GONE, groupNameView.getVisibility());
|
||||
final TextView dividerView = mNotificationInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(GONE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -317,8 +313,6 @@ public class NotificationInfoTest extends SysuiTestCase {
|
||||
final TextView groupNameView = mNotificationInfo.findViewById(R.id.group_name);
|
||||
assertEquals(View.VISIBLE, groupNameView.getVisibility());
|
||||
assertEquals("Test Group Name", groupNameView.getText());
|
||||
final TextView dividerView = mNotificationInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(View.VISIBLE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -259,8 +259,6 @@ public class PartialConversationInfoTest extends SysuiTestCase {
|
||||
false);
|
||||
final TextView nameView = mInfo.findViewById(R.id.delegate_name);
|
||||
assertEquals(GONE, nameView.getVisibility());
|
||||
final TextView dividerView = mInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(GONE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -305,8 +303,6 @@ public class PartialConversationInfoTest extends SysuiTestCase {
|
||||
false);
|
||||
final TextView groupNameView = mInfo.findViewById(R.id.group_name);
|
||||
assertEquals(GONE, groupNameView.getVisibility());
|
||||
final TextView dividerView = mInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(GONE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -331,8 +327,6 @@ public class PartialConversationInfoTest extends SysuiTestCase {
|
||||
final TextView groupNameView = mInfo.findViewById(R.id.group_name);
|
||||
assertEquals(View.VISIBLE, groupNameView.getVisibility());
|
||||
assertEquals("Test Group Name", groupNameView.getText());
|
||||
final TextView dividerView = mInfo.findViewById(R.id.group_divider);
|
||||
assertEquals(View.VISIBLE, dividerView.getVisibility());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user