ScrollView
来源:互联网 发布:金融工程硕士就业 知乎 编辑:程序博客网 时间:2024/05/17 06:37
今天在开发的时候,出现了一个错误提示:
02-23 05:26:55.564: ERROR/AndroidRuntime(447): Caused by: java.lang.IllegalStateException: ScrollView can host only one direct child
经查文档发现这么一句话:
A child that is often used is a LinearLayout
in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through.
于是把scrollView往前挪动一下即可
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</LinearLayout>
</ScrollView>
- ScrollView
- ScrollView
- scrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- scrollView
- ScrollView
- ScrollView
- scrollview
- ScrollView
- ScrollView
- scrollView
- ScrollView
- Python IDLE快捷键
- 推荐给开发人员的实用命令行工具
- 在阿里云的云服务器上:Linux服务器安装-Apache/nginx+mysql+PHP
- HashMap、Hashtable、LinkedHashMap、和TreeMap介绍和区别
- 为什么苹果三星将主宰智能电视未来?
- ScrollView
- 15款有趣的诺基亚概念手机回顾
- 设计模式读书笔记(一)单例模式
- iBatis3基于方言(Dialect)的分页
- 苹果申请可触摸柔性屏幕专利:iWatch即将来临
- Android代码混淆的实践
- 将图像作为列表项标记
- ConcurrentHashMap之实现细节
- C#中Convert.ToInt32()和int.Parse()的区别