如何将小部件添加到工具栏并增加其高度

How to add widgets to toolbar and increase its height

我希望在 activity 的工具栏中添加几个 EditText,并根据 Material 设计规范增加其高度,如下图所示:

如何实现这一点,即如何将普通小部件添加到工具栏并增加它的高度?

谢谢!

你不会相信,但它是如此简单:

<?xml version="1.0" encoding="utf-8"?>
<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="250dp"            // Height of toolbar 
android:background="@color/anycolor">

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint=""/>

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint=""/>   

//Add as many widgets as you want

</android.support.v7.widget.Toolbar>