Update defend tips card

- Update defend tips card to unclickable
 - Update secondary button's action and content description
 screenshot: https://screenshot.googleplex.com/BYU8Mh5abJ9Tirh.png

Bug: 243769797
Bug: 243641857
Bug: 244219076
Test: make SettingsRoboTests
Change-Id: I7fdf5f7404d33f0374a992c83a7653a01b9f11bc
This commit is contained in:
Wesley
2022-08-29 23:39:34 +00:00
committed by YK Hung
parent 2c9dab6f0a
commit 243b450428
8 changed files with 44 additions and 14 deletions

View File

@@ -140,6 +140,15 @@ public class CardPreference extends Preference {
updateButtonGroupsVisibility();
}
/**
* Sets the text of content description on secondary button.
*
* @param text text for the content description
*/
public void setSecondaryButtonContentDescription(String text) {
mSecondaryButton.ifPresent(button -> button.setContentDescription(text));
}
private void updateButtonGroupsVisibility() {
int visibility =
(mPrimaryButtonVisible || mSecondaryButtonVisible) ? View.VISIBLE : View.GONE;