For future reference: it works with listView.setCacheColorHint(0) in code or android:cacheColorHint="#00000000" in xml.
I was sure that I tried this already and it didn't work but it turns out the change didn't make it to the emulator when I was testing it. Sorry. Tauno On Oct 7, 9:56 am, Tauno T <[EMAIL PROTECTED]> wrote: > Added as issue 946 if anyone is > interested..http://code.google.com/p/android/issues/detail?id=946 > > Tauno > > On Sep 29, 10:27 am,TaunoT<[EMAIL PROTECTED]> wrote: > > > "There must be something else you're doing that was wrong." > > > Can you please explain what's wrong in this setup? :) > > > New project. > > * main.xml: > > <?xml version="1.0" encoding="utf-8"?> > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:background="@drawable/test"> > > > <ListView > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:entries="@array/test"/> > > </LinearLayout> > > > * @drawable/test is a png filled with red (a: 255, r:255, g:0, b:0) > > * Code: > > public class ListViewTest extends Activity { > > @Override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > } > > > } > > > It smells and looks like a bug to me personally. > > > On Sep 26, 11:08 am,TaunoT<[EMAIL PROTECTED]> wrote: > > > > Here you go: > > > > <?xml version="1.0" encoding="utf-8"?> > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:orientation="vertical" > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > android:background="@drawable/some_image" > > > android:id="@+id/some_id"> > > > > <ListView android:id="@+id/another_id" > > > android:layout_width="fill_parent" > > > android:divider="@android:color/transparent" > > > (adding android:scrollingCache="false" here solves the > > > problem) > > > android:layout_height="wrap_content"/> > > > </LinearLayout> > > > > The ListView uses a custom ArrayAdapter that returns Views inflated > > > from the following xml: > > > > <?xml version="1.0" encoding="utf-8"?> > > > <TableLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" > > > > > <TableRow> > > > <ImageView android:id="@+id/some_id" /> > > > <TextView android:id="@+id/some_id2" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" /> > > > </TableRow> > > > > <TableRow> > > > <TextView > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" /> > > > <TextView android:id="@+id/some_id3" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" /> > > > </TableRow> > > > </TableLayout> > > > > During the Activitys onCreate() another custom View is added to the > > > inflated LinearLayout (id: some_id) using addView(CustomView, 0) > > > > On Sep 26, 9:54 am, "Romain Guy" <[EMAIL PROTECTED]> wrote: > > > > > You might notice it on an actual phone. You should not have to disable > > > > the scrolling cache. There must be something else you're doing that > > > > was wrong. Normally, disabling the cache color hint is all you need to > > > > do. Could you show me your XML layout file? > > > > > On Thu, Sep 25, 2008 at 11:41 PM,TaunoT <[EMAIL PROTECTED]> wrote: > > > > > > Ok, managed to fix it by adding android:scrollingCache="false" to the > > > > > ListView. From the dox it seems that it makes scrolling a little > > > > > slower but I didn'tnotice any difference (have a list with ~100 > > > > > entries) - I guess it's too small to notice with my primitive list :) > > > > > > On Sep 26, 9:30 am,TaunoT <[EMAIL PROTECTED]> wrote: > > > > >> Has anyone figured out a workaround for this? I'm running out of > > > > >> ideas > > > > >> myself :( > > > > > >> On Sep 24, 11:24 am,TaunoT<[EMAIL PROTECTED]> wrote: > > > > > >> > I'm having the same issue. > > > > >> > A ListView is inside of a LinearLayout and the LinearLayout has a > > > > >> > semi- > > > > >> > transparent background. > > > > >> > The background diappears while scrolling the ListView with the > > > > >> > mouse. > > > > > >> > Adding android:cacheColorHint="#00000000" to the LinearLayout has > > > > >> > no > > > > >> > effect. > > > > > >> > On Sep 24, 11:02 am, hackbod <[EMAIL PROTECTED]> wrote: > > > > > >> > > The color you have (#000) is solid black. Use #00000000 for a > > > > >> > > completely transparent color. > > > > > >> > > On Sep 23, 9:33 pm, Nickname <[EMAIL PROTECTED]> wrote: > > > > > >> > > > Thank you, but....it does NOT fix the problem. > > > > > >> > > > Here is what i added to layout xml of the listview: > > > > > >> > > > ... > > > > >> > > > android:background="@drawable/background" > > > > >> > > > ... > > > > >> > > > android:cacheColorHint="#000" > > > > >> > > > ... > > > > >> > > > android:layout_width="fill_parent" > > > > >> > > > ... > > > > > >> > > > On Sep 23, 4:53 pm, "Romain Guy" <[EMAIL PROTECTED]> wrote: > > > > > >> > > > > Set ListView's cache color hint to 0. > > > > > >> > > > > On Sep 23, 2008 6:26 PM, "Nickname" <[EMAIL PROTECTED]> > > > > >> > > > > wrote: > > > > > >> > > > > It happens to android emulator, on xp as i know. > > > > > >> > > > > I depress mouse pointer to scroll a listview. While it > > > > >> > > > > scrolls, the > > > > >> > > > > background drawable disappers. When i release the mouse, the > > > > >> > > > > background still disappear till i move mouse to touch the > > > > >> > > > > screen. > > > > > >> > > > > This is a harmless issue but makes me uneasy. > > > > > -- > > > > Romain Guywww.curious-creature.org > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

