Home » Android » Android: how to switch button's pressed state programmatically?

Android: how to switch button's pressed state programmatically?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have a button with 2 distinct pictures for pressed and released state. How do I switch the state programmatically?

How to&Answers:

View.setPressed(boolean)