Merge changes I76df6529,I99594ae9 into rvc-dev
* changes: Fixed the heads up layout of conversations Fixed an issue where the conversation title was showing doubled
This commit is contained in:
@@ -7158,7 +7158,8 @@ public class Notification implements Parcelable
|
||||
CharSequence conversationTitle = !TextUtils.isEmpty(super.mBigContentTitle)
|
||||
? super.mBigContentTitle
|
||||
: mConversationTitle;
|
||||
if (!TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) {
|
||||
if (mConversationType == CONVERSATION_TYPE_LEGACY
|
||||
&& !TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) {
|
||||
return conversationTitle;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -121,6 +121,7 @@ public class ConversationLayout extends FrameLayout
|
||||
private CachingIconView mConversationIconBadgeBg;
|
||||
private Icon mLargeIcon;
|
||||
private View mExpandButtonContainer;
|
||||
private View mExpandButtonInnerContainer;
|
||||
private ViewGroup mExpandButtonAndContentContainer;
|
||||
private NotificationExpandButton mExpandButton;
|
||||
private MessagingLinearLayout mImageMessageContainer;
|
||||
@@ -242,6 +243,7 @@ public class ConversationLayout extends FrameLayout
|
||||
mConversationHeader = findViewById(R.id.conversation_header);
|
||||
mContentContainer = findViewById(R.id.notification_action_list_margin_target);
|
||||
mExpandButtonAndContentContainer = findViewById(R.id.expand_button_and_content_container);
|
||||
mExpandButtonInnerContainer = findViewById(R.id.expand_button_inner_container);
|
||||
mExpandButton = findViewById(R.id.expand_button);
|
||||
mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize(
|
||||
R.dimen.conversation_expand_button_top_margin_expanded);
|
||||
@@ -1169,7 +1171,7 @@ public class ConversationLayout extends FrameLayout
|
||||
layoutParams.topMargin = topMargin;
|
||||
mExpandButton.setLayoutParams(layoutParams);
|
||||
|
||||
mExpandButtonContainer.setContentDescription(mContext.getText(contentDescriptionId));
|
||||
mExpandButtonInnerContainer.setContentDescription(mContext.getText(contentDescriptionId));
|
||||
}
|
||||
|
||||
private void updateContentEndPaddings() {
|
||||
@@ -1213,7 +1215,7 @@ public class ConversationLayout extends FrameLayout
|
||||
mExpandable = expandable;
|
||||
if (expandable) {
|
||||
mExpandButtonContainer.setVisibility(VISIBLE);
|
||||
mExpandButtonContainer.setOnClickListener(onClickListener);
|
||||
mExpandButtonInnerContainer.setOnClickListener(onClickListener);
|
||||
} else {
|
||||
// TODO: handle content paddings to end of layout
|
||||
mExpandButtonContainer.setVisibility(GONE);
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
android:id="@+id/notification_messaging"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/notification_text_size"
|
||||
android:spacing="@dimen/notification_messaging_spacing"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
@@ -263,53 +264,65 @@
|
||||
<include layout="@layout/notification_material_action_list" />
|
||||
</com.android.internal.widget.RemeasuringLinearLayout>
|
||||
|
||||
<!--This is dynamically placed between here and at the end of the layout-->
|
||||
<LinearLayout
|
||||
<!--This is dynamically placed between here and at the end of the layout. It starts here since
|
||||
only FrameLayout layout params have gravity-->
|
||||
<FrameLayout
|
||||
android:id="@+id/expand_button_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/conversation_expand_button_size"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end|top"
|
||||
android:paddingStart="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="@dimen/notification_content_margin_end"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
>
|
||||
<!-- Images -->
|
||||
<com.android.internal.widget.MessagingLinearLayout
|
||||
android:id="@+id/conversation_image_message_container"
|
||||
android:forceHasOverlappingRendering="false"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:spacing="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:clipToPadding="false">
|
||||
<!--This layout makes sure that we can nicely center the expand content in the
|
||||
collapsed layout while the parent makes sure that we're never laid out bigger
|
||||
than the messaging content.-->
|
||||
<LinearLayout
|
||||
android:id="@+id/expand_button_inner_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/conversation_expand_button_size"
|
||||
android:paddingStart="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="end|top"
|
||||
android:paddingEnd="@dimen/notification_content_margin_end"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
/>
|
||||
<!-- Unread Count -->
|
||||
<TextView
|
||||
android:id="@+id/conversation_unread_count"
|
||||
android:layout_width="33sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="2dp"
|
||||
android:visibility="gone"
|
||||
android:textAppearance="@style/TextAppearance.DeviceDefault.Notification"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:background="@drawable/conversation_unread_bg"
|
||||
/>
|
||||
<com.android.internal.widget.NotificationExpandButton
|
||||
android:id="@+id/expand_button"
|
||||
android:layout_width="@dimen/notification_header_expand_icon_size"
|
||||
android:layout_height="@dimen/notification_header_expand_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:drawable="@drawable/ic_expand_notification"
|
||||
android:clickable="false"
|
||||
android:importantForAccessibility="no"
|
||||
/>
|
||||
</LinearLayout>
|
||||
>
|
||||
<!-- Images -->
|
||||
<com.android.internal.widget.MessagingLinearLayout
|
||||
android:id="@+id/conversation_image_message_container"
|
||||
android:forceHasOverlappingRendering="false"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:spacing="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
/>
|
||||
<!-- Unread Count -->
|
||||
<TextView
|
||||
android:id="@+id/conversation_unread_count"
|
||||
android:layout_width="33sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="2dp"
|
||||
android:visibility="gone"
|
||||
android:textAppearance="@style/TextAppearance.DeviceDefault.Notification"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:background="@drawable/conversation_unread_bg"
|
||||
/>
|
||||
<com.android.internal.widget.NotificationExpandButton
|
||||
android:id="@+id/expand_button"
|
||||
android:layout_width="@dimen/notification_header_expand_icon_size"
|
||||
android:layout_height="@dimen/notification_header_expand_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:drawable="@drawable/ic_expand_notification"
|
||||
android:clickable="false"
|
||||
android:importantForAccessibility="no"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</com.android.internal.widget.ConversationLayout>
|
||||
|
||||
@@ -3866,6 +3866,7 @@
|
||||
<java-symbol type="id" name="conversation_icon_badge_ring" />
|
||||
<java-symbol type="id" name="conversation_icon_badge_bg" />
|
||||
<java-symbol type="id" name="expand_button_container" />
|
||||
<java-symbol type="id" name="expand_button_inner_container" />
|
||||
<java-symbol type="id" name="messaging_group_content_container" />
|
||||
<java-symbol type="id" name="expand_button_and_content_container" />
|
||||
<java-symbol type="id" name="conversation_header" />
|
||||
|
||||
Reference in New Issue
Block a user