android - Let view flow on toolbar's hamburger image -


i creating fragment got navigation drawer , tool bar. toolbar's part:

<android.support.v7.widget.toolbar     android:id="@+id/toolbar"     android:layout_width="match_parent"     android:layout_height="?attr/actionbarsize"     android:background="@color/mainbackground"     android:contentinsetend="0dp"     android:contentinsetleft="0dp"     android:contentinsetright="0dp"     android:contentinsetstart="0dp"     app:contentinsetend="0dp"     app:contentinsetleft="0dp"     app:contentinsetright="0dp"     app:contentinsetstart="0dp">      <relativelayout         android:id="@+id/relativelayouttitlebar"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@color/mainbackground"         android:orientation="vertical"         >          <textview             android:id="@+id/textviewtitle"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:gravity="center"             android:text="title"             android:textcolor="@android:color/white"             android:layout_centervertical="true"             android:textsize="@dimen/very_large_font_size"/>          <view             android:id="@+id/viewtitleunderline"             android:layout_width="match_parent"             android:layout_height="2dp"             android:layout_alignparentbottom="true"             android:background="@color/secondarybackground"/>      </relativelayout>  </android.support.v7.widget.toolbar> 

and connect drawer this:

toolbar = (toolbar) v.findviewbyid(r.id.toolbar); ((appcompatactivity)getactivity()).setsupportactionbar(toolbar); drawer = (drawerlayout) v.findviewbyid(r.id.drawer_layout); actionbardrawertoggle actionbardrawertoggle = new actionbardrawertoggle(getactivity(), drawer, toolbar, r.string.opendrawer, r.string.closedrawer)     {          @override         public void ondrawerclosed(view drawerview)         {             // code here triggered once drawer closes dont want happen leave blank             super.ondrawerclosed(drawerview);         }          @override         public void ondraweropened(view drawerview) {             // code here triggered once drawer open dont want happen leave blank             super.ondraweropened(drawerview);         }     };      //setting actionbartoggle drawer layout     drawer.setdrawerlistener(actionbardrawertoggle);      //calling sync state necessary or else hamburger icon wont show     actionbardrawertoggle.syncstate(); 

it works , hamburger icon appears should, won't let view in toolbar flow on it. specific view want flow "@+id/viewtitleunderline" supposed underline under title , hamburger icon, underline end hamburger icon appeared, meaning there's gap , seems underline doesn't reach until end. how can fix it?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -