I’m using cursor adapter to get a custom list view.I’ve two xml files.
a.xml has a Linearlayout with Listview
y.xml has Linearlayout with two Textview.
I’m not able to select when i see a list view.I’m using setOnItemClickListener to select an item from list view.
I tried to search for this and came to know that many of them have the same issue.I tried applying this to both textview android:focusable="false in xml and programatically.
What is the fix for this issue?
a.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</ScrollView>
y.xml
LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
Removed
<scrollview>,it worked like a charm.