我的工具栏和EditText如下所示:
我尝试将其添加为ActionView,但我得到这个结果:
它基本上只是添加了我的单词“点击下面”作为标题没有TextView
这是我做的:
menu.xml文件
...
...
android:id="@+id/edit_text_menu"
android:orderInCategory="300"
android:title="Tap Below"
android:actionLayout="@layout/edit_text_layout"
app:showAsAction="ifRoom|collapseActionView"
/>
edit_text_layout.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/myEditText"
android:background="#000000">
我想通过这样做,我将EditText布局添加到工具栏…
有人可以帮忙吗?
或者,是否有一个技巧可以在工具栏上覆盖EditText?
我尝试添加< item name =“windowActionModeOverlay”> true< / item>但它没有做任何事情.