我有一个按钮,我希望当我按下它时,它会保持按下状态(Froyo上的绿色).
有帮助吗?
mycodes_Button = (Button) findViewById(R.id.mycodes);
...
if (saved_Button.isPressed())
{
saved_Button.setFocusable(true);
}
Run Code Online (Sandbox Code Playgroud)
像这样的东西?
我有button_focused,button_pressed和button_normal图像。当我按下按钮时,将button_pressed显示图像,并且与按钮按下有关的动作开始。
当我退出按下按钮时,操作继续,但是按钮返回到button_normal正在显示的图像。
如何button_pressed在整个操作期间将要显示的按钮图像设置为该图像,然后重置为该button_normal图像?
感谢您的时间