I have framed layout with ImageView
, SurfaceView
and control elements as overlaying ImageView
. So, a SurfaceView
is used to play media with MediaPlayer
, and ImageView
is used then MediaPlayer
preparing media as a still image. Then OnPrepared ImageView
with still image setVisibility
- GONE
and we play video. The problem is with control ImageViews
. As they a png images with transparent graphics then overlaying on ImageView
transparent area looks good, but then MediaPlayer
playing video, transparent area of graphics look very tinted like we disable this controls...
Please help me in advise how to make controls to look the same overlaying ImageView
and SurfaceView
.
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/FrameLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<SurfaceView
android:id="@+id/svMain"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<ImageView
android:id="@+id/ivMain"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/still_image" />
<RelativeLayout
android:id="@+id/controls"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom" >
<ImageView
android:id="@+id/ibtnStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:clickable="true"
android:onClick="ibtnClick"
android:src="@drawable/start_image" />
<ImageView
android:id="@+id/ibtnStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:clickable="true"
android:onClick="ibtnClick"
android:src="@drawable/stop_image" />
</RelativeLayout>
</merge>