Skip to content

Instantly share code, notes, and snippets.

@bolshoibooze
Created July 13, 2015 06:06
Show Gist options
  • Save bolshoibooze/17adacf7436783faba3c to your computer and use it in GitHub Desktop.
Save bolshoibooze/17adacf7436783faba3c to your computer and use it in GitHub Desktop.
Built-in XML android layouts(typically used in Adaptors)
//simple_list_item_1
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/listItemFirstLineStyle"
android:paddingTop="2dip"
android:paddingBottom="3dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
//simple_list_item_2
<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/listItemFirstLineStyle"/>
<TextView android:id="@android:id/text2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
style="?android:attr/listItemSecondLineStyle" />
</TwoLineListItem>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment