I'm using a ListView
as a secondary view in my SlidingPaneLayout
.The main view is a map fragment. The ListView
acts as a menu. The problem is that onItemClickedListener
never gets called on the ListView. Even the list row never gets highlighted on press. it seems that the ListView can't get the focus.
EDIT:
actually, slidingPaneLayout.findFocus()
shows that android.widget.ListView. still no luck on clicking the list items.
Here is my xml
<com.ziz.luke.custom_components.MySlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/slidingpanelayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@+id/contactsList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00000000" >
</ListView>
<TextView
android:id="@+id/android:empty"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal|center_vertical"
android:text="@string/noContacts" />
</RelativeLayout>
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
</com.ziz.luke.custom_components.MySlidingPaneLayout>
How can I solve this??
empty
? – Maintain