Search code examples
androidbuttonandroid-drawable

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


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


Solution

  • View.setPressed(boolean)