android 控件页脚,关于android:在页眉中添加页脚

我有一个滚动视图,其中包含一堆相对布局,这些布局超出了屏幕的高度。 如何添加带有2个"粘贴"到屏幕底部的按钮的线性布局。 这意味着无论我如何滚动滚动视图,线性布局都将始终出现在屏幕底部。

问题已经在这里回答。 请检查stackoverflow.com/a/42864776/2010056

android:id="@+id/RelativeLayout01"

xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

android:id="@+id/my_scrollview"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:layout_marginBottom="72dip"

android:layout_above="@+id/LinearLayout01"

android:scrollbars="horizontal">

android:id="@+id/LinearLayout01"

android:layout_height="wrap_content"

android:layout_width="fill_parent"

android:layout_alignParentBottom="true">

android:id="@+id/Button01"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_weight="1"">

android:id="@+id/Button02"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_weight="1">

是的 它不是可编译的,而是正确的答案。 即这个想法是正确的。 只需在之前声明

您可以使用RelativeLayout来实现。

ScrollView应该放置在按钮栏上方和标题下方(如果适用)。

android:layout_width="fill_parent"

android:layout_height="fill_parent">

android:layout_width="fill_parent" android:layout_height="fill_parent"

android:layout_above="@+id/myFooter">

android:layout_alignParentBottom="true" android:layout_height="wrap_content"

android:layout_width="fill_parent">

+1 ya 321x是正确的,如果它不起作用,则只需将myFooter布局放在您的滚动视图中,然后尝试起作用....谢谢。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值