アプリに派手なバナー広告を実装しています。ただし、フルスクリーンが必要です。私の主な activity.xml は
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/bannerframe" >
</FrameLayout>
<SeekBar
android:id="@+id/volumeBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
そしてJavaで私はこのコードをやっています。
FrameLayout fViewGroup = (FrameLayout)findViewById(R.id.bannerframe);
FlurryAgent.onStartSession(appContext, "My API Key is here");
FlurryAgent.initializeAds(appContext);
FlurryAgent.getAd(appContext, "Deer Hunting Calls",fViewGroup,FlurryAdSize.BANNER_TOP, 0);
以下は私が得ているスクリーンショットです。
add が全画面表示になる理由を知っている人はいますか??? Android:layout_width と height のすべてのオプションを fill_parent、warp_content、match_parent などで試しましたが、それでも同じ結果が得られます。