本文转自:http://hi.baidu.com/laoyang1018/blog/item/b34b241f3c7b44d6a78669b1.html

Android SDK有两个滚动组件,HorizontalScrollView和ScrollView。一个是水平滚动,另一个是垂直滚动。两个嵌套使用,可实现水平和垂直滚动。

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<HorizontalScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
<RelativeLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<!-- 此处省略的组件的配置 -->
... ...
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>

更多相关文章

  1. Android(安卓)短信 彩信 wap push的接收
  2. layout_marginBottom的使用(将VIEW放置在布局底部)
  3. 高焕堂讲解之 Intent-based Programming
  4. Android中组件的动画效果之平移动画
  5. Android官方架构组件ViewModel+LiveData+DataBinding架构属于自
  6. android生态之应用篇
  7. Android复习笔记--Intent
  8. android studio-GridLayout网格布局设计简易的计算器界面
  9. Android实现EventBus登录界面与传值(粘性事件)

随机推荐

  1. Android知识点回顾
  2. Android根据联系人姓名首字符顺序读取通
  3. android不是内部或外部命令,也不是可运行
  4. Graphics architecture
  5. 为什么iOS平台更容易吸引开发者?
  6. TextView中的文字添加阴影效果及Style的
  7. 27:活用Android的Message Queue(2/3)
  8. android中json的序列化与反序列化
  9. Android之Service设置android:process作
  10. android 程序调试出现source not found的