Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器 软件资源

软件开发小程序制作系统集成与运维空间租用硬件开发视频监控技术咨询与支持——联系电话:0311-88999002/88999003

首页 / 操作系统 / Linux / Android实现TextView垂直滚动显示

Android利用TextView显示信息时,由于内容过多,不能在一屏中显示所有内容,所以需要下拉滚动条实现内容的显示。如下图所示:layout实现代码是:
<ScrollViewxmlns:android="http://schemas.android.com/apk/res/android" 
        android:layout_width="fill_parent" android:layout_height="fill_parent" 
        android:scrollbars="vertical" android:fadingEdge="vertical"> 
        <TextView android:layout_width="fill_parent" 
            android:layout_height="wrap_content" android:id="@+id/description1" 
            android:textColor="#071907" android:paddingTop="5dip" /> 
    </ScrollView>