I know that by manually calling a call I can trigger OnClickListener.onClick of a button, but It does not seem to have been clicked to visually display it. I'm manually exploring how to reveal a button as if it was clicked. Do I have to manually change the background and invalidation (and then change it to a handler again. PostDelayed call), or is there another framework for doing this?
Edit I know how to design buttons differently when the button is pressed when the user starts the press question Is: Is the easiest way for a program to press a button when the user is physically pressed? Used as a state, I expose a method that sets the background in the "pressed" drawable, and I use Handler.postAtTime to bring it back to normal background. , So when I am doing It can be used as a regular button. Although this question is very old, I thought I would still answer it. You do not need a view sub-class. First call performClick () , then you can see the
state pressed button. Can set (true); and after that it can be reset after two milliseconds.
handler.post Delayed (new Runnabel) {@Override public void run () {view.setPressed (false);}}, 100);
Comments
Post a Comment