I am trying to get the AdView directly under TabHost. RelativeLayout allows this to happen with android:layout_alignParentBottom="true" , however it overrides the contents of the TabHost and does it for the ScrollView, which I add inside each tab (this will probably happen for any views that were tall enough)
Currently, the closest I can get TabHost and AdView in my own separate space on the screen using this code (below), which allows me to have Ad directly above TabHost ... so close, any ideas?
<? xml version = "1.0" encoding = "utf-8"?>
<LinearLayout
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">
<com.google.ads.AdView
android: id = "@ + id / ad"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
ads: adSize = "BANNER"
ads: adUnitId = "####"
ads: loadAdOnCreate = "true"
ads: testDevices = "####" />
<TabHost
android: id = "@ android: id / tabhost"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content">
<LinearLayout
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: orientation = "vertical">
<TabWidget
android: id = "@ android: id / tabs"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content" />
<FrameLayout
android: id = "@ android: id / tabcontent"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent" />
</LinearLayout>
</TabHost>
</LinearLayout>
android android-layout android-tabhost admob android-linearlayout
skyllo
source share