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


Java ActivityLifecycleMonitorRegistry.getInstance方法代码示例

本文整理汇总了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;
}
 
开发者ID:Adyen,项目名称:adyen-android,代码行数:12,代码来源:EspressoTestUtils.java

示例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;
}
 
开发者ID:apptik,项目名称:tzatziki,代码行数:12,代码来源:BaseTest.java

示例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;
}
 
开发者ID:nenick,项目名称:espresso-macchiato,代码行数:9,代码来源:EspCloseAllActivitiesFunction.java

示例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;
}
 
开发者ID:sregg,项目名称:spotify-tv,代码行数:12,代码来源:EspressoTestRule.java

示例5: ActivityFinisher

import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
private ActivityFinisher() {
    this.activityLifecycleMonitor = ActivityLifecycleMonitorRegistry.getInstance();
}
 
开发者ID:WGPlaner,项目名称:wg_planer,代码行数:4,代码来源:ActivityFinisher.java

示例6: WaitActivityIsResumedIdlingResource

import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
public WaitActivityIsResumedIdlingResource(String activityToWaitClassName) {
    instance = ActivityLifecycleMonitorRegistry.getInstance();
    this.activityToWaitClassName = activityToWaitClassName;
}
 
开发者ID:openshopio,项目名称:openshop.io-android,代码行数:5,代码来源:WaitActivityIsResumedIdlingResource.java

示例7: ActivityFinisher

import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry; //导入方法依赖的package包/类
ActivityFinisher() {
    this.mLifecycleMonitor = ActivityLifecycleMonitorRegistry.getInstance();
}
 
开发者ID:zawadz88,项目名称:material-activity-chooser,代码行数:4,代码来源:ActivityFinisher.java

示例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;
}
 
开发者ID:bluesnap,项目名称:bluesnap-android-int,代码行数:6,代码来源:TestUtils.java


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