本文整理汇总了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;
}
示例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();
}
示例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();
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}