Cursor adapter on layout issue
<p>Hoping this is a simple one!</p>

<p>Can anyone tell me why my layout is being shown in my list view rather than my actual returned data?</p>

<p>For example, if I have 2 names in my database called 'John' I send the name 'John' from my 'EditText' to query the database, the correct number of listview cells is made, but it displays the layout again twice rather than the returned details!</p>

<p>output issue with the duplicate edit text and button in the listview:</p>

<p>I have one person called 'Dave' in my database, so it is showing the correct result number in the list view, i.e '1', but the issue is it should show their name, contact no, email and a comment, NOT the layout again!</p>

<p><img src="http://i.imgur.com/AZelv.jpg" alt="i"></p>

<p>search XML:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/inputSearchName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" &gt;

&lt;TextView
    android:id="@+id/txtsearch"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Type Name To Search:"
    android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

&lt;EditText
    android:id="@+id/inputName"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" &gt;

    &lt;requestFocus /&gt;
&lt;/EditText&gt;

&lt;Button
    android:id="@+id/btnSearchName"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="Search" /&gt;

&lt;ListView
    android:id="@android:id/list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" &gt;
&lt;/ListView&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Search code:</p>

<pre><code>    search.open();
Cursor cursor = search.searchOnName(searchedName);

startManagingCursor(cursor);

@SuppressWarnings("static-access")
String [] from = new String [] {DBsearchRef.KEY_NAME, DBsearchRef.KEY_TEL, DBsearchRef.KEY_EMAIL, DBsearchRef.KEY_COMMENTS};
int [] to = new int [] {R.id.txtNameList, R.id.txtTelList, R.id.txtEmailList, R.id.txtCommentsList};

@SuppressWarnings("deprecation")

SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.search, cursor, from, to);
searchedListResults.setAdapter(cursorAdapter);
</code></pre>

<p>The issue is my 'search' class layout is being shown in the listview....but as the listview is part of this class, i thought this would be the correct reference?</p>
