简体   繁体   中英

When the button is focused?

What is the visual difference between focused / pressed on mobile device (android)? Other status are interesting too, but those are most popular to distinguish.

Could you provide any graphics?

Regards

state_focused is whenever the button is focused on using a dpad or the trackball. Views don't generally show a focused state when using touch.

android:state_pressed
Boolean. "true" if this item should be used when the object is pressed (such as when a button is touched/clicked); "false" if this item should be used in the default, non-pressed state.

android:state_focused
Boolean. "true" if this item should be used when the object has input focus (such as when the user selects a text input); "false" if this item should be used in the default, non-focused state.

Edit :

For Button :

android:state_focused is whenever the button is focused on using a dpad or the trackball. Views don't generally show a focused state when using touch.

You Also Should Refer This Link For Detailed Information About State List

its something like this

By the way you can check google for something like this it'll be faster for you :)

就是这样

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM