ScrollView垂直滚动控件的使用
2014-04-01 20:54
309 查看
ScrollView控件只是支持垂直滚动,而且在ScrollView中只能包含一个控件,通常是在<ScroolView>标签中定义了一个<LinearLayout>。
标签并且在<LinearLayout>标签中android:orientation属性值设置为vertical,然后在<LinearLayout>标签中放置多个控件,如果<LinearLayout>标签中的控件所占用的总高度超出屏幕的高度,就会在屏幕的右侧出现一个滚动条。
一、建立工程,如图
View Code
四、效果图
标签并且在<LinearLayout>标签中android:orientation属性值设置为vertical,然后在<LinearLayout>标签中放置多个控件,如果<LinearLayout>标签中的控件所占用的总高度超出屏幕的高度,就会在屏幕的右侧出现一个滚动条。
一、建立工程,如图
package com.study.crollview; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
View Code
四、效果图
相关文章推荐
- 【Android 开发】:UI控件之 ScrollView垂直滚动控件 和 HorizontalScrollView水平滚动控件的使用
- 安卓控件使用系列22:ScrollView垂直滚动控件的使用方法
- UI控件之 ScrollView垂直滚动控件 和 HorizontalScrollView水平滚动控件的使用
- Android垂直滚动控件ScrollView使用方法详解
- [Android] ScrollView 垂直滚动控件和 HorizontalScrollView 水平滚动控件的使用
- ScrollView 控件支持垂直滚动
- 屏幕滚动控件ScrollView的使用
- ScrollView垂直滚动控件和HorizontalScrollView水平滚动控件
- IOS ScrollView滚动控件使用
- HorizontalScrollView水平滚动控件使用方法详解
- Android基础控件——ViewFlipper的使用,仿淘宝头条垂直滚动广告条
- ScrollView垂直滚动控件
- Android之ScrollView滚动布局控件使用以及显示新闻网页
- iOS - 支持水平 / 垂直显示自动滚动的跑马灯控件 --- SKAutoScrollLabel 的使用和实现
- Android控件——ViewFlipper的使用,垂直滚动广告条
- Android基础控件——ViewFlipper的使用,仿淘宝头条垂直滚动广告条
- ViewFlipper的使用,仿淘宝头条垂直滚动广告条
- SharePoint 2013 使用嵌入JavaScript方式实现一个垂直滚动列表
- 滚动视图控件ScrollView
- 使用loopView实现滚动单选控件