Объявление не показывается внизу

Я хочу добавить приложения к объявлению. Но я не могу добавить о рекламируемой должности. Коды следующие:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="info.androidhive.materialtabs.fragments.OneFragment">


    <TextView
        android:id="@+id/tarih"
        android:textColor="#04B038"
        android:textSize="15dp"
        android:textStyle="bold"
        android:layout_marginTop="5dp"
        android:layout_gravity="center_horizontal"
        android:text=""
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ListView
            android:id="@+id/olaylar_liste"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"></ListView>

        <ProgressBar
            android:layout_gravity="center_vertical|center_horizontal"
            android:id="@+id/progress_olaylar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </FrameLayout>


        <LinearLayout
            android:layout_gravity="bottom"
            android:orientation="horizontal"
            android:id="@+id/adLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"></LinearLayout>


</LinearLayout>

Я хочу, чтобы объявление показывало дно на линейном выводе. Adview @ + id /adLayout будет отображаться на макете. Пожалуйста, помогите мне.

1 ответ

Решение

Попробуй это

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="info.androidhive.materialtabs.fragments.OneFragment">


    <TextView
        android:id="@+id/tarih"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="5dp"
        android:text="Header"
        android:textColor="#04B038"
        android:textSize="15dp"
        android:textStyle="bold" />

    <LinearLayout
        android:id="@+id/adLayout"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_gravity="bottom"
        android:background="#ff0000"
        android:orientation="horizontal"></LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/adLayout"
        android:layout_below="@+id/tarih">

        <ListView
            android:id="@+id/olaylar_liste"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"></ListView>

        <ProgressBar
            android:id="@+id/progress_olaylar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|center_horizontal" />

    </FrameLayout>


</RelativeLayout>
Другие вопросы по тегам