Skip to content Skip to sidebar Skip to footer

Listview Row Overlap Problem

I just updated my app and I am getting some odd complaints from people who update it. I am only getting complaints from people with non-stock android phones (phones that manufactur

Solution 1:

I had the same problem. It was evident on 2 Verizon Eris, and in the 1.5 simulator. It does NOT occur in a G1 (v1.6), a moto Droid (2.0.1), or any simulator 1.6+

It occurred within a ListView bound to a ListActivity, and in a vertically oriented LinearLayout. In both cases, I was feeding RelativeLayouts into each, and i kept losing the tops of them

I used the hierarchyViewer, mucked with every damn thing, and spun around. It finally dawned on me, after manually setting minHeight on the RelativeLayout to something larger than what was showing, that the problem wasn't just SIZING, but SHIFTING.. Everything in the RelativeLayout was getting pushed past the top of the view.

This made me mentally revisit sandos's answer above: "something to do with gravity"

in the RelativeLayout (housing each 'row' of the lists), i put:

android:gravity="center_vertical"

this made an enormous difference.

Now, my rows still look narrower in 1.5, but they are usable, and I can keep at it

Solution 2:

change ur listView tag attribute

android:layout_height="fill_parent"

Solution 3:

I will not be able to pinpoint your problem, but I do know that layouts (unfortunately!) can change between minor versions of Android. I saw a few problems just going from 1.5 to 1.6, specifically with layouts in a list. Even more problematic was the fact that the emulator did not emulate this properly, which makes this very hard to fix. I remember it having to do with gravity, so I would play around with that part. Also, try using a RelativeLayout as thats less resource-hungry than nested linearlayouts.

Also try using the the layout tools from the SDK, layoutopt and Hiearhcy Viewer.

Post a Comment for "Listview Row Overlap Problem"