返回信息流先直接上一个布局文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<VideoView
android:id="@+id/surface_view" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<FrameLayout android:id="@+id/operation_volume_brightness"
android:visibility="invisible" android:layout_centerInParent="true"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:background="#00000000" android:orientation="horizontal"
android:padding="0dip">
<ImageView android:id="@+id/operation_bg"
android:layout_gravity="center" android:src="@drawable/video_volumn_bg"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
<FrameLayout android:layout_gravity="bottom|center_horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="25dip">
<ImageView android:id="@+id/operation_full"
android:layout_gravity="left" android:src="@drawable/video_num_bg"
android:layout_width="94dip" android:layout_height="wrap_content" />
<ImageView android:id="@+id/operation_percent"
android:layout_gravity="left" android:src="@drawable/video_num_front"
android:layout_width="0dip" android:layout_height="wrap_content"
android:scaleType="matrix" />
</FrameLayout>
</FrameLayout>
<HorizontalScrollView
android:layout_width="match_content"
android:layout_height="match_content" android:layout_centerInParent="true"
android:scrollbars="none"
android:layout_gravity="center">
<LinearLayout
android:id="@+id/movieLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
这是一条镜像帖。来源:北邮人论坛 / mobile-terminal-at / #7681同步于 2013/5/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileTerminalAT机器人发帖
[问题]一个关于view遮挡的问题
Nomercy
2013/5/10镜像同步3 回复
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
主要有2个view,一个是用来进行视频播放的videoview,一个是类似视频播放前预览的HorizontalScrollView ,HorizontalScrollView 会在视频播放前显示一系列的视频图片
我的问题是,在videoview里我定义了ontouchEvent,在没有加HorizontalScrollView时是可以正常运行的,但是加上这个HorizontalScrollView 后,可能因为它本身有一些onclick,导致ontouchEvent失效了,我原先以为给HorizontalScrollView设置一个setvisible(GONE)就不会遮挡了。。但是貌似我太天真了。
有没有高手知道这个问题如何解决。。有没有什么方法可以在我不需要HorizontalScrollView这个View的时候把它销毁掉呢。。
【 在 Nomercy 的大作中提到: 】
: 主要有2个view,一个是用来进行视频播放的videoview,一个是类似视频播放前预览的HorizontalScrollView ,HorizontalScrollView 会在视频播放前显示一系列的视频图片
: 我的问题是,在videoview里我定义了ontouchEvent,在没有加HorizontalScrollView时是可以正常运行的,但是加上这个HorizontalScrollView 后,可能因为它本身有一些onclick,导致ontouchEvent失效了,我原先以为给HorizontalScrollView设置一个setvisible(GONE)就不会遮挡了。。但是貌似我太天真了。
: 有没有高手知道这个问题如何解决。。有没有什么方法可以在我不需要HorizontalScrollView这个View的时候把它销毁掉呢。。
touch穿透混乱什么的。。。咩哈哈 虽然用的语言不一样。。。
但是 这种情况有个偷懒的方法
不需要HorizontalScrollView 的时候 setPosition(99999,0)
直接把丫移动出屏幕外 啧啧
至于真正意义的 触摸穿透的管理什么的。。。这个 我就帮不上忙了。。。做ios 可能和安卓不太一样