下载此文档

Android中使用ScrollView实现滚动效果.doc


文档分类:生活休闲 | 页数:约8页 举报非法文档有奖
1/8
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/8 下载此文档
文档列表 文档介绍
使用ScrollView实现滚动效果
14 Jul
ScrollView也是一个Layout布局,可以让它内部的数据显示不下的时候出现滚动条,要注意的是不能在ScrollView中放多个组件,如果放了多个组件,会出现如下错误:ERROR/AndroidRuntime(271): Caused by: : ScrollView can host only one direct child (ScrollView只能包裹一个直接子元素)
我们看一个例子:
<?xml version="" encoding="utf-8"?>
    <ScrollView android:id="@+id/ScrollView01"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        xmlns:android="http://schemas./apk/res/android">
        <TableLayout android:id="@+id/TableLayout01"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:stretchColumns="0" xmlns:android="http://schemas./apk/res/android">
            <TableRow android:layout_width="fill_parent"
                android:layout_height="30dip">
                <TextView android:text="色彩透明度测试" android:textSize="18dip"
                    android:layout_span="2" android:layout_gravity="center"
                    android:layout_width="fill_parent" android:layout_height="fill_parent">
                </TextView>
            </TableRow>
            <TableRow android:layout_width="fill_parent"
                android:layout_height="30dip">
                <TextView android:background="#ff00ff00"
                    android:layout_width="fill_parent" android:layout_height="fill_parent">

Android中使用ScrollView实现滚动效果 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数8
  • 收藏数0 收藏
  • 顶次数0
  • 上传人phl808
  • 文件大小447 KB
  • 时间2017-07-09
最近更新