How can I create a toolbar/actionbar that combines the default actiondrawertoggle button (with the burger-arrow animation) with an edittext and a simple button like this?
Asked
Active
Viewed 423 times
0
-
1What is "burger-arrow animation"? – Jared Burrows Jul 01 '15 at 16:43
-
when you open the drawer, the left button gets transformed to an arrow – DennisVA Jul 01 '15 at 17:27
1 Answers
0
Toolbar
is a ViewGroup
, so, you can use a Toolbar
as a FrameLayout
.
Here is a simple example, take a look at it:
<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_appcompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
//customize your toolbar content layout here.
</LinearLayout >
</android.support.v7.widget.Toolbar>
Hope you'll be inspired.

SilentKnight
- 13,761
- 19
- 49
- 78