我需要在菜单项中添加带有标题的编辑文本?
我已经创建了带有项目标题的菜单 小数位 .但是我想添加一个编辑文本以输入该项目的小数位。或显示带有文本框的自定义对话框以输入小数位
将
EditText
添加到工具栏的 XML 的最简单方法
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/my_edit_text"
android:background="#000000" />
</android.support.v7.widget.Toolbar>