解决方案 »

  1.   

    不知道我理解的有没有问题,就是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>
      

  2.   

    Button那里加一条属性就好了:android:layout_gravity="bottom"
      

  3.   

    最近项目实在忙的厉害,都忘了这里还有个问题没结掉..第一次用,发现不懂怎样才能回复上面两个热心楼层,帖子又沉了...说两句吧,一楼的住户提供的很完整的代码,但关键是我最下面还有一条黑色的底部绝对位置工具条,不能像那个红色按钮一样跟着上面的scrollview伸展移动位置,我看还是自己研究好了,帖子不好用。