P
PhillippOh
Fortgeschrittenes Mitglied
- 10
Hey,
ich möchte in meiner Activity ein ScrollView haben und direkt darunter die AdMob Werbung. Bei meiner letzten App war das so, dass das adView den anderen Inhalt (WebView) überlagert hatte, das war aber nicht so schlimm.
Bei meinem jetzigen Projekt stört das aber, wenn die Werbung über Buttosn etc. ist. Die Werbung soll am unteren Bildschirmrand sitzen und das ScrollView soll bis zum adView gehen und dann aufhören.
Hier mal mein Code, bei dem nur das ScrollView auf der kompletten Activity angezeigt wird und die Werbung gar nicht zu sehen ist.
Jemand ne Idee?
Gruß
Phillipp
ich möchte in meiner Activity ein ScrollView haben und direkt darunter die AdMob Werbung. Bei meiner letzten App war das so, dass das adView den anderen Inhalt (WebView) überlagert hatte, das war aber nicht so schlimm.
Bei meinem jetzigen Projekt stört das aber, wenn die Werbung über Buttosn etc. ist. Die Werbung soll am unteren Bildschirmrand sitzen und das ScrollView soll bis zum adView gehen und dann aufhören.
Hier mal mein Code, bei dem nur das ScrollView auf der kompletten Activity angezeigt wird und die Werbung gar nicht zu sehen ist.
Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<EditText
android:id="@+id/etEingabe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@layout/rounded_edittext"
android:ems="10"
android:padding="10dp" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="TextView" />
<EditText
android:id="@+id/etAusgabe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@layout/rounded_edittext"
android:editable="false"
android:ems="10"
android:padding="10dp" />
<Button
android:id="@+id/btnShort"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5pt"
android:layout_marginTop="200pt"
android:text="Button" />
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="XXXXX"
ads:loadAdOnCreate="true"
ads:testDevices="XXXXX" >
</com.google.ads.AdView>
</RelativeLayout>
</LinearLayout>
Jemand ne Idee?
Gruß
Phillipp