Commit Graph

5 Commits

Author SHA1 Message Date
Kenny Guy
14d035c969 Fix colorized messaging layout and smart replies.
Modify messaging style and smart replies view to
cope with colorized backgrounds.

Bug: 78928664
Bug: 77927019
Test: atest SystemUITests (with patch from ag/3992401)
Test: visual - see bug for screenshots

Change-Id: Iee66931574fb48d0340986bf520532f798ef59fc
2018-05-10 10:25:14 +01:00
Selim Cinek
1c72fa0249 Cleaned up the paddings of the messaging layout and smart replies
Refactored the code such that the reply icon's inset was substracted
from the overall paddings to make all of them consistent. This
will also help in the future as we don't have to update those
paddings manually anymore.

Test: test all sorts of combinations with Notify
Change-Id: I8c6c9951bc73c88d95cb443c8e618c7adca7ebd3
Fixes: 78441535
2018-04-24 14:33:29 +08:00
Milo Sredkov
a5bacea405 Address visual inconsistency in smart replies
Address the major style differences and make the smart reply buttons
fit better with the other notification UI elements.

This CL does not yet address all the isues but removes the most
obvious inconsistencies.

Screenshot before: https://screenshot.googleplex.com/90QVvxJmUJ3.png
Screenshot after: https://screenshot.googleplex.com/2C8cMQgTVBG.png

Bug: 73605520
Test: In Notify post a Messaging notification with Large chices

Change-Id: Ide285c21c7bf83e9f06ade6912fd13cb3e4b9024
2018-04-14 19:39:08 +00:00
Petr Cermak
102431d5eb 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
2018-02-16 17:30:45 +00:00
Petr Cermak
ed7429c529 Implement SmartReplyView
SmartReplyView creates and manages smart reply buttons in a
notification.

One-pager:  http://go/1p-smart-reply
PRD:        http://go/srn-prd
Mocks:      http://go/p-notifications
Design doc: http://go/srn-design

Screenshot: https://screenshot.googleplex.com/GT9NGckkFKB.png

Bug: 67765414
Test: Viewed a notification with mock smart replies
Change-Id: I6d90776571a559a2542aa35fa11e6a21969179c0
2018-01-17 14:22:47 +00:00