大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索
打印 上一主题 下一主题

[教学]android ScrollView遮挡其他控件ScrollView overlapping buttons

[复制链接]
跳转到指定楼层
1#
发表于 2012-7-8 22:41:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[教学]android ScrollView遮挡其他控件ScrollView layout overlapping footer buttons。
在activity_main.xml,只需加个LinearLayout,然后把button放进里面即可实现footer。
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.     xmlns:tools="http://schemas.android.com/tools"
  3.     android:layout_width="match_parent"
  4.     android:layout_height="match_parent" >
  5.    
  6.         <ScrollView
  7.         android:id="@+id/scrllvwNo1"
  8.         android:layout_width="fill_parent"
  9.         android:layout_height="fill_parent"

  10.     android:layout_above="@+id/LinearLayout01" >
  11.             <TableLayout
  12.                     android:layout_width="fill_parent"
  13.                     android:layout_height="fill_parent"
  14.                     android:stretchColumns="0,1"
  15.                     android:id="@+id/maintable" >
  16.             </TableLayout>

  17.         </ScrollView>
  18.        
  19.         <LinearLayout
  20.     android:id="@+id/LinearLayout01"
  21.     android:layout_height="wrap_content"
  22.     android:layout_width="fill_parent"
  23.     android:layout_alignParentBottom="true">

  24.             <Button
  25.                 android:id="@+id/btnGetMoreResults"
  26.                 android:layout_width="wrap_content"
  27.                 android:layout_height="wrap_content"
  28.                 android:layout_weight="0"
  29.                 android:text="Get more">
  30.             </Button>
  31.         </LinearLayout>

  32. </RelativeLayout>
复制代码

手机版|大马资讯论坛  

GMT+8, 2024-4-27 22:33 , Processed in 0.020349 second(s), 11 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表