本文整理汇总了Java中android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ActivityLifecycleMonitorRegistry.getInstance方法的具体用法?Java ActivityLifecycleMonitorRegistry.getInstance怎么用?Java ActivityLifecycleMonitorRegistry.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry
的用法示例。
在下文中一共展示了ActivityLifecycleMonitorRegistry.getInstance方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getActivitiesInStages
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
private static Set<Activity> getActivitiesInStages(Stage... stages) {
final Set<Activity> activities = Sets.newHashSet();
final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
for (Stage stage : stages) {
final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
if (activitiesInStage != null) {
activities.addAll(activitiesInStage);
}
}
return activities;
}
示例2: getActivitiesInStages
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
public static Set<Activity> getActivitiesInStages(Stage... stages) {
final Set<Activity> activities = Sets.newHashSet();
final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
for (Stage stage : stages) {
final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
if (activitiesInStage != null) {
activities.addAll(activitiesInStage);
}
}
return activities;
}
示例3: getActivitiesInStages
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
public static Set<Activity> getActivitiesInStages(Stage... stages) {
final Set<Activity> activities = Sets.newHashSet();
final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
for (Stage stage : stages) {
activities.addAll(instance.getActivitiesInStage(stage));
}
return activities;
}
示例4: getActivitiesInStages
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
public static Set<Activity> getActivitiesInStages(Stage... stages) {
final Set<Activity> activities = new HashSet<>();
final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
for (Stage stage : stages) {
final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
if (activitiesInStage != null) {
activities.addAll(activitiesInStage);
}
}
return activities;
}
示例5: ActivityFinisher
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
private ActivityFinisher() {
this.activityLifecycleMonitor = ActivityLifecycleMonitorRegistry.getInstance();
}
示例6: WaitActivityIsResumedIdlingResource
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
public WaitActivityIsResumedIdlingResource(String activityToWaitClassName) {
instance = ActivityLifecycleMonitorRegistry.getInstance();
this.activityToWaitClassName = activityToWaitClassName;
}
示例7: ActivityFinisher
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
ActivityFinisher() {
this.mLifecycleMonitor = ActivityLifecycleMonitorRegistry.getInstance();
}
示例8: getCurrentActivityOnMainThread
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
private static Activity getCurrentActivityOnMainThread() {
ActivityLifecycleMonitor registry = ActivityLifecycleMonitorRegistry.getInstance();
Collection<Activity> activities = registry.getActivitiesInStage(Stage.RESUMED);
return activities.iterator().hasNext() ? activities.iterator().next() : null;
}