Android。触摸监听器在两个视图之间混合
Android. Touch listener get mixed between two views
我有一个非常奇怪的问题。我有一个复杂的线性布局,其中包含 3 children.The 第一个左边 child 是一个列表(很像 android(两个平底锅)的列表详细信息模式)第二个 child 是分隔符视图(只是作为行分隔符的简单视图),第三个是大图像视图 (https://github.com/Piasy/BigImageViewer)
问题是当尝试在右侧缩放时,回收站视图项目被点击
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="5">
<LinearLayout
android:id="@+id/total_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<RelativeLayout
android:id="@+id/menu_container"
android:layout_width="180dp"
android:layout_height="match_parent"
>
<include
android:id="@+id/list"
layout="@layout/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<ProgressBar
android:id="@+id/devices_new_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
</RelativeLayout>
<View
android:id="@+id/line_seperator"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/grey"
></View>
<RelativeLayout
android:id="@+id/image_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<com.github.piasy.biv.view.BigImageView
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
app:customSsivId="@+id/mSSIV"
app:initScaleType="centerInside"
app:optimizeDisplay="true">
<ImageSSIV
android:id="@+id/mSSIV"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.github.piasy.biv.view.BigImageView>
<ProgressBar
android:id="@+id/image_progress_bar"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
检查您的 match_parent 属性,以免它们被屏幕触摸触发
无论谁面对这个
我的主要问题是我使用的是中国平板电脑华为,每当你将它插入电脑时,它就会变得疯狂,所有的触摸都是混合的。
我有一个非常奇怪的问题。我有一个复杂的线性布局,其中包含 3 children.The 第一个左边 child 是一个列表(很像 android(两个平底锅)的列表详细信息模式)第二个 child 是分隔符视图(只是作为行分隔符的简单视图),第三个是大图像视图 (https://github.com/Piasy/BigImageViewer)
问题是当尝试在右侧缩放时,回收站视图项目被点击
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="5">
<LinearLayout
android:id="@+id/total_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<RelativeLayout
android:id="@+id/menu_container"
android:layout_width="180dp"
android:layout_height="match_parent"
>
<include
android:id="@+id/list"
layout="@layout/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<ProgressBar
android:id="@+id/devices_new_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
</RelativeLayout>
<View
android:id="@+id/line_seperator"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/grey"
></View>
<RelativeLayout
android:id="@+id/image_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<com.github.piasy.biv.view.BigImageView
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
app:customSsivId="@+id/mSSIV"
app:initScaleType="centerInside"
app:optimizeDisplay="true">
<ImageSSIV
android:id="@+id/mSSIV"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.github.piasy.biv.view.BigImageView>
<ProgressBar
android:id="@+id/image_progress_bar"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
检查您的 match_parent 属性,以免它们被屏幕触摸触发
无论谁面对这个
我的主要问题是我使用的是中国平板电脑华为,每当你将它插入电脑时,它就会变得疯狂,所有的触摸都是混合的。