开发者

Android Gallery Starting Selection Drawable

开发者 https://www.devze.com 2023-03-14 10:32 出处:网络
I have a Gallery that I\'ve set up with this type of thing.Works great, except on initial load.The initial gallery item isn\'t \"selected\" according to the drawable.Sliding the gallery back and forth

I have a Gallery that I've set up with this type of thing. Works great, except on initial load. The initial gallery item isn't "selected" according to the drawable. Sliding the gallery back and forth makes it work fine and going back to the first has it selected corr开发者_运维百科ectly. Any ideas?


What do you mean by "selected"? Gallery only draws a "selector" indicator if the view is focused, which usually only happens when you're using non-touch input (e.g., arrow keys, jogball, etc). If you touch/swipe to move around in it, you enter "touch mode", which usually does not draw a "selector". The same is true of ListView. Read this for more information on what Touch Mode is, and why it's important to understand the difference.


I ended up using this as a guide. I didn't get exactly what I wanted, but this was useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消