scrollview怎样子可以在maxheight的时候自动占据剩余所有空间? scrollbar 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道我理解的有没有问题,就是button一直跟在scrollview下面,要是超出屏幕的时候scrollview出现滚动,button在最下面?下面是我写的,自己填充textview个数测试高度。<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="20dip" android:scrollbars="vertical" android:id="@+id/sc" android:layout_weight="5" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> </ScrollView> <Button android:layout_weight="0" android:text="确定" android:background="@android:color/darker_gray" android:layout_width="match_parent" android:layout_height="wrap_content" /></LinearLayout> Button那里加一条属性就好了:android:layout_gravity="bottom" 最近项目实在忙的厉害,都忘了这里还有个问题没结掉..第一次用,发现不懂怎样才能回复上面两个热心楼层,帖子又沉了...说两句吧,一楼的住户提供的很完整的代码,但关键是我最下面还有一条黑色的底部绝对位置工具条,不能像那个红色按钮一样跟着上面的scrollview伸展移动位置,我看还是自己研究好了,帖子不好用。 mm生成apk 如何删除已经部署在android虚拟机上的程序? 问一个很呆的关于intent.putEtra()的问题…… android实现指定文件上传 opencore里面如何出LOGV!? 求助:Unfortunately,Launcher has stopped ViewFlipper 动态添加View时空指针问题 关于Android图片滤镜问题 MVP模式中,V通过接口实例化P层好还是直接new P层对象好 求救安卓面试题目 手机QQ这类手机软件是用什么计算机语言编写的 andoird源码修改问题
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="20dip"
android:scrollbars="vertical"
android:id="@+id/sc"
android:layout_weight="5"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
</ScrollView>
<Button
android:layout_weight="0"
android:text="确定"
android:background="@android:color/darker_gray"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>