Android:在底部创建自定义菜单 [英] Android: creating a custom menu on the bottom

查看:72
本文介绍了Android:在底部创建自定义菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在屏幕底部创建一个自定义菜单,此菜单将作为按钮,并且始终始终是可见的,如果用户向下滚动,则它将可见,向上滚动.

I would like to create a custom made menu on the bottom of the screen, This menu will be as buttons and, it will always be visible first, if the user scrolls down, it will be visible, and scrolls upp.

这怎么可能?

推荐答案

此菜单始终可见吗?还是仅在按下菜单"按钮时出现?

Is this menu always visible? or does it only appear when the "menu" button is pressed?

执行此操作的一种简单方法是将RelativeLayout用作您的主要ViewGroup.创建第二个包含菜单项的ViewGroup(LinearLayout,RelativeLayout ...或其他),并将整个组锚定到屏幕底部.如果要这样做,则将ListView放在第二个组的上方,它将占据菜单控件上方的所有空间,并且菜单控件本身始终是可见的.

An easy way to do this is to use a RelativeLayout as your main ViewGroup. Create a second ViewGroup (LinearLayout, RelativeLayout... or whatever) that contains your menu items and anchor the whole group to the bottom of the screen. If you were to then, put a ListView above that second group it would occupy all the space above your menu controls and the menu controls themselves would always be visible.

希望是有帮助的.

这篇关于Android:在底部创建自定义菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆