我正在尝试使用 ListView 作为项目的 ListView ,只有第一行在内部 ListView ( ListView 项目)中可见。
我的 ListView 项目 xml 是:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/main_bg" >
<ListView
android:id="@+id/numbers_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@null"
android:divider="@null" >
</ListView>
</RelativeLayout>
最佳答案
你不能有 scrollable view in other scrollable views .如果将 ListView 放在 ScrollView
中,也会发生同样的情况。
为了您的目的,为什么不实现多个 View 项目类型?示例 here或 here .
关于android - 以Listview为item的Listview,内部listview不完全可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19930596/