android - Changing the Size of my ListView by one Pixel messes up Formatting -
let me show 2 links demonstrate point:
http://i.snag.gy/qp1i2.jpg (the listview 60 pixels) http://i.snag.gy/dvxsl.jpg (the listview 61 pixels)
the whole file done outer vertical linearlayout provide weighted percentages (e.g. listview 75%, search part 4%, on , forth) independent of device screen size. within outer linearlayout have nested layout (linear or relative) depending on needs particular row.
it works beautifully, except last part. , seems lot of items try adding end messing formatting i'm not sure if problem how i'm doing listview. anyways, here's relevant code:
<relativelayout android:layout_width="fill_parent" android:layout_height="0dip" android:background="@null" android:layout_weight="0.75" android:paddingleft="0dip" > <imageview android:id="@+id/searchdivider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_margintop="2dp" android:contentdescription="@string/desc" android:src="@drawable/searchdivider" /> <listview android:id="@+id/listview1" android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignparentleft="true" android:layout_below="@+id/searchdivider" > </listview> </relativelayout>
thank help!
edit: should add don't want height 60dp, obviously. want fill_parent; picked arbitrary value of 60 , 61 figure out change makes layout mess up.
2nd edit: think figured out problem. seems when make theme appcompat, looks , acts fine. when make theme notitlebar (with or without fullscreen) acts screwy. haven't changed in manifest rather place in graphical layout lets modify 1 activity only.
any suggestions?
android:gravity="left" on imageview , android:gravity="right" on other listview
Comments
Post a Comment