Skip to content

DoubleBackPressAction

Kaushik NP edited this page May 13, 2018 · 1 revision

Create object of DoubleBackPressAction

Passed in :

.withDoubleBackPressAction(DoubleBackPressAction)

Override the actionCall() method when creating the Object. This method is called when the second back press occurs.

Below is an example where after the DoubleBackPress, the Activity calls its original onBackPressed() method.

DoubleBackPressAction doubleBackPressAction = new DoubleBackPressAction() {
   @Override
   public void actionCall() {
       ExampleActivity.super.onBackPressed();
   }
};