Текст находится над панелью приложения в Scrolling Activity в Android - PullRequest
0 голосов
/ 13 сентября 2018

Я создал новое пустое действие и добавил следующие коды. Но проблема в том, что текст все еще находится над панелью приложения. Как решить эту проблему ... или любое решение, пожалуйста ... Я искал StackOverFlow.but, но я не смог найтилюбой ответ. и дайте мне относительное решение, пожалуйста .. пожалуйста, смотрите ниже изображение GIF .... enter image description here

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout     
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"
  tools:context="com.lars.problem.problem.ScrollingActivity">

<android.support.design.widget.AppBarLayout
  android:id="@+id/app_bar"
  android:layout_width="match_parent"
  android:layout_height="@dimen/app_bar_height"
  android:fitsSystemWindows="true"
  android:theme="@style/AppTheme.AppBarOverlay">

<android.support.design.widget.CollapsingToolbarLayout
    android:id="@+id/toolbar_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    app:contentScrim="?attr/colorPrimary"
    app:layout_scrollFlags="scroll|exitUntilCollapsed">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:layout_collapseMode="pin"
        app:popupTheme="@style/AppTheme.PopupOverlay" />
        </android.support.design.widget.CollapsingToolbarLayout>
  </android.support.design.widget.AppBarLayout>

<RelativeLayout
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_below="@+id/toolbar_layout">

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/adView"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.lars.problem.problem.ScrollingActivity"
    tools:showIn="@layout/activity_scrolling">

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/text_margin"
        android:text="@string/large_text" />
    </LinearLayout>

</android.support.v4.widget.NestedScrollView>

<com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentStart="true"
    app:adSize="SMART_BANNER"
    app:adUnitId="ca-app-pub-3940256099942544/6300978111"/>

 </RelativeLayout>

</android.support.design.widget.CoordinatorLayout>

Спасибо ..

...