Reputation: 3261
I need show video into VideoView which locate inside of activity with style (extends of Theme.Dialog).
<resources>
<style name="Custom" parent="android:style/Theme.Dialog">
<item name="android:windowNoTitle">true</item>
</style>
</resources>
Layout:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<VideoView
android:id="@+id/video_surface"
android:layout_width="500dp"
android:layout_height="200dp"
android:layout_marginTop="20dp" />
</FrameLayout>
and I have the next:
As you can see in the left-top corner is transparently. How can I disable that?
Upvotes: 0
Views: 167
Reputation: 3261
Resolution of the problem is correct style for activity on:
<resources>
<style name="Custom">
<item name="android:windowNoTitle">true</item>
<item name="android:gravity">center</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsTranslucent">true</item>
</style>
</resources>
Only in that case you can't close activity by means tap on the gray area around window
Upvotes: 2