SlidingPaneLayout
에서 보조보기로 ListView
을 사용하고 있습니다. 기본보기는지도 조각입니다. ListView
은 메뉴 역할을합니다. 문제는 onItemClickedListener
이 ListView에서 호출되지 않는다는 것입니다. 심지어 목록 행은 언론에서 결코 강조 표시되지 않습니다. 그것은 ListView 포커스를 얻을 수없는 것 같습니다.Android, SlidingPaneLayout 및 listView
EDIT : 실제로 slidingPaneLayout.findFocus()
은 android.widget.ListView를 보여줍니다. 목록 항목을 클릭해도 여전히 운이 없다. 여기
내 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>
나는이 문제를 어떻게 해결할 수 있습니까 ??
을 귀하의 청취자가 귀하의 목록에 초점을 맞춘다면 - 그리고 -보기가 옳은 것처럼 보일 것입니다. 그러면 귀하의 레이아웃 xml에 문제가 없을 것입니다. 또한'empty '를 어떻게 보이거나 숨길 수 있습니까? – edthethird
그게 내가 한거야. 같은 문제. 그리고 SlidingPaneLayout 자체와 관련이 있다고 생각합니다. –
자바 코드도 게시 할 수 있습니까? – edthethird