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是水平滚动条

  • 相关阅读:
    gitment Error:validation failed错误解决办法
    Hexo博客yilia主题添加Gitment评论系统
    用DateTime的ParseExact方法解析特殊的日期时间
    C#中的日期处理函数
    SQL,Linq,Lambda之间的转换练习
    Windows Azure Platform 系列文章目录
    Linq查询表达式
    EF框架的三种工作方式
    jQuery UI 实现图片循环显示,常用于网站首页banner广告切换
    jQuery UI Datepicker
  • 原文地址:https://www.cnblogs.com/Yvettey-me/p/3970012.html
Copyright © 2011-2022 走看看