Android:如何创建类似于日历应用程序的布局 - 创建事件
我正在尝试创建一个与 Android 2.x 上本机日历应用程序的“创建事件”屏幕非常相似的表单 基本上它有一个固定的页眉,固定的页脚,中间是(我猜)一个带有不同“问题”的 ScrollView
,例如“事件”,“从”,“到”,“位置”等。 ..
我尝试了一些选项,但我找不到不涉及计算屏幕高度的正确布局。
任何帮助将不胜感激!
I'm trying to create a form very similar to the "Create event" screen of the native Calendar app on Android 2.x
Basically it has a fixed header, fixed footer and the middle is (I guess) a ScrollView
with different "questions" such as "Event", "From", "To", "Location" etc...
I've tried a few options but I can't find the right layout that doesn't involve calculating the height of the screen
Any help would be very much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用相对布局:
将所有中间位放在这里,也许在 TableLayout 中
您将不得不原谅我所有的颜色位,但您明白了。
我认为它在RelativeLayout中使用alignParent元素,这是关键
I use a RelativeLayout:
Put all your middle bits here, maybe in a TableLayout
You'll have to excuse all my colour bits, but you get the idea.
It's using alignParent elements in a RelativeLayout which is key, I think