public interface

ActivityListener

com.facebook.common.activitylistener.ActivityListener
Known Indirect Subclasses

Class Overview

Listener interface for activity lifecycle events.

All methods take the Activity so it's possible to implement a singleton version of this interface that has no-state.

Summary

Constants
int MAX_PRIORITY
int MIN_PRIORITY
Public Methods
abstract int getPriority()
Listeners are fired in order of priority.
abstract void onActivityCreate(Activity activity)
Called by the Activity base class after the Activity's onActivityCreate method has run.
abstract void onDestroy(Activity activity)
Called by the Activity base class from the onDestroy() method.
abstract void onPause(Activity activity)
Called by the Activity base class from the onPause() method.
abstract void onResume(Activity activity)
Called by the Activity base class from the onResume() method.
abstract void onStart(Activity activity)
Called by the Activity base class from the onStart() method.
abstract void onStop(Activity activity)
Called by the Activity base class from the onStop() method.

Constants

public static final int MAX_PRIORITY

Constant Value: 10 (0x0000000a)

public static final int MIN_PRIORITY

Constant Value: 1 (0x00000001)

Public Methods

public abstract int getPriority ()

Listeners are fired in order of priority. Listeners with higher priority are fired first.

Returns
  • priority level

public abstract void onActivityCreate (Activity activity)

Called by the Activity base class after the Activity's onActivityCreate method has run.

Parameters
activity the activity

public abstract void onDestroy (Activity activity)

Called by the Activity base class from the onDestroy() method.

Parameters
activity the activity

public abstract void onPause (Activity activity)

Called by the Activity base class from the onPause() method.

Parameters
activity the activity

public abstract void onResume (Activity activity)

Called by the Activity base class from the onResume() method.

Parameters
activity the activity

public abstract void onStart (Activity activity)

Called by the Activity base class from the onStart() method.

Parameters
activity the activity

public abstract void onStop (Activity activity)

Called by the Activity base class from the onStop() method.

Parameters
activity the activity