scrollview 中放LinearLayout 或imageview下面有空白区域

来源:互联网 发布:mysql 主键自增 编辑:程序博客网 时间:2024/05/01 15:48
有时候在scrollview中放置其他组件时,如imageview不能完全充满scrollview 我也试出来的可以:<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollView1"
    android:layout_width="fill_parent"  // 关键设置
    android:layout_height="fill_parent"  // 关键设置  不能用match_parent
    android:fillViewport="true" 
    android:layout_alignParentBottom="true" >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"   // 关键设置

        android:orientation="vertical" >

    </LinearLayout>
</ScrollView>

如此就解决了。 但不是很理解,高手请指教

0 1
原创粉丝点击