Apply proper backward and forward transitions
Currently, we hardcode TRANSITION_FADE_THROUGH because it is the default as of now and it is also what Settings uses. It appears to match stock's transition animations, too. Issue: calyxos#1743 Change-Id: Iffe19e5b4fd552aab6c5a93bc3788a27b5eba00b
This commit is contained in:
committed by
Michael Bestas
parent
8b77e3eea4
commit
8792be5031
@@ -19,6 +19,8 @@ import android.util.Log;
|
||||
|
||||
import androidx.activity.result.ActivityResult;
|
||||
|
||||
import com.google.android.setupdesign.transition.TransitionHelper;
|
||||
|
||||
public abstract class SubBaseActivity extends BaseSetupWizardActivity {
|
||||
|
||||
public static final String TAG = SubBaseActivity.class.getSimpleName();
|
||||
@@ -80,6 +82,8 @@ public abstract class SubBaseActivity extends BaseSetupWizardActivity {
|
||||
finishAction(RESULT_ACTIVITY_NOT_FOUND);
|
||||
} else if (data != null && data.getBooleanExtra("onBackPressed", false)) {
|
||||
onStartSubactivity();
|
||||
TransitionHelper.applyBackwardTransition(this,
|
||||
TransitionHelper.TRANSITION_FADE_THROUGH, true);
|
||||
} else {
|
||||
finishAction(RESULT_CANCELED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user