当前位置: 首页>>代码示例>>Java>>正文


Java Config类代码示例

本文整理汇总了Java中com.robotium.solo.Solo.Config的典型用法代码示例。如果您正苦于以下问题:Java Config类的具体用法?Java Config怎么用?Java Config使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Config类属于com.robotium.solo.Solo包,在下文中一共展示了Config类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBitmapOfView

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Returns a bitmap of a given View.
 * 
 * @param view the view to save a bitmap from
 * @return a bitmap of the given view
 * 
 */

private Bitmap getBitmapOfView(final View view){
	view.destroyDrawingCache();
	view.buildDrawingCache(false);
	Bitmap orig = view.getDrawingCache();
	Bitmap.Config config = null;

	if(orig == null) {
		return null;
	}

	config = orig.getConfig();

	if(config == null) {
		config = Bitmap.Config.ARGB_8888;
	}
	Bitmap b = orig.copy(config, false);
	orig.recycle();
	view.destroyDrawingCache();
	return b; 
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:29,代码来源:ScreenshotTaker.java

示例2: setUp

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
  //setUp() is run before a test case is started.
  //This is where the solo object is created.

  Config config = new Config();
  config.screenshotFileType = ScreenshotFileType.JPEG;
  File sdcard = Environment.getExternalStorageDirectory();
  File data = new File(sdcard, "/Data");
  config.screenshotSavePath = data.getAbsolutePath() + "/Robotium/";
  Log.i(MapAppRobotiumTests.TAG, config.screenshotSavePath);
  config.shouldScroll = false;
  solo = new Solo(getInstrumentation(), config);
  if (!MapAppRobotiumTests.mPermissionsGranted){
    Log.i(MapAppRobotiumTests.TAG, "Seeking permissions");
    requestWritePermission();
  }


  getActivity();
}
 
开发者ID:Esri,项目名称:maps-app-android,代码行数:22,代码来源:MapAppRobotiumTests.java

示例3: ActivityUtils

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Constructs this object.
 *
 * @param config the {@code Config} instance	
 * @param inst the {@code Instrumentation} instance.
 * @param activity the start {@code Activity}
 * @param sleeper the {@code Sleeper} instance
 */

public ActivityUtils(Config config, Instrumentation inst, Activity activity, Sleeper sleeper) {
	this.config = config;
	this.inst = inst;
	this.activity = activity;
	this.sleeper = sleeper;
	createStackAndPushStartActivity();
	activitySyncTimer = new Timer();
	activitiesStoredInActivityStack = new Stack<String>();
	setupActivityMonitor();
	setupActivityStackListener();
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:21,代码来源:ActivityUtils.java

示例4: WebUtils

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Constructs this object.
 * 
 * @param config the {@code Config} instance
 * @param instrumentation the {@code Instrumentation} instance
 * @param viewFetcher the {@code ViewFetcher} 
 * @param sleeper the {@code Sleeper} instance
 */

public WebUtils(Config config, Instrumentation instrumentation, ViewFetcher viewFetcher, Sleeper sleeper){
	this.config = config;
	this.inst = instrumentation;
	this.viewFetcher = viewFetcher;
	webElementCreator = new WebElementCreator(sleeper);
	robotiumWebCLient = new RobotiumWebClient(instrumentation, webElementCreator);
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:17,代码来源:WebUtils.java

示例5: Scroller

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Constructs this object.
 *
 * @param inst the {@code Instrumentation} instance
 * @param viewFetcher the {@code ViewFetcher} instance
 * @param sleeper the {@code Sleeper} instance
 */

public Scroller(Config config, Instrumentation inst, ViewFetcher viewFetcher, Sleeper sleeper) {
	this.config = config;
	this.inst = inst;
	this.viewFetcher = viewFetcher;
	this.sleeper = sleeper;
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:15,代码来源:Scroller.java

示例6: getBitmapOfWebView

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Returns a bitmap of a given WebView.
 *  
 * @param webView the webView to save a bitmap from
 * @return a bitmap of the given web view
 * 
 */

private Bitmap getBitmapOfWebView(final WebView webView){
	Picture picture = webView.capturePicture();
	Bitmap b = Bitmap.createBitmap( picture.getWidth(), picture.getHeight(), Bitmap.Config.ARGB_8888);
	Canvas c = new Canvas(b);
	picture.draw(c);
	return b;
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:16,代码来源:ScreenshotTaker.java

示例7: WebUtils

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Constructs this object.
 * 
 * @param config the {@code Config} instance
 * @param instrumentation the {@code Instrumentation} instance
 * @param activityUtils the {@code ActivityUtils} instance
 * @param viewFetcher the {@code ViewFetcher} instance
 */

public WebUtils(Config config, Instrumentation instrumentation, ActivityUtils activityUtils, ViewFetcher viewFetcher, Sleeper sleeper){
	this.config = config;
	this.inst = instrumentation;
	this.activityUtils = activityUtils;
	this.viewFetcher = viewFetcher;
	webElementCreator = new WebElementCreator(sleeper);
	robotiumWebCLient = new RobotiumWebClient(instrumentation, webElementCreator);
}
 
开发者ID:VikingDen,项目名称:robotium-tech,代码行数:18,代码来源:WebUtils.java

示例8: ScreenshotTaker

import com.robotium.solo.Solo.Config; //导入依赖的package包/类
/**
 * Constructs this object.
 * 
 * @param config the {@code Config} instance
 * @param instrumentation the {@code Instrumentation} instance.
 * @param activityUtils the {@code ActivityUtils} instance
 * @param viewFetcher the {@code ViewFetcher} instance
 * @param sleeper the {@code Sleeper} instance
 * 
 */
ScreenshotTaker(Config config, Instrumentation instrumentation, ActivityUtils activityUtils, ViewFetcher viewFetcher, Sleeper sleeper) {
	this.config = config;
	this.instrumentation = instrumentation;
	this.activityUtils = activityUtils;
	this.viewFetcher = viewFetcher;
	this.sleeper = sleeper;
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:18,代码来源:ScreenshotTaker.java


注:本文中的com.robotium.solo.Solo.Config类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。