I have an app that loads a flash video player inside a webview, i want to add some ads to the app using admob, but whatever combination of xml layouts i try, the ads always go behind the video.
does anyone know how to put the ads above the swf file?
my main.xml file currently looks like this:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<RelativeLayout
android:id="@+id/webview_container"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
<WebView android:id="@+id/web_engine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/ad_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_alignBottom="@+id/home_layout"
>
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="a14f4c18e44fce4"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"
/>
</RelativeLayout>
</FrameLayout>
Flash in a WebView is always displayed on top of other views, you can subclass the WebView class to override the default behaviors.