DrawerLayout und Webview

T

tefracky

App-Anbieter (kostenlos)
184
Hallo,

ich habe ein kleines Problem beim Layout, dass ich einfach nicht gelöst bekomme: Ich habe ein Drawerlayout, in das nun eine Webview geöffnet werden soll. Die Webview soll aber nicht die gesamte Statusleiste verbergen, sondern erst darunter anfangen, damit man auch wieder ins Menü kommt. Ich habe die Webview auch schon in das DrawerLayout gelegt, aber das hat auch nicht weitergeholfen. Wer sieht den Fehler?

Gruß

Tefracky

Code:
<?xml version="1.0" encoding="utf-8"?>
<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:animateLayoutChanges="true">

    <android.support.v4.widget.DrawerLayout 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:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/adView"
        android:fitsSystemWindows="true"
        tools:openDrawer="start">

        <include
            layout="@layout/app_bar_main"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/nav_bar"/>

        <android.support.design.widget.NavigationView
            android:id="@+id/nav_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true"
            app:headerLayout="@layout/nav_header_main"
            app:menu="@menu/activity_main_drawer" />

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

    <WebView
        android:id="@+id/activity_main_webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@layout/app_bar_main"
        android:layout_above="@+id/textView"
        android:visibility="invisible" />

</RelativeLayout>
 
Hab es mir noch nicht ausführlich angesehen aber probiere es doch erstmal mit dem marginTop
[doublepost=1517685134,1517683711][/doublepost]Wie sieht es denn aus, wenn du die AppBar oberhalb des DrawerLayout positionierst und dann AppBar onTop positionierst und das DrawerLayout below.

Wo sind denn deine Positionierungen für das RelativLayout?
 
Zuletzt bearbeitet:
Danke für die Anregungen! Ich habe die webview in den main_content verlagert und jetzt geht alles einwandfrei.
 

Ähnliche Themen

M
  • MikelKatzengreis
Antworten
5
Aufrufe
128
swa00
swa00
K
Antworten
3
Aufrufe
1.168
Kapikalaani
K
H
Antworten
0
Aufrufe
933
HoustonWeHaveAProblem
H
Zurück
Oben Unten