I have a list view using a layout that has a background color of #8000.
When I scroll the list, the list item background color change to a
solid color, in this case black. Seems it's ignoring the alpha
transparency value on scroll.
Is there a way to make it not do that?
Thanks.
--
Greg
Use this:
http://developer.android.com/reference/android/widget/AbsListView.html#setCacheColorHint(int)
http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:cacheColorHint
Note that doing this means that ListView can't use important drawing
optimizations, so on
On Sat, Jun 18, 2011 at 1:48 PM, Dianne Hackborn hack...@android.com wrote:
Use this:
http://developer.android.com/reference/android/widget/AbsListView.html#setCacheColorHint(int)
http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:cacheColorHint
Note that
On Sat, Jun 18, 2011 at 3:09 PM, Greg Donald gdon...@gmail.com wrote:
The View passed to me in getView() in my CursorAdapter does not appear
to have setCacheColorHint().
Looks like setCacheColorHint() exists for the list view itself but my
problem is with list items, not the list.
I found
You need to call setCacheColorHint() on the ListView itself. You need
do this only once.
On Sat, Jun 18, 2011 at 1:10 PM, Greg Donald gdon...@gmail.com wrote:
On Sat, Jun 18, 2011 at 3:09 PM, Greg Donald gdon...@gmail.com wrote:
The View passed to me in getView() in my CursorAdapter does not
On Sat, Jun 18, 2011 at 3:46 PM, Romain Guy romain...@android.com wrote:
You need to call setCacheColorHint() on the ListView itself. You need
do this only once.
Like this?
list = (ListView) findViewById( R.id.list );
int color = Color.argb( 80, 0, 0, 0 );
list.setCacheColorHint(
You need to set the cache color hint to 0,0,0,0, not 80,0,0,0. And you
still set the background color of your items the way you want.
On Sat, Jun 18, 2011 at 2:59 PM, Greg Donald gdon...@gmail.com wrote:
On Sat, Jun 18, 2011 at 3:46 PM, Romain Guy romain...@android.com wrote:
You need to call
On Sat, Jun 18, 2011 at 5:49 PM, Romain Guy romain...@android.com wrote:
You need to set the cache color hint to 0,0,0,0, not 80,0,0,0. And you
still set the background color of your items the way you want.
Still black when scrolling, only becoming transparent after the
scrolling ends. And a
8 matches
Mail list logo