Android Navigation Bar with Tool Bar overlap with Actual Toolbar -
i m using android navigation drawer, have 2 screens, copy pasted navigation , changed bar, content page only, page 1 fine , page 2 (highlighted in red) apperaing extra.
kindly please help
<?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.ntu.mobile.proj.docsearch.docsearchactivity"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/doc_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay" /> </android.support.design.widget.appbarlayout> <include layout="@layout/content_docsearch" /> </android.support.design.widget.coordinatorlayout> @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_doc_search); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); spinner = (spinner) findviewbyid(r.id.doc_spinner); bundle extras = getintent().getextras(); username = extras.getstring("username"); userid = extras.getint("userid"); arrayadapter<charsequence> adapter = arrayadapter.createfromresource(this, r.array.specialist_array, android.r.layout.simple_spinner_item); adapter.setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); spinner.setadapter(adapter); drawerlayout drawer = (drawerlayout) findviewbyid(r.id.drawer_doc_layout); actionbardrawertoggle toggle = new actionbardrawertoggle( this, drawer, toolbar, r.string.navigation_drawer_open, r.string.navigation_drawer_close); drawer.setdrawerlistener(toggle); toggle.syncstate(); navigationview navigationview = (navigationview) findviewbyid(r.id.nav_doc_view); navigationview.setnavigationitemselectedlistener(this); view header = navigationview.getheaderview(0); usernametxt = (textview) header.findviewbyid(r.id.profile_name); usernametxt.settext(username); txt_search_docname = (textview) findviewbyid(r.id.txt_search_docname); txt_search_pincode = (textview) findviewbyid(r.id.txt_search_pincode); } <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay" /> </android.support.design.widget.appbarlayout>
Comments
Post a Comment