【发布时间】:2023-03-12 12:05:01
【问题描述】:
我想将 DrawerLayout 与 SurfaceView(MetaioSDK 增强现实视图)一起使用。除了 SurfaceView 的 TouchListener 外,一切正常。 看起来 DrawerlLayout 内的 FrameLayout 阻止了 SurfaceView 的触摸事件。是否可以将事件直接委托给 SurfaceView?我会感谢一些专业人士的帮助。
下面是我的xml布局
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ProgressBar
android:id="@+id/progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
android:orientation="vertical" >
<TextView
android:id="@+id/tV_Attributes"
android:layout_width="240dp"
android:layout_height="match_parent"
android:text="Hier sollen Attribute angezeigt werden." />
</LinearLayout>
【问题讨论】:
标签: android touch surfaceview drawerlayout drawer