In my app, I want to implement a screen which should contain some buttons and as a background of the screen, I want a surface view which will show some animation. For this i have extended surface view which shows animation. The problem I am facing is, when i add some buttons, they are not fully opaque. They remain transparent and i can see the background animation through them. I tried setting background colour of the button to #FF000000, still it wasn't fully opaque.
Here is my activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/bg_view"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.myproj.example.widgets.CustomSurfaceView
android:id="@+id/surface_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/test_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#FF000000"
android:text="Should be Opaque" />
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
I have tried Android:How to add a button in surface view, Rendering a button over SurfaceView, but button is still not opaque.