android - How to show my layout below the navigation drawer? -


i have implemented navigation drawer following this. after adding in xml activity not showing imageview in center position. following xml file

enter image description here

<android.support.v7.widget.toolbar     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/toolbar"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="#2ba886"     app:contentinsetend="0dp"     app:contentinsetstart="0dp" > </android.support.v7.widget.toolbar>  <android.support.v4.widget.drawerlayout     android:id="@+id/drawerlayout"     android:layout_width="match_parent"     android:layout_height="match_parent" >      <framelayout         android:id="@+id/content_frame"         android:layout_width="match_parent"         android:layout_height="match_parent" >        <!--   <relativelayout             android:layout_width="match_parent"             android:layout_height="match_parent"             android:background="#fff" > -->              <imageview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:background="@drawable/logo_img"                  />      </framelayout>      <relativelayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_gravity="left|start"         android:background="#fff" >          <listview             android:id="@+id/left_drawer"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:background="#fff"             android:divider="#eee"             android:dividerheight="1dp" />     </relativelayout> </android.support.v4.widget.drawerlayout> 

the problem imageview layout_gravity option not comming please help..

do way

<android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/drawer_layout"     android:layout_width="match_parent"     android:layout_height="match_parent" >      <!-- framelayout display fragments -->      <linearlayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical" >          <include layout="@layout/actionbar" />          <framelayout             android:id="@+id/frame_container"             android:layout_width="match_parent"             android:layout_height="match_parent" >         </framelayout>     </linearlayout>      <!-- listview display slider menu -->      <linearlayout         android:id="@+id/list_slidermenu"         android:layout_width="240dp"         android:layout_height="match_parent"         android:layout_gravity="start"         android:background="@android:color/white"         android:orientation="vertical" >          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="5dp"             android:text="home"             android:textcolor="@android:color/black"             android:textsize="20sp" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="5dp"             android:text="android"             android:textcolor="@android:color/black"             android:textsize="20sp" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="5dp"             android:text="sitemap"             android:textcolor="@android:color/black"             android:textsize="20sp" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="5dp"             android:text="about"             android:textcolor="@android:color/black"             android:textsize="20sp" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="5dp"             android:text="contact me"             android:textcolor="@android:color/black"             android:textsize="20sp" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <imageview             android:layout_width="100dp"             android:layout_height="100dp"             android:layout_gravity="center_horizontal"             android:padding="10dp"             android:src="@drawable/ic_launcher" />          <view             android:layout_width="match_parent"             android:layout_height="1dp"             android:background="@android:color/black" />          <button             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="button1" />          <button             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="button2" />          <button             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="button3" />     </linearlayout>  </android.support.v4.widget.drawerlayout> 

remove list view , set drawer item click manually.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -