点击SlidingPaneLayout事件 [英] Click events on SlidingPaneLayout
本文介绍了点击SlidingPaneLayout事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用SlidingPaneLayout。左视图是一个ListFragment和右视图是一详图。布局显示正确,我可以滑动。但是,如果详细视图在列表的前面,我点击它,在列表中,则背景点击。
I'm trying to use the SlidingPaneLayout. The left view is a ListFragment and the right view is a detail view. The layout is displayed correctly and I can slide it. But if the detail view is in front of the list and I click on it, the list in the background receives the click.
我的布置是这样的:
<?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>
我用这个$ C $下建立的点击监听器在ListFragment
I use this code for setting up the click listener in the ListFragment
@Override
public void onListItemClick(ListView list, View view, int position, long id) {
iItemClickListener.onListFragmentItemClick(view, position);
}
我该如何解决这个问题?
How can I solve this?
推荐答案
只需添加机器人:可点击=真正的
第二个片段
或的FrameLayout
在 SlidingPaneLayout
。
这篇关于点击SlidingPaneLayout事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文