Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6908cd15 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix animations to use correct interpolator.

Also some fragment fixes.

Change-Id: I3906199e541a86379d07c8a4e4d5f9e99830c44a
parent 98b8bc7f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -272,9 +272,13 @@ public class DialogFragment extends Fragment
        } else {
            FragmentTransaction ft = getFragmentManager().openTransaction();
            ft.remove(this);
            if (allowStateLoss) {
                ft.commitAllowingStateLoss();
            } else {
                ft.commit();
            }
        }
    }
    
    public Dialog getDialog() {
        return mDialog;
+12 −7
Original line number Diff line number Diff line
@@ -850,7 +850,8 @@ final class FragmentManagerImpl extends FragmentManager {
    }
    
    public void enqueueAction(Runnable action, boolean allowStateLoss) {
        if (!allowStateLoss && mStateSaved) {
        if (!allowStateLoss) {
            if (mStateSaved) {
                throw new IllegalStateException(
                        "Can not perform this action after onSaveInstanceState");
            }
@@ -858,7 +859,11 @@ final class FragmentManagerImpl extends FragmentManager {
                throw new IllegalStateException(
                        "Can not perform this action inside of " + mNoTransactionsBecause);
            }
        }
        synchronized (this) {
            if (mActivity == null) {
                throw new IllegalStateException("Activity has been destroyed");
            }
            if (mPendingActions == null) {
                mPendingActions = new ArrayList<Runnable>();
            }
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ public abstract class Animation implements Cloneable {
     * otherwise.
     *
     * @param currentTime Where we are in the animation. This is wall clock time.
     * @param outTransformation A tranformation object that is provided by the
     * @param outTransformation A transformation object that is provided by the
     *        caller and will be filled in by the animation.
     * @return True if the animation is still running
     */
+4 −2
Original line number Diff line number Diff line
@@ -50,11 +50,13 @@ public class DecelerateInterpolator implements Interpolator {
    }
    
    public float getInterpolation(float input) {
        float result;
        if (mFactor == 1.0f) {
            return (float)(1.0f - (1.0f - input) * (1.0f - input));
            result = (float)(1.0f - (1.0f - input) * (1.0f - input));
        } else {
            return (float)(1.0f - Math.pow((1.0f - input), 2 * mFactor));
            result = (float)(1.0f - Math.pow((1.0f - input), 2 * mFactor));
        }
        return result;
    }
    
    private float mFactor = 1.0f;
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@
*/
-->

<set xmlns:android="http://schemas.android.com/apk/res/android">
<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:shareInterpolator="false">
    <!-- Do nothing. -->
    <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
            android:duration="@android:integer/config_mediumAnimTime"/>
Loading