I have the following code in resultlookup.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:id="@+id/layoutResultOuter"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:padding="5dp">
<TextView
android:id="@+id/txtResultLeadCode"
style="@android:style/TextAppearance.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="ID" />
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/txtResultFirstName"
style="@android:style/TextAppearance.Small"
android:singleLine="true" android:text="First Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txtResultspace"
style="@android:style/TextAppearance.Small"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text=" " />
<TextView
android:id="@+id/txtResultLastName"
style="@android:style/TextAppearance.Small"
android:singleLine="true" android:text="Last Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
Now, I want this layout to be used in a grid view, as 1 of it’s row. The grid is a single column grid.
The data is stored in SQLite DB, I retrieve the data and have to display it in the grid format.
Read some where that I can use “View Inflater” or “Layout Inflater”. If there is any sample code, please let me know.
I want some thing like this:

I think you can simply use the
<include>tag. Here’s how you do it.