| 1 |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 |
<#if adFormat == "banner">xmlns:ads="http://schemas.android.com/apk/res-auto"</#if> |
| 3 |
xmlns:tools="http://schemas.android.com/tools" |
| 4 |
android:layout_width="match_parent" |
| 5 |
android:layout_height="match_parent" |
| 6 |
tools:context="${relativePackage}.${activityClass}"> |
| 7 |
|
| 8 |
<#if adFormat == "banner"> |
| 9 |
<TextView |
| 10 |
android:text="@string/hello_world" |
| 11 |
android:layout_width="wrap_content" |
| 12 |
android:layout_height="wrap_content" /> |
| 13 |
|
| 14 |
<!-- view for AdMob Banner Ad --> |
| 15 |
<com.google.android.gms.ads.AdView |
| 16 |
android:id="@+id/adView" |
| 17 |
android:layout_width="wrap_content" |
| 18 |
android:layout_height="wrap_content" |
| 19 |
android:layout_centerHorizontal="true" |
| 20 |
android:layout_alignParentBottom="true" |
| 21 |
ads:adSize="BANNER" |
| 22 |
ads:adUnitId="@string/banner_ad_unit_id" /> |
| 23 |
|
| 24 |
<#elseif adFormat == "interstitial"> |
| 25 |
<!-- view for AdMob Interstitial Ad --> |
| 26 |
<TextView |
| 27 |
android:id="@+id/app_title" |
| 28 |
android:layout_width="wrap_content" |
| 29 |
android:layout_height="wrap_content" |
| 30 |
android:layout_centerHorizontal="true" |
| 31 |
android:layout_marginTop="50dp" |
| 32 |
android:text="@string/interstitial_ad_sample" |
| 33 |
android:textAppearance="?android:attr/textAppearanceLarge" /> |
| 34 |
|
| 35 |
<TextView |
| 36 |
android:id="@+id/level" |
| 37 |
android:layout_width="wrap_content" |
| 38 |
android:layout_height="wrap_content" |
| 39 |
android:layout_below="@+id/app_title" |
| 40 |
android:layout_centerHorizontal="true" |
| 41 |
android:text="@string/start_level" |
| 42 |
android:textAppearance="?android:attr/textAppearanceLarge" /> |
| 43 |
|
| 44 |
<Button |
| 45 |
android:id="@+id/next_level_button" |
| 46 |
android:layout_width="wrap_content" |
| 47 |
android:layout_height="wrap_content" |
| 48 |
android:layout_centerHorizontal="true" |
| 49 |
android:layout_centerVertical="true" |
| 50 |
android:text="@string/next_level" /> |
| 51 |
</#if> |
| 52 |
</RelativeLayout> |