How to adjust height of toolbar in lollipop devices in android -


i using toolbar in app. toolbar's height can adjusted correctly in pre-lollipop devices, toolbar getting cut bottom in lollipop devices means not showing completely. please me.

xml code toolbar is:

<android.support.v4.widget.drawerlayout  xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawermainactivity" android:layout_width="match_parent" android:layout_height="match_parent">  <framelayout     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/containerview">      <android.support.v7.widget.toolbar         xmlns:android="http://schemas.android.com/apk/res/android"         android:layout_width="match_parent"         android:layout_height="?android:attr/actionbarsize"         android:gravity="center"         android:minheight="?android:attr/actionbarsize"         android:background="?attr/colorprimary"         app:navigationicon="@drawable/save"         android:id="@+id/toolbar"         android:theme="@style/themeoverlay.appcompat.dark"     android:fitssystemwindows="true"/>   </framelayout>  <android.support.v7.widget.recyclerview     android:layout_width="217dp"     android:layout_height="match_parent"     android:id="@+id/recyclerview"     android:scrollbars="vertical"     android:background="#ffffff"     android:layout_gravity="left" /> 

i guess using appcompat? change attribute height to:

android:layout_height="?attr/actionbarsize" 

and set android:fitssystemwindows="true" on framelayout.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -