Loading res/layout/user_folder.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ xmlns:launcher="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/quantum_panel" android:elevation="5dp" android:orientation="vertical" > <FrameLayout Loading res/values/dimens.xml +7 −2 Original line number Diff line number Diff line Loading @@ -79,6 +79,10 @@ should be. If 0, it will not be scaled at all. --> <dimen name="dragViewScale">12dp</dimen> <!-- Elevation for the drag view. It should be larger than elevation of all other drag sources and drop targets like all-apps and folders --> <dimen name="drag_elevation">30dp</dimen> <!-- Widget tray --> <dimen name="widget_container_inset">8dp</dimen> <dimen name="widget_preview_size">120dp</dimen> Loading Loading @@ -107,6 +111,7 @@ <!-- The amount that the preview contents are inset from the preview background --> <dimen name="folder_preview_padding">4dp</dimen> <dimen name="folder_name_padding">10dp</dimen> <dimen name="folder_shadow_padding">8dp</dimen> <!-- Sizes for managed profile badges --> <dimen name="profile_badge_size">24dp</dimen> Loading src/com/android/launcher3/DragView.java +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ public class DragView extends View { int ms = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); measure(ms, ms); mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); if (Utilities.isLmpOrAbove()) { setElevation(getResources().getDimension(R.dimen.drag_elevation)); } } /** Sets the scale of the view over the normal workspace icon size. */ Loading src/com/android/launcher3/Folder.java +18 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.res.Resources; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.drawable.InsetDrawable; import android.os.Build; import android.text.InputType; import android.text.Selection; Loading Loading @@ -180,6 +181,15 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList // name is complete, we have something to focus on, thus hiding the cursor and giving // reliable behavior when clicking the text field (since it will always gain focus on click). setFocusableInTouchMode(true); if (Utilities.isLmpOrAbove()) { int padding = getResources().getDimensionPixelSize(R.dimen.folder_shadow_padding); setBackground(new InsetDrawable( getResources().getDrawable(R.drawable.apps_list_bg), padding, padding, padding, padding)); } else { setBackgroundResource(R.drawable.quantum_panel); } } @Override Loading Loading @@ -470,9 +480,15 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList PropertyValuesHolder tx = PropertyValuesHolder.ofFloat("translationX", transX, 0); PropertyValuesHolder ty = PropertyValuesHolder.ofFloat("translationY", transY, 0); Animator drift = LauncherAnimUtils.ofPropertyValuesHolder(this, tx, ty); drift.setDuration(mMaterialExpandDuration); drift.setStartDelay(mMaterialExpandStagger); drift.setInterpolator(new LogDecelerateInterpolator(100, 0)); int rx = (int) Math.max(Math.max(width - getPivotX(), 0), getPivotX()); int ry = (int) Math.max(Math.max(height - getPivotY(), 0), getPivotY()); float radius = (float) Math.hypot(rx, ry); AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); Animator reveal = LauncherAnimUtils.createCircularReveal(this, (int) getPivotX(), (int) getPivotY(), 0, radius); Loading @@ -491,10 +507,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList textAlpha.setStartDelay(mMaterialExpandStagger); textAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); Animator drift = LauncherAnimUtils.ofPropertyValuesHolder(this, tx, ty); drift.setDuration(mMaterialExpandDuration); drift.setStartDelay(mMaterialExpandStagger); drift.setInterpolator(new LogDecelerateInterpolator(60, 0)); anim.play(drift); anim.play(iconsAlpha); Loading @@ -504,10 +516,12 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList openFolderAnim = anim; mContentWrapper.setLayerType(LAYER_TYPE_HARDWARE, null); mFooter.setLayerType(LAYER_TYPE_HARDWARE, null); onCompleteRunnable = new Runnable() { @Override public void run() { mContentWrapper.setLayerType(LAYER_TYPE_NONE, null); mContentWrapper.setLayerType(LAYER_TYPE_NONE, null); } }; } Loading Loading
res/layout/user_folder.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ xmlns:launcher="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/quantum_panel" android:elevation="5dp" android:orientation="vertical" > <FrameLayout Loading
res/values/dimens.xml +7 −2 Original line number Diff line number Diff line Loading @@ -79,6 +79,10 @@ should be. If 0, it will not be scaled at all. --> <dimen name="dragViewScale">12dp</dimen> <!-- Elevation for the drag view. It should be larger than elevation of all other drag sources and drop targets like all-apps and folders --> <dimen name="drag_elevation">30dp</dimen> <!-- Widget tray --> <dimen name="widget_container_inset">8dp</dimen> <dimen name="widget_preview_size">120dp</dimen> Loading Loading @@ -107,6 +111,7 @@ <!-- The amount that the preview contents are inset from the preview background --> <dimen name="folder_preview_padding">4dp</dimen> <dimen name="folder_name_padding">10dp</dimen> <dimen name="folder_shadow_padding">8dp</dimen> <!-- Sizes for managed profile badges --> <dimen name="profile_badge_size">24dp</dimen> Loading
src/com/android/launcher3/DragView.java +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ public class DragView extends View { int ms = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); measure(ms, ms); mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); if (Utilities.isLmpOrAbove()) { setElevation(getResources().getDimension(R.dimen.drag_elevation)); } } /** Sets the scale of the view over the normal workspace icon size. */ Loading
src/com/android/launcher3/Folder.java +18 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.res.Resources; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.drawable.InsetDrawable; import android.os.Build; import android.text.InputType; import android.text.Selection; Loading Loading @@ -180,6 +181,15 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList // name is complete, we have something to focus on, thus hiding the cursor and giving // reliable behavior when clicking the text field (since it will always gain focus on click). setFocusableInTouchMode(true); if (Utilities.isLmpOrAbove()) { int padding = getResources().getDimensionPixelSize(R.dimen.folder_shadow_padding); setBackground(new InsetDrawable( getResources().getDrawable(R.drawable.apps_list_bg), padding, padding, padding, padding)); } else { setBackgroundResource(R.drawable.quantum_panel); } } @Override Loading Loading @@ -470,9 +480,15 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList PropertyValuesHolder tx = PropertyValuesHolder.ofFloat("translationX", transX, 0); PropertyValuesHolder ty = PropertyValuesHolder.ofFloat("translationY", transY, 0); Animator drift = LauncherAnimUtils.ofPropertyValuesHolder(this, tx, ty); drift.setDuration(mMaterialExpandDuration); drift.setStartDelay(mMaterialExpandStagger); drift.setInterpolator(new LogDecelerateInterpolator(100, 0)); int rx = (int) Math.max(Math.max(width - getPivotX(), 0), getPivotX()); int ry = (int) Math.max(Math.max(height - getPivotY(), 0), getPivotY()); float radius = (float) Math.hypot(rx, ry); AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); Animator reveal = LauncherAnimUtils.createCircularReveal(this, (int) getPivotX(), (int) getPivotY(), 0, radius); Loading @@ -491,10 +507,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList textAlpha.setStartDelay(mMaterialExpandStagger); textAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); Animator drift = LauncherAnimUtils.ofPropertyValuesHolder(this, tx, ty); drift.setDuration(mMaterialExpandDuration); drift.setStartDelay(mMaterialExpandStagger); drift.setInterpolator(new LogDecelerateInterpolator(60, 0)); anim.play(drift); anim.play(iconsAlpha); Loading @@ -504,10 +516,12 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList openFolderAnim = anim; mContentWrapper.setLayerType(LAYER_TYPE_HARDWARE, null); mFooter.setLayerType(LAYER_TYPE_HARDWARE, null); onCompleteRunnable = new Runnable() { @Override public void run() { mContentWrapper.setLayerType(LAYER_TYPE_NONE, null); mContentWrapper.setLayerType(LAYER_TYPE_NONE, null); } }; } Loading