在Android的底部按钮栏 [英] Bottom button bar in android

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

问题描述

我不知道它是如何可以创建一个BUTTOM栏按钮在Android中,

I am wondering how it's possible to create a buttom bar buttons in android,

我读了一些有关此UI解决方案,在那里,可以使用任何控制?

I read something about this UI solution, are there any controls that can be used?

推荐答案

您可以做这样的事情一个相对布局内

You can do something like this inside a relative layout

<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:orientation="horizontal"
    android:layout_alignParentBottom="true" style="@android:style/ButtonBar">

    <Button android:id="@+id/saveButton" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_weight="1"
        android:text="@string/menu_done" />

    <Button android:id="@+id/cancelButton" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_weight="1"
        android:text="@string/menu_cancel" />
</LinearLayout>

这篇关于在Android的底部按钮栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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