Custom SmartReplyView layout
Implement SmartReplyView#onMeasure and SmartReplyView#onLayout according
to the redlines in go/p-notifications:
* Smart reply buttons can have at most 2 lines of text.
* Squeeze buttons to 2 lines of text when necessary to fit more
buttons.
* Don't show buttons which have more than 2 lines of text or don't fit
within the notification width.
* Update button background and text color.
Screenshot: https://screenshot.googleplex.com/cSM6Ve7qjb3.png
Bug: 67765414
Test: atest SmartReplyViewTest
Change-Id: Ia161c7f5669e7aef1b8c3480a8836784f0bde055
diff --git a/packages/SystemUI/res/layout/smart_reply_view.xml b/packages/SystemUI/res/layout/smart_reply_view.xml
index 6d53386..6f21787 100644
--- a/packages/SystemUI/res/layout/smart_reply_view.xml
+++ b/packages/SystemUI/res/layout/smart_reply_view.xml
@@ -19,9 +19,12 @@
<!-- LinearLayout -->
<com.android.systemui.statusbar.policy.SmartReplyView
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:id="@+id/smart_reply_view"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:layout_gravity="end">
+ systemui:spacing="@dimen/smart_reply_button_spacing"
+ systemui:singleLineButtonPaddingHorizontal="@dimen/smart_reply_button_padding_horizontal_single_line"
+ systemui:doubleLineButtonPaddingHorizontal="@dimen/smart_reply_button_padding_horizontal_double_line">
<!-- smart_reply_button(s) will be added here. -->
</com.android.systemui.statusbar.policy.SmartReplyView>
\ No newline at end of file