public enum

Stage

extends java.lang.Enum<Stage>

 java.lang.Object

↳java.lang.Enum<Stage>

↳androidx.test.runner.lifecycle.Stage

Gradle dependencies

compile group: 'androidx.test', name: 'monitor', version: '1.6.0-alpha03'

  • groupId: androidx.test
  • artifactId: monitor
  • version: 1.6.0-alpha03

Artifact androidx.test:monitor:1.6.0-alpha03 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.test:monitor com.android.support.test:monitor

Androidx class mapping:

androidx.test.runner.lifecycle.Stage android.support.test.runner.lifecycle.Stage

Overview

An enumeration of the lifecycle stages an activity undergoes.

See the javadoc for detailed documentation.

Summary

Enum Constants
CREATEDIndicates that onCreate has been called.
DESTROYEDIndicates that onDestroy has been called - system is shutting down the activity.
PAUSEDIndicates that onPause has been called - activity is no longer in the foreground.
PRE_ON_CREATEIndicates that onCreate is being called before any onCreate code executes.
RESTARTEDIndicates that onResume has been called - we have navigated back to the activity.
RESUMEDIndicates that onResume has been called - activity is now visible to user.
STARTEDIndicates that onStart has been called.
STOPPEDIndicates that onStop has been called - activity is no longer visible to the user.
Methods
public static StagevalueOf(java.lang.String name)

public static Stagevalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

PRE_ON_CREATE

Indicates that onCreate is being called before any onCreate code executes.

CREATED

Indicates that onCreate has been called.

STARTED

Indicates that onStart has been called.

RESUMED

Indicates that onResume has been called - activity is now visible to user.

PAUSED

Indicates that onPause has been called - activity is no longer in the foreground.

STOPPED

Indicates that onStop has been called - activity is no longer visible to the user.

RESTARTED

Indicates that onResume has been called - we have navigated back to the activity.

DESTROYED

Indicates that onDestroy has been called - system is shutting down the activity.

Methods

public static Stage values()

public static Stage valueOf(java.lang.String name)

Source

/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.test.runner.lifecycle;

/**
 * An enumeration of the lifecycle stages an activity undergoes.
 *
 * <p>See the {@link android.app.Activity} javadoc for detailed documentation.
 */
public enum Stage {
  /** Indicates that onCreate is being called before any onCreate code executes. */
  PRE_ON_CREATE,
  /** Indicates that onCreate has been called. */
  CREATED,
  /** Indicates that onStart has been called. */
  STARTED,
  /** Indicates that onResume has been called - activity is now visible to user. */
  RESUMED,
  /** Indicates that onPause has been called - activity is no longer in the foreground. */
  PAUSED,
  /** Indicates that onStop has been called - activity is no longer visible to the user. */
  STOPPED,
  /** Indicates that onResume has been called - we have navigated back to the activity. */
  RESTARTED,
  /** Indicates that onDestroy has been called - system is shutting down the activity. */
  DESTROYED
}