Skip to content

Commit bb90b20

Browse files
kendrickumstattdimhappi
authored andcommitted
[Catalog][SplitButton] Added an onDismissListener to the popup menu to synchronize menu display and button checked state.
PiperOrigin-RevId: 748755298
1 parent 443eaa5 commit bb90b20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

catalog/java/io/material/catalog/button/SplitButtonDemoFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ private void showMenu(View v, @MenuRes int menuRes) {
8484
.show();
8585
return true;
8686
});
87+
popup.setOnDismissListener(
88+
popupMenu -> {
89+
MaterialButton button =
90+
(MaterialButton) v.findViewById(R.id.expand_more_or_less_filled_icon_popup);
91+
button.setChecked(false);
92+
});
8793
popup.show();
8894
}
8995

0 commit comments

Comments
 (0)