У меня есть приложение для Android для Android с несколькими кнопками. Я пытаюсь установить объявление в нижней части страницы. Пожалуйста, обратитесь к моему макету ниже:Выравнивание кнопок с помощью AdView
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/MainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/adView"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_top_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/textView0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text=""
android:textColor="@color/text_color"
android:textSize="@dimen/nav_text_size" >
</TextView>
<Button
android:id="@+id/ProceedToScreen31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_action_name"
android:gravity="left|center_vertical"
android:text="@string/TA1"
android:textColor="@color/btn_text_color"
android:textSize="@dimen/button_text_size" >
</Button>
<Button
android:id="@+id/ProceedToScreen32"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_action_name"
android:gravity="left|center_vertical"
android:text="@string/TA2"
android:textColor="@color/btn_text_color"
android:textSize="@dimen/button_text_size" >
</Button>
<Button
android:id="@+id/ProceedToScreen33"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_action_name"
android:gravity="left|center_vertical"
android:text="@string/TA3"
android:textColor="@color/btn_text_color"
android:textSize="@dimen/button_text_size" >
</Button>
<Button
android:id="@+id/ProceedToScreen34"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_action_name"
android:gravity="left|center_vertical"
android:text="@string/TA4"
android:textColor="@color/btn_text_color"
android:textSize="@dimen/button_text_size" >
</Button>
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="@color/line_color" >
</View>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/copyright"
android:textColor="@color/text_color"
android:textSize="@dimen/small_text_size" >
</TextView>
</LinearLayout>
</ScrollView>
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/MY_AD_UNIT_ID"
ads:loadAdOnCreate="true" />
</RelativeLayout>
объявления прекрасно подходим к нижней части страницы, как фиксированная сноска (согласно моему требованию), но наряду с этим другими компонентами страницы также поступает на дно страница выходит, большое пространство в верхней части страницы. Справка PLease. Как я могу выровнять, чтобы только объявление приходилось в нижней части страницы, остальные компоненты должны начинаться с верхней части страницы.
Спасибо. Я знаю об этом, но без layout_above, последние несколько строк страницы скрыты от Ad, поэтому я добавил layout_above. Если у меня есть много контента на странице, даже после прокрутки до страницы, я не могу видеть последние пару строк, которые скрыты в Ad Banner. – Sid