Thursday, February 13, 2014
Android Imageview problem
ImageView
android: focusableInTouchMode = "true"
src is a selector
Only two properties within the selector
state_focused = true and false, show two pictures
ImageView event
OnclickListener display a Toast
Question:
selector effective, you can switch the picture, but the switch will not respond Onclic first event, the focus must be on ImageView clicking again will respond to events
If ImageView property focusableInTouchMode, then Selector is useless, Toast will display properly, that is a normal event
If OnclickListener changed to OnTouch where Event.ACTION_DOWN words Selector will not use, Toast also normal,
How to solve this problem, the effect is to be achieved when clicked ImageView will replace the background, while responding to the event display Toast
Reply:
Been resolved.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment