Commit Graph

2 Commits

Author SHA1 Message Date
Matías Hernández
b1e28233c1 Use TextInputLayout for the name field in the create/rename mode page
In addition to looking nicer, this fixes two accessibility issues ("no hint when text is entered" and "reason for disabled button is unclear").

This requires a bit of theme merging black magic, because TextInputLayout requires a Theme.AppCompat descendant, which the Settings theme isn't.

Fixes: 356398157
Fixes: 370654542
Fixes: 369942776
Test: atest ZenModeEditNamePreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I92d8ec044dabc6daed5d755e206120ec7abc143e
2024-10-03 14:14:34 +02:00
Matías Hernández
574fcaf1b2 Add mode: Choose name and icon for new custom modes
This also unifies the "icon picker" screen with the new "add mode" screen since in both cases we want to edit name and icon together (and not save updates until the user confirms).

Bug: 326442408
Bug: 346278854
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I8a9d07ba0b6c55f3abc1b9884f278d51d178dc83
2024-07-06 22:12:58 +00:00