mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
[Catalog][SplitButton] Added an onDismissListener to the popup menu to synchronize menu display and button checked state.
PiperOrigin-RevId: 748755298
This commit is contained in:
parent
443eaa59c0
commit
bb90b2010e
@ -84,6 +84,12 @@ public class SplitButtonDemoFragment extends DemoFragment {
|
||||
.show();
|
||||
return true;
|
||||
});
|
||||
popup.setOnDismissListener(
|
||||
popupMenu -> {
|
||||
MaterialButton button =
|
||||
(MaterialButton) v.findViewById(R.id.expand_more_or_less_filled_icon_popup);
|
||||
button.setChecked(false);
|
||||
});
|
||||
popup.show();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user