ToggleButtonLayout icon indicating copy to clipboard operation
ToggleButtonLayout copied to clipboard

setSelected() does not set the background color

Open Eimert opened this issue 6 years ago • 1 comments

Hi,

When invoking toggle.setSelected(true) the button gets selected but the button background doesn't show the selection. 2019-06-28_11:33:19-maindesk_001 I've already found a workaround for this issue: use toggle.setToggled(toggle.getId(), true);: 2019-06-28_11:33:27-maindesk_001

As a developer I'm expecting that setSelected(true) selects the toggle and marks the toggle background as selected. Could you fix this small bug?

With kind regards, Eimert

Eimert avatar Jun 28 '19 09:06 Eimert

wrong method, you should use menu.setToggled(R.id.my_id, true);

dr0-dev avatar Jul 16 '21 10:07 dr0-dev