ScrollView can host only one direct child
来源:互联网 发布:图片管理系统源码 编辑:程序博客网 时间:2024/05/21 09:48
出现这个的原因是由于ScrollView内部同时出现2个不并列的布局
ScrollView内部只能有一个子元素,即不能有并列的布局
如果想要多个并列的布局,可以把并列的布局放到ScrollView的一个布局里面
如下eg:
<ScrollView android:layout_height="match_parent" android:layout_width="match_parent"> <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical"> <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="111"/> </LinearLayout> <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="111"/> </LinearLayout> </LinearLayout></ScrollView>
阅读全文
0 0
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- scrollview can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView can host only one direct child
- ScrollView:ScrollView can host only one direct child异常
- Android 控制台异常:ScrollView can host only one direct child
- android:ScrollView can host only one direct child
- ScrollView can host only one direct child 解决
- android 异常:ScrollView can host only one direct child
- Android 控制台异常:ScrollView can host only one direct child .
- "ScrollView can host only one direct child"问题解决
- 把博客同时部署到github和coding上
- 2016ICPC大连站 D A Simple Math Problem【GCC+方程】
- ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 G题Bounce
- 最全iOS数据存储方法介绍:FMDB,SQLite3 ,Core Data,Plist,Preference偏好设置,NSKeyedArchiver归档
- wordpress配置wp-config.php的一个小坑
- ScrollView can host only one direct child
- Python 队列
- IAR 编译器仿真调试开始时的PC指针指向ResetISR()
- 多线程
- JS中正则表达式验证
- SwaggerUI API在线文档神器
- Hive 用ROW_NUMBER取每组top n
- 大数据架构设计
- 1024 矩阵中不重复的元素