Robotium--scroll操作系列
上下滚动
scrollDown
- public boolean scrollDown()
- Scrolls down the screen.
- Returns:
- true if more scrolling can be performed
- false if it is at the end of the screen
滚动条进行向下操作
返回:
true-如果可以进行滚动的话
false-如果已经滚动到底部,无法滚动
scrollUp
- public boolean scrollUp()
- Scrolls up the screen.
- Returns:
- true if more scrolling can be performed
- false if it is at the top of the screen
滚动条进行向上操作
返回:
true-如果可以进行滚动的话
false-如果已经滚动到顶部,无法滚动
scrollToBottom
- public void scrollToBottom()
- Scrolls to the bottom of the screen.
向下滚动屏幕,一直滚动到底部
scrollToTop
- public void scrollToTop()
- Scrolls to the top of the screen.
向上滚动屏幕,一直滚动到顶部
对列表
scrollDownList
- public boolean scrollDownList(android.widget.AbsListView list| int index)
- Scrolls down the specified AbsListView.
- Parameters:
- list - the AbsListView to scroll
- index - the index of the ListView to scroll. 0 if only one list is available
- Returns:
- true if more scrolling can be performed
操作一个list向下滚动
参数:
list-被操作的滚动条的对象
index-被操作的滚动条索引,如果是0,表示只有一个可以滚动的list
返回:
true-如果可以进行滚动的话
false-如果已经滚动到底部,无法滚动
scrollUpList
- public boolean scrollUpList (android.widget.AbsListView list | int index)
- Scrolls up a ListView matching the specified index.
- Parameters:
- list - the AbsListView to scroll
- index - the index of the ListView to scroll. 0 if only one list is available
- Returns:
- true if more scrolling can be performed
操作一个list向上滚动
参数:
list-被操作的滚动条的对象
index-被操作的滚动条索引,如果是0,表示只有一个可以滚动的list
返回:
true-如果可以进行滚动的话
false-如果已经滚动到顶部,无法滚动
scrollListToBottom
- public boolean scrollListToBottom (android.widget.AbsListView list | int index)
- Scrolls to the bottom of the specified AbsListView.
- Parameters:
- list - the AbsListView to scroll
- index - the index of the ListView to scroll. 0 if only one list is available
- Returns:
- true if more scrolling can be performed
操作一个list向下滚动一直滚动到底部
参数:
list-被操作的滚动条的对象
index-被操作的滚动条索引,如果是0,表示只有一个可以滚动的list
返回:
true-如果可以进行滚动的话
false-如果已经滚动到底部,无法滚动
scrollListToTop
- public boolean scrollListToTop (android.widget.AbsListView list | int index)
- Scrolls to the top of the specified AbsListView.
- Parameters:
- list - the AbsListView to scroll
- index - the index of the ListView to scroll. 0 if only one list is available
- Returns:
- true if more scrolling can be performed
操作一个list向上滚动一直滚动到顶部
参数:
list-被操作的滚动条名称
index-被操作的滚动条索引,如果是0,表示只有一个可以滚动的list
返回:
true-如果可以进行滚动的话
false-如果已经滚动到顶部,无法滚动
scrollListToLine
- public void scrollListToLine (android.widget.AbsListView list | int index , int line)
- Scroll the specified AbsListView to the specified line.
- Parameters:
- absListView - the AbsListView to scroll
- index - the index of the AbsListView to scroll
- line - the line to scroll to
操作滚动条滚动到list的某一行
参数:
list-被操作的滚动条名称
index-被操作的滚动条索引
line-滚动到第几行
水平滚动
scrollToSide
- scrollToSide
- void scrollToSide (int side [, float scrollPosition])
- Scrolls horizontally.
- Parameters:
- side - the side to scroll; RIGHT or LEFT
- scrollPosition - the position to scroll to, from 0 to 1 where 1 is all the way. Example is: 0.60.
水平滚动屏幕,可限制操作滚动的位置
参数:
side-水平滚动的方向,LEFT或者RIGHT
scrollPosition-滚动屏幕的比例,从0到1,如果是0.5,则只会对一半的屏幕进行滚动
scrollViewToSide
- public scrollViewToSide (android.view.View.view view, int side [, float scrollPosition])
- Scrolls a View horizontally.
- Parameters:
- view - the View to scroll
- side - the side to scroll; RIGHT or LEFT
- scrollPosition - the position to scroll to, from 0 to 1 where 1 is all the way. Example is: 0.60.
水平滚动某一个view,可限制操作滚动的位置
参数:
view-滚动的view的对象
side-水平滚动的方向,LEFT或者RIGHT
scrollPosition-滚动屏幕的比例,从0到1,如果是0.5,则只会对一半的屏幕进行滚动
【转载:http://blog.csdn.net/tt75281920/article/details/26821035】
Robotium--scroll操作系列的更多相关文章
- C# 串口操作 ---- 系列文章
C# 串口操作系列(5)--通讯库雏形 通讯库雏形的建立. 串口通讯介绍的高级篇,介绍更高级的抽象,为扩展为通用的客户端通讯库做铺垫,扩展性的考虑,能支持任意类型的流设备. ... 2010-08-0 ...
- C# 串口操作系列(5)--通讯库雏形
C# 串口操作系列(5)--通讯库雏形 标签: 通讯c#数据分析byteclassstring 2010-08-09 00:07 21378人阅读 评论(73) 收藏 举报 分类: 通讯类库设计(4 ...
- C# 串口操作系列(4) -- 协议篇,文本协议数据解析
C# 串口操作系列(4) -- 协议篇,文本协议数据解析 标签: c#uiobjectstringbyte 2010-06-09 01:50 19739人阅读 评论(26) 收藏 举报 分类: 通讯 ...
- 【转】C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子。
C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子. 标签: c#objectnewlineexceptionbytestring 2010-05-17 01:10 117109人阅读 ...
- zw量化交易·实盘操作·系列培训班
参见: <zw量化交易·实盘操作·系列培训班> http://blog.sina.com.cn/s/blog_7100d4220102w0q5.html
- jQuery下拉框操作系列$("option:selected",this) &&(锋利的jQuery)
jQuery下拉框操作系列$("option:selected",this) &&(锋利的jQuery) <!DOCTYPE html> <ht ...
- C# 数据操作系列 - 6 EF Core 配置映射关系
0. 前言 在<C# 数据操作系列 - 5. EF Core 入门>篇中,我们简单的通过两个类演示了一下EF增删改查等功能.细心的小伙伴可能看了生成的DDL SQL 语句,在里面发现了些端 ...
- C# 数据操作系列 - 8. EF Core的增删改查
0.前言 到目前为止,我们看了一下如何声明EF Core的初步使用,也整体的看了下EF Core的映射关系配置以及导航属性的配置. 这一篇,我带大家分享一下,我在工作中需要的EF Core的用法. 1 ...
- C# 数据操作系列 - 12 NHibernate的增删改查
0. 前言 上一篇<C# 数据操作系列 - 11 NHibernate 配置和结构介绍> 介绍了Nhibernate里的配置内容.这一篇将带领大家了解一下如何使用NHIbernate.之前 ...
- C# 数据操作系列 - 15 SqlSugar 增删改查详解
0. 前言 继上一篇,以及上上篇,我们对SqlSugar有了一个大概的认识,但是这并不完美,因为那些都是理论知识,无法描述我们工程开发中实际情况.而这一篇,将带领小伙伴们一起试着写一个能在工程中使用的 ...
随机推荐
- 通过ip地址获取当前地理位置
1. 使用接口的方式: 这种方式是相对稳定,而且提供的数据相对稳定,提供接口的地方很多,大家可以参照 http://www.hujuntao.com/api/the-ip-address-api-a ...
- 解决 iOS View Controller Push/Pop 时的黑影
那么如何解决这个问题呢? 实际上很简单,如果这个 ViewController 是在 TabBarViewController 的 NavigationController 上 Push/Pop 的, ...
- 监听器启动顺序和java常见注解
- mybatis 一对一关联
首先建表: CREATE TABLE teacher( t_id INT PRIMARY KEY AUTO_INCREMENT, t_name VARCHAR(20) ); CREATE TABLE ...
- 深入Java虚拟机读书笔记第三章安全
为什么需要安全性 Java的安全模型是其多个重要结构特点之一,它使Java成为适于网络环境的技术.Java安全模型侧重于保护终端用户免受从网络下载的.来自不可靠来源的.恶意程序(以及善于程序中的bug ...
- php对mongo操作问题
最近由于业务需求,需要使用php对mongo做一些操作,关于mongodb,选择的版本是:MongoDB shell version: 2.0.6 MongoDB是一种文档导向数据库管理系统,由C++ ...
- Pycharm常用快捷键(后期慢慢补充)
用到一个,就补充一个,慢慢来,找到自己常用的快捷键. CTRL /: 注释.取消注释行 CTRL Q: 在参数列表位置,显示可以输入的所有参数. #查看参数的详细信息
- codevs 1153 道路游戏
传送门 题目描述 Description 小新正在玩一个简单的电脑游戏.游戏中有一条环形马路,马路上有n 个机器人工厂,两个相邻机器人工厂之间由一小段马路连接.小新以某个机器人工厂为起点,按顺时针 ...
- 也谈 Python 的中文编码处理
最近业务中需要用 Python 写一些脚本.尽管脚本的交互只是命令行 + 日志输出,但是为了让界面友好些,我还是决定用中文输出日志信息. 很快,我就遇到了异常: UnicodeEncodeError: ...
- django + nginx + raspberypi + pidaro
对于一个从事后台开发的人来说,搞了个网站,我自己都觉得有点意外.不是很懂html,不是很懂css,不是很懂js,不是很懂web开发模式/框架,不是很懂httpd/nginx--,web的东西样 ...