子菜单在方向改变时消失
我有一个 Android 应用程序,它显示一个菜单项,选择该菜单项时会显示一个子菜单。当设备方向改变时,子菜单消失?
我已阅读相关帖子,但没有一个真正涉及子菜单项。我是否使用“保存/恢复”,以某种方式检查子菜单项是否显示,然后以某种方式恢复它?使用“配置更改时”并执行相同的操作?
除了子菜单项之外,其他所有内容都随着方向变化而显示良好。如果有人有任何想法,我很高兴听到他们的声音。谢谢。
I have an android app that displays a menu item that when selected shows a sub-menu. When the device orientation is changed the sub-menu disappears?
I have read the related posts, but none of them actually deal with a sub-menu item. Do I use on "saved/on restore", somehow check to see if the sub-menu item is displayed and then somehow restore it? Use "on configuration change" and do the same thing?
Everything else displays fine with orientation changes except for the sub-menu items. If anyone has any ideas I would be glad to hear them. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在设计屏幕时,应根据横向和纵向模式来设计场景。在设计部分,尝试两种模式,调整合适的横向和纵向设计。这样,如果您改变方向,您的设计将是正确的。
while you are desinging screen, you should desing scene according to landscape and portrait mode. In design part, try two mode and adjust proper design for landscape and portrait. so that if you are change the orientation your desing will be proper.