Skip to content

Instantly share code, notes, and snippets.

@pacificregmi
Created February 16, 2016 06:25
Show Gist options
  • Save pacificregmi/b2c761e8a56de0374b44 to your computer and use it in GitHub Desktop.
Save pacificregmi/b2c761e8a56de0374b44 to your computer and use it in GitHub Desktop.
Android ListView with Image and Text - layout/listview_activity.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/android_list_view_tutorial_with_example"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="7dp">
<ImageView
android:id="@+id/listview_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/app_name"
android:padding="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="7dp">
<TextView
android:id="@+id/listview_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="@+id/listview_item_short_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment