android - Navigation Drawer Layout overlapping with main layout -


how main layout line directly underneath drawerlayout? main layout listed below , made of listviews. right overlapping. below first shows drawerlayout. after closing of drawerlayout main activity listed.

<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">   <linearlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">      <linearlayout         android:id="@+id/container_toolbar"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="vertical">          <include             android:id="@+id/toolbar"             layout="@layout/toolbar" />     </linearlayout>      <framelayout         android:id="@+id/container_body"         android:layout_width="fill_parent"         android:layout_height="0dp"         android:layout_weight="1" /> </linearlayout>       <fragment     android:id="@+id/fragment_navigation_drawer"     android:name=“com.example.my.app.fragmentdrawer"     android:layout_width="@dimen/nav_drawer_width"     android:layout_height="match_parent"     android:layout_gravity="start"     android:layout="@layout/fragment_navigation_drawer"     tools:layout="@layout/fragment_navigation_drawer" />      </android.support.v4.widget.drawerlayout>      <linearlayout android:layout_width="match_parent" android:layout_height="match_parent” android:orientation="vertical">   <textview     android:id="@+id/txt_empty_list_cars"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_centerinparent="true"     android:layout_margin="4dp"     android:gravity="center"     android:text="@string/view1"     android:textappearance="?android:attr/textappearance"     android:textcolor="@android:color/darker_gray"     android:visibility="gone" />  <listview     android:id="@+id/list_cars"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_below="@+id/txt_header"     android:layout_margin="4dp"     android:divider="@android:drawable/divider_horizontal_bright"     android:dividerheight="0.5dp"     android:listselector="@android:drawable/list_selector_background" /> 

so, problem drawer layout overlapping linear layout below. use

android: layout_below="@id/drawer_layout"  

in linear layout. linearly arrange both layouts.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -