Some fixes for quickstep when configuration changes

> Creating the launcher animation after first draw, so that the UI is in correct state
> Using correct workspace size, when layout is not valid
> Snapping pagedView to correct page when page size changes
> Resoting to correct workspace page on rebind

Change-Id: I74e61a05aae3a3c4912d4c5c8eb4d5d036d9005a
This commit is contained in:
Sunny Goyal committed 2018-02-02 11:02:51 -08:00
1 parent aed78b7636
commit 85a7fe086b
5 files changed
+83 -28

No files matched your search

+2 -4
View File
@@ -22,7 +22,6 @@ import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_TRANSITION_M
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.SPRING_LOADED;
import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -48,7 +47,6 @@ import android.os.Parcelable;
import android.os.UserHandle;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Property;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -3354,13 +3352,13 @@ public class Workspace extends PagedView
@Override
public int getExpectedHeight() {
return getMeasuredHeight() <= 0
return getMeasuredHeight() <= 0 || !mIsLayoutValid
? mLauncher.getDeviceProfile().heightPx : getMeasuredHeight();
}
@Override
public int getExpectedWidth() {
return getMeasuredWidth() <= 0
return getMeasuredWidth() <= 0 || !mIsLayoutValid
? mLauncher.getDeviceProfile().widthPx : getMeasuredWidth();
}