Skip to content

Commit 999d653

Browse files
committed
Using own layout for example
1 parent 64417e5 commit 999d653

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="wrap_content" android:layout_height="wrap_content">
4+
<ImageView android:id="@+id/icon" android:layout_height="wrap_content" android:src="@drawable/icon" android:layout_width="22px" android:layout_marginTop="4px" android:layout_marginRight="4px" android:layout_marginLeft="4px">
5+
</ImageView>
6+
<TextView android:text="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/label" android:textSize="30px"></TextView>
7+
</LinearLayout>

‎de.vogella.android.listactivity/src/de/vogella/android/listactivity/MyList.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void onCreate(Bundle icicle) {
1717
// Create an ArrayAdapter, that will actually make the Strings above
1818
// appear in the ListView
1919
this.setListAdapter(new ArrayAdapter<String>(this,
20-
android.R.layout.simple_list_item_checked, names));
20+
R.layout.rowlayout, R.id.label, names));
2121
}
2222

2323
@Override

0 commit comments

Comments
 (0)