Search in sources :

Example 1 with MaxLockPreferenceFragment

use of de.Maxr1998.xposed.maxlock.ui.settings.MaxLockPreferenceFragment in project MaxLock by Maxr1998.

the class SettingsActivity method onAuthenticationSucceeded.

@Override
public void onAuthenticationSucceeded() {
    UNLOCKED = true;
    contentView.removeView(lockscreen);
    ObjectAnimator animator = ObjectAnimator.ofFloat(toolbar, "translationY", 0f).setDuration(200);
    animator.setInterpolator(new DecelerateInterpolator());
    animator.start();
    MaxLockPreferenceFragment settingsFragment = (MaxLockPreferenceFragment) getSupportFragmentManager().findFragmentByTag(TAG_PREFERENCE_FRAGMENT);
    contentView.postDelayed(settingsFragment::onLockscreenDismissed, 250);
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) ObjectAnimator(android.animation.ObjectAnimator) MaxLockPreferenceFragment(de.Maxr1998.xposed.maxlock.ui.settings.MaxLockPreferenceFragment)

Example 2 with MaxLockPreferenceFragment

use of de.Maxr1998.xposed.maxlock.ui.settings.MaxLockPreferenceFragment in project MaxLock by Maxr1998.

the class MaxLockPreferenceFragment method launchFragment.

public static void launchFragment(@NonNull Fragment fragment, @NonNull Fragment replacement, boolean fromRoot) {
    FragmentManager manager = fragment.getFragmentManager();
    if (fromRoot) {
        manager.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
    }
    FragmentTransaction transaction = manager.beginTransaction();
    if (manager.getBackStackEntryCount() > 0 || !((SettingsActivity) fragment.getActivity()).inLandscape())
        transaction.setCustomAnimations(R.anim.fragment_in, 0, R.anim.fragment_pop_in, R.anim.fragment_pop_out);
    transaction.replace(R.id.fragment_container, replacement).addToBackStack(null).commit();
    if (fromRoot && ((MaxLockPreferenceFragment) fragment).isFirstPane())
        SettingsActivity.showMultipaneIfInLandscape((SettingsActivity) fragment.getActivity());
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) FragmentTransaction(android.support.v4.app.FragmentTransaction) SettingsActivity(de.Maxr1998.xposed.maxlock.ui.SettingsActivity)

Aggregations

ObjectAnimator (android.animation.ObjectAnimator)1 FragmentManager (android.support.v4.app.FragmentManager)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)1 SettingsActivity (de.Maxr1998.xposed.maxlock.ui.SettingsActivity)1 MaxLockPreferenceFragment (de.Maxr1998.xposed.maxlock.ui.settings.MaxLockPreferenceFragment)1