展会信息港展会大全

Android - 保持在底部的按钮栏,上面是滚动的ScrollView
来源:互联网   发布日期:2015-10-03 10:53:52   浏览:1339次  

导读:这里要用到相对布局,在ScrollView里放置自己的内容views[html] 1.<?xml version="1.0" encoding="utf-8"?> 2.<Relat...

这里要用到相对布局,在ScrollView里放置自己的内容views

[html]

01.<?xml version="1.0" encoding="utf-8"?>

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

03.android:layout_width="fill_parent"

04.android:layout_height="fill_parent">

05.<LinearLayout

06.android:id="@+id/buttonLayout"

07.android:layout_alignParentBottom="true"

08.android:layout_height="wrap_content"

09.android:layout_width="fill_parent"

10.android:orientation="horizontal">

11.<Button

12.android:text="AAAA"

13.android:layout_height="wrap_content"

14.android:layout_width="fill_parent"

15.android:layout_weight="1"/>

16.<Button

17.android:text="BBBB"

18.android:layout_height="wrap_content"

19.android:layout_width="fill_parent"

20.android:layout_weight="1"/>

21.</LinearLayout>

22.<ScrollView

23.android:layout_above="@id/buttonLayout"

24.android:layout_width="fill_parent"

25.android:layout_height="fill_parent">

26.</ScrollView>

27.</RelativeLayout>

看来各种布局,特别是常用的几个还要好好研究一下埃

赞助本站

人工智能实验室

相关热词: android开发 教程

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港