Android使用ScrollView实现滚动效果.docVIP

  • 11
  • 0
  • 约1.5万字
  • 约 8页
  • 2016-10-15 发布于四川
  • 举报
Android使用ScrollView实现滚动效果

使用ScrollView实现滚动效果 14 Jul ScrollView也是一个Layout布局,可以让它内部的数据显示不下的时候出现滚动条,要注意的是不能在ScrollView中放 多个组件,如果放了多个组件,会出现如下错误:ERROR/AndroidRuntime(271): Caused by: java.lang.IllegalStateException: ScrollView can host only one direct child (ScrollView只能包裹一个直接子元素) 我们看一个例子: ?xml version=1.0 encoding=utf-8? ??? ScrollView android:id=@+id/ScrollView01 ??????? android:layout_width=wrap_content android:layout_height=wrap_content ??????? xmlns:android=/apk/res/android ??????? TableLayout android:id=@+id/TableLayout01 ??????????? android:layout_width=fill_parent android:layout_height=fill_parent ?????????

文档评论(0)

1亿VIP精品文档

相关文档