Does anyone know the proper way to programmatically set the pressed state of an image button? I want to press an image button that will create an api call and then stay in a pressed state until receiving the response will take a few seconds. .setPressed from the Android View documentation does not seem to work and the code below does not work
stackoverflow 2
a
Allan Wang
02/01/2019, 2:30 AM
Unfortunately this isn’t kotlin related, so you may have better luck on stack overflow
Allan Wang
02/01/2019, 2:31 AM
You may also consider disabling the button during that duration, though it doesn’t look the same as pressed
👍 1
o
Owen Carpenter
02/01/2019, 2:32 AM
yeah thanks, all I want is for the pressed image from my selector to be displayed while waiting for the response