Saturday, July 16, 2011

[android-developers] how do I highlight (color) a range of entries in a ListView?

Ok, no answers to how to get smoothScrollToPosition to land on
top of the display, not the bottom, so I'm guessing I'm stuck
there. So, is there any way that I can use, say, a bright yellow
background to highlight the target range? In other words, make
it more visible so it's at least obvious that the user's choice
(brand A) is on-screen?

Put another way: I have a ListView with entries from 0---297 (+/- 1).
A search for a particular brand's malt leads to position 42, and
that company's products range from positions 42---55. Can I
change the background (or foreground) color for positions 42--55,
while leaving the rest of the ListView its default bg/fg colors?

Thanks,
--jim

PS: For the smoothScrollToPosition attempt, I even tried
scrolling PAST the target position by 10, then backing up,
assuming that would put the target on top of the display.
It STILL insists on putting it on the bottom. :-(

--
73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 >
spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters): http://jdgapps.com
My policy on spammers:
"Castrate first, ask questions later."

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment