use <include layout="@layout/divider" />
y diseño personalizado para la línea. de esta manera:
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:orientation="vertical" >
<ListView android:id="@+id/listview"
android:layout_width="wrap_content"
android:divider="@layout/divider"
android:dividerHeight="3sp"
android:layout_height="wrap_content" />
</LinearLayout>
divider.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
android:startColor="#00000000"
android:centerColor="#FFFFFF"
android:endColor="#00000000"
/>
<corners
android:radius="4dp"
/>
</shape>
AndroidlistviewdividerActivity.class
public class AndroidlistviewdividerActivity extends Activity {
/** Called when the activity is first created. */
private ListView lv;
private String listview_array[] = { "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX",
"SEVEN", "EIGHT", "NINE", "TEN" };
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
lv = (ListView) findViewById(R.id.listview);
lv.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, listview_array));
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
AlertDialog.Builder adb = new AlertDialog.Builder(
AndroidlistviewdividerActivity.this);
adb.setTitle("ListView OnClick");
adb.setMessage("Selected Item is = "
+ lv.getItemAtPosition(arg2));
adb.setPositiveButton("Ok", null);
adb.show();
}
});
}
}
http://stackoverflow.com/questions/3979218/android-listview-divider vea este divisor personalizado y haga algunos Esfuerzos ... –