Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使用Material design实现带下拉菜单的Appbar_Android_Kotlin_Material Components Android - Fatal编程技术网

Android 如何使用Material design实现带下拉菜单的Appbar

Android 如何使用Material design实现带下拉菜单的Appbar,android,kotlin,material-components-android,Android,Kotlin,Material Components Android,我想构建像这样的appbar 但我的xml代码显示了这一点 这是我的密码 <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:paddingStart="32dp" andro

我想构建像这样的appbar

但我的xml代码显示了这一点

这是我的密码

<com.google.android.material.appbar.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:paddingStart="32dp"
    android:paddingLeft="12dp"
    android:paddingEnd="32dp"
    android:paddingRight="12dp"
    app:elevation="0dp">
    
    <com.google.android.material.textfield.TextInputLayout
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:endIconMode="dropdown_menu" >                 

        <com.google.android.material.textfield.MaterialAutoCompleteTextView
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:inputType="none" />

    </com.google.android.material.textfield.TextInputLayout>
      
</com.google.android.material.appbar.AppBarLayout>