android - Drawerlayout Toolbar Scrim color issue -
ive implemented drawer layout,with toolbar in place.
the problem im facing ,when drawer opens toolbar/actionbar's color darker rest of background has black tint applied.
when drawer closed
this how im setting toolbar
private void setupactionbar() { toolbar toolbar = (toolbar) findviewbyid(r.id.custom_toolbar); setsupportactionbar(toolbar); ((imageview) toolbar.findviewbyid(r.id.img_usericon_actionbar)).setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { _drawerlayout.opendrawer(gravitycompat.start); } }); }
custom actionbar/toolbar inflated layout
<android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorbgappstorescreen" android:contentinsetend="0dp" android:contentinsetleft="0dp" android:contentinsetright="0dp" android:contentinsetstart="0dp" android:minheight="?attr/actionbarsize" app:contentinsetend="0dp" app:contentinsetleft="0dp" app:contentinsetright="0dp" app:contentinsetstart="0dp"> <relativelayout android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margintop="10dp" android:orientation="horizontal" android:padding="5dp" android:weightsum="1"> <imageview android:id="@+id/img_usericon_actionbar" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.15" android:gravity="center|left" android:src="@drawable/associate_icon_header" /> <textview android:id="@+id/title" style="@style/textlabelwhite" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="0.85" android:gravity="left" tools:text="lorem ipsum" /> </linearlayout> </relativelayout> </android.support.v7.widget.toolbar>
any pointers im doing wrong?
thanks in advance.
Comments
Post a Comment