Android ImageView
有setAlpha(float)
方法,但我知道android videoView
没有setAlpha()
方法,因为android videoview
是surfaecview
。
如何在setAlpha()
之类的VideoView
中实现imageview
功能。
答案 0 :(得分:1)
你可以这样做:
....
<RelativeLayout
android:layout_width="200dp"
android:layout_height="200dp">
<VideoView
android:layout_width="match_parent"
android:layout_height="match_parent"
.../>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:alpha=".5"
/>
</RelativeLayout>
....