android - 为什么这个 Android View 不能垂直填满屏幕?

标签 android view

拥有这个 XML View :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:id="@+id/myScrollLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <ScrollView
        android:id="@+id/widget29"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <ListView
            android:id="@+id/lstView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
        </ListView>
    </ScrollView>
</LinearLayout>

alt text http://img528.imageshack.us/img528/3603/ss3v.jpg

为什么我的 ListView 只显示第一项而没有填满屏幕?

最佳答案

不要将 ListView 放在 ScrollView 中。 ListView 已经知道如何滚动。

关于android - 为什么这个 Android View 不能垂直填满屏幕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2350912/

相关文章:

java - 字符串在同一个类中不可访问

android - 无法通过 Javascript 在 WebView 中加载图像

android - Firebase 实时数据库 DataSnapshot 值到对象的转换

mysql - 在行间计算之前对记录进行排序的选项是什么?

android - 查看 -> getParent() 在 Android 2.3 中工作正常,但在 Android 4+ 中抛出 NullPointerException

android - 我需要一个示例来展示如何读写文件,包括 Android 内部存储的路径

android - GCM 云连接服务器 - 如何开始使用它?

asp.net-mvc - 在 IIS7 中运行时无法在 ASP.NET MVC View 中放置断点

android - 位图图像内存不足

android - 获取 ListView / View 中第一个项目的可见高度