screenshot-tests-for-android

程序名称:screenshot-tests-for-android

授权协议: BSD

操作系统: Android

开发语言: Java

screenshot-tests-for-android 介绍

screenshot-tests-for-android 是来自 Facebook 的一个 Android 开发包,用于在 Android
程序中实现自动的屏幕截屏功能。

示例代码:

public class MyTests {
  @Test
  public void doScreenshot() {
    /*
     * Create and set up your view some how. This might be inflating,
     * or creating from a view class. You might want to set properties
     * on the view.
     */
    View view = mLayoutInflater.inflate(R.layout.my_layout, null, false);

    /*
     * Measure and layout the view. In this example we give an exact
     * width but all the height to be WRAP_CONTENT.
     */
    ViewHelpers.setupView(view)
      .setExactWidthDp(300)
      .layout();

    /*
     * Take the actual screenshot. At the end of this call the screenshot
     * is stored on the device, and the gradle plugin takes care of
     * pulling it and displaying it to you in nice ways.
     */
    Screenshot.snap(view)
      .record();
  }
}

screenshot-tests-for-android 官网

http://facebook.github.io/screenshot-tests-for-android/

相关编程语言

BBGestureBack Full screen return gesture(全屏手...
Framework7 或者叫 F7 是全功能的绑定 iOS 7 应用的...
iOS 调试库,支持 iOS8+,无需添加任何代码,方便 i...
DarkModeKit是在Apple官方的深色模式发布之前设计和...
SimpleNote iOS 版客户端。SimpleNote 是一款在多平...
Kivy iOS,此工具旨在为 iOS 编译必要的库以运行应用...