Adjust the listview split line
The following two attributes are used for adjustment:
Android: divider = "@ drawable/line" can be an image or a color
Android: dividerheight = "3px" Quantity Unit
Adjust the Row Height of the listview
It mainly adjusts the Row Height of layout contained by the adapter.
The main_list code is:
SimpleAdapter adapter = new SimpleAdapter(this,getData(),R.layout.main_list,new String[]{"img", "info"},
The main_list.xml code is:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="70dip" android:gravity="center" > <ImageView android:id="@+id/img" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="5px" android:paddingBottom="5px" /> <TextView android:id="@+id/info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20sp" /></LinearLayout>
It took a long time to adjust the line and I didn't find a suitable answer on the Internet. I hope it will help you.