J'essaie d'utiliser le SlidingPaneLayout. La vue de gauche est un ListFragment et la vue de droite est une vue détaillée. La disposition s'affiche correctement et je peux la faire glisser. Mais si la vue détaillée se trouve devant la liste et que je clique dessus, la liste en arrière-plan reçoit le clic.
Ma mise en page ressemble à ceci :
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sliding_pane_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<fragment android:name="net.name.multiremote.RemoteListFragement"
android:id="@+id/fragment_remote_list"
android:layout_width="580dp"
android:layout_height="match_parent"
android:layout_gravity="left" />
<fragment
android:id="@+id/fragment_remote"
android:name="net.name.multiremote.RemoteFragment"
android:layout_width="850dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</android.support.v4.widget.SlidingPaneLayout>
J'utilise ce code pour configurer l'écouteur de clic dans le ListFragment.
@Override
public void onListItemClick(ListView list, View view, int position, long id) {
iItemClickListener.onListFragmentItemClick(view, position);
}
Comment puis-je résoudre ce problème ?