android之ExpandableListView高度显示不全
2015-12-16 17:08
549 查看
<ScrollView
android:id="@+id/myinfo_order_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_white">
<ExpandableListView
android:id="@+id/myinfo_help_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ExpandableListView>
</ScrollView>
这种写法会造成ExpandableListView的高度始终只能显示一个item,后来发现在scrollView里必须加一个LinearLayout,问题解决,不知道为啥
<ScrollView
android:id="@+id/myinfo_order_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/myinfo_help_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ExpandableListView>
</LinearLayout>
</ScrollView>
android:id="@+id/myinfo_order_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_white">
<ExpandableListView
android:id="@+id/myinfo_help_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ExpandableListView>
</ScrollView>
这种写法会造成ExpandableListView的高度始终只能显示一个item,后来发现在scrollView里必须加一个LinearLayout,问题解决,不知道为啥
<ScrollView
android:id="@+id/myinfo_order_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/myinfo_help_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ExpandableListView>
</LinearLayout>
</ScrollView>
相关文章推荐
- Android全屏设置
- 推荐一些顶级的Android开发书籍(转)
- 强烈推荐android studio用的几个插件,androidstudio
- android 自定义dialog弹出和消失动画
- Android Studio 引入第三方jar包和lib工程【一】-- 初识maven仓库
- Android开发之如何使用Intent传递对象
- 如何在android studio中更新maven依赖
- Android 窗体泄露问题
- Android布局属性详解
- Android内存优化杂谈
- Android 目录结构
- android开发的学习路线
- Android实战 - 音心播放器 (MusicActivity - 倒计时 ,进度条实现)
- Android 序列化
- android自定义vendor介绍
- 每日Android1_launchMode
- Androidstudio每次生成APK自增版本号、自动命名
- 关于Android打造一款适用所有view的刷新和加载
- android自定义标题不能填满父控件处理方式
- Android开发环境的搭建