Android中多个UI控件实现滚动
来源:互联网 发布:python和java哪个好学 编辑:程序博客网 时间:2024/05/16 10:39
上上篇博客中提到 单个TextView实现滑动查看的方法
若现在有多个TextView 或者是多个TextView和ImageView在同一个布局内 再用Scroll是不行的 因为Scroll内只能包含一个对象
所以要将Layout整体放在Scroll下
代码示例如下
<?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="fill_parent" android:background="@drawable/timg" android:scrollbars="vertical"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="1"> <TextView android:text="111111" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/textView1" android:layout_alignParentTop="true" android:layout_alignParentStart="true" />
<TextView android:text="22222" android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ImageView android:src="@drawable/uml" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView" />
………… </LinearLayout></ScrollView>
0 0
- Android中多个UI控件实现滚动
- Android实现图片滚动控件
- Android实现图片滚动控件
- android UI中滚动条目的实现
- QT 实现在ui控件QLabel中实现滚动字幕
- 【Android 开发】:UI控件之 ScrollView垂直滚动控件 和 HorizontalScrollView水平滚动控件的使用
- Android自定义控件, 实现图片无限滚动
- Android实现图片滚动控件,含页签
- Android实现图片滚动控件,含页签功能
- Android 实现平滑滚动的歌词控件
- android 字符滚动控件Ticker的实现
- 控件的滚动实现
- Unity,UI实现滚动内容
- Android 时间滚动控件
- Android 视差滚动控件
- android之滚动控件
- 【Android UI】ViewPager禁止滚动
- UI控件之ScrollView(滚动条)
- 枚举可能的组合
- Common LISP娘好萌呀,特开一坑,专门记录
- 成为优秀程序员,从谦虚做起
- 递归递推练习 K
- HDU 1301 Jungle Roads【最小生成树,prim】
- Android中多个UI控件实现滚动
- Qt与MySQL交互出现乱码
- 递归递推练习 J
- Cannot find a valid baseurl for repo: base/7/x86_64
- 虚拟机中linux系统无法打开原保存的显示器配置解决方法
- 最近的学习心得
- Oracle存储过程表名称列名称做参数,动态SQL
- JavaScript内置对象
- 如何用java实现不同编码方式字符串的转换(包含异常处理、重复不终止输入、缓冲区bufferedreader的使用)