How to properly add custom view to the toolbar?

爷,独闯天下 提交于 2019-12-03 04:58:28

I believe the toolbar behaves more or less like a LinearLayout, even when it doesn't extend it.

If I'm right, you wouldn't be able to use "two rows" like you intend.

Maybe you can take that EditView out of the toolbar, or alternatively, use ActionBar (With the 'X' icon and the actions) and below a toolbar with the EditText.

You can add a custom layout with EditText below the Toolbar, with the same background color.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!