我在 FrameLayout 中有一个 VideoView 和一个 TextView,该 TextView 显示在 VideoView 上。TextView 用于显示电影上的字幕。
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/frameLayout">
<VideoView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/videoView"/>
<TextView
android:id="@+id/subtitleTxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#41000000"
android:padding="10dp"
android:textColor="#ffffff"
android:textSize="20sp"/>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
但是当我点击 TextView 时,VideoView 的触摸监听器也会工作,这是我的问题。
我该如何解决这个问题?
android ×1