使用线性布局问题自定义菜单 [英] Custom menu using linear layout issue
问题描述
我已经用线性布局Android应用程序自定义菜单。这里的情况是,我已经创建了五个菜单选项卡。我有一个或两个菜单的可见性设置为转眼基于导航我会做。问题是,当我设置一个菜单选项卡来走了知名度,布局舒展明确表示。请指导让出了问题。
I have created a custom menu using linear layout for an android application. The scenario here is that I have created five menu tabs. I have to set the visibility of a menu or two to gone based on the navigation I will do. the problem is when I set the visibility of a menu tab to gone, the stretching of layout is shown explicitly. Please guide to get out of the problem
推荐答案
您可以使用可视性隐形代替。
GONE:视图是完全从布局中删除。
无形:视图没有显示,但它仍然使用它需要的空间。
You could use the visibility "Invisible" instead. GONE: The view is totally removed from your layout. INVISIBLE: The view isn't shown but it still uses the space it needs.
这篇关于使用线性布局问题自定义菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!