zoukankan      html  css  js  c++  java
  • 安卓学习第32课——ScrollView

    滚动视图

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <HorizontalScrollView 
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    <LinearLayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
    <TextView 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="滚动视图"
     />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />    
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />
    <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:text="滚动视图滚动视图滚动视图滚动视图"
        android:textSize="30sp" />    
    </LinearLayout>
    </HorizontalScrollView>
        
    </ScrollView>

    scrollView是垂直滚动条

    HorizontalView是水平滚动条

  • 相关阅读:
    mysql 基础整合大全
    django 完整日志配置
    rest_framework视图基类与五个扩展类
    Nginx + uWSGI 配置django---终极版
    小程序 textarea ios兼容解决
    小程序调取数字键盘,没有小数点解决办法
    消息框-提示框
    h5页面长按保存图片
    解决浏览器自动填充input
    angularJS(2)
  • 原文地址:https://www.cnblogs.com/Yvettey-me/p/3970012.html
Copyright © 2011-2022 走看看