+++ b/LINUX/android/packages/apps/Launcher3/res/layout/folder_icon.xml
@@ -26,7 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:antialias="true"
- android:src="@drawable/portal_ring_inner"/>
+ android:src="@drawable/folder_bg"/>
<com.android.launcher3.BubbleTextView
style="@style/Icon"
android:id="@+id/folder_icon_name"
b/LINUX/android/packages/apps/Launcher3/src/com/android/launcher3/FolderIcon.java
@@ -60,7 +60,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
private StylusEventHelper mStylusEventHelper;
// The number of icons to display in the
- public static final int NUM_ITEMS_IN_PREVIEW = 3;
+ public static final int NUM_ITEMS_IN_PREVIEW = 4;
private static final int CONSUMPTION_ANIMATION_DURATION = 100;
private static final int DROP_IN_ANIMATION_DURATION = 400;
private static final int INITIAL_ITEM_ANIMATION_DURATION = 350;
@@ -73,7 +73,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
private static final float OUTER_RING_GROWTH_FACTOR = 0.3f;
// The amount of vertical spread between items in the stack [0...1]
- private static final float PERSPECTIVE_SHIFT_FACTOR = 0.18f;
+ private static final float PERSPECTIVE_SHIFT_FACTOR = 1.0f;
// Flag as to whether or not to draw an outer ring. Currently none is designed.
public static final boolean HAS_OUTER_RING = true;
@@ -548,6 +548,11 @@ public class FolderIcon extends FrameLayout implements FolderListener {
private PreviewItemDrawingParams computePreviewItemDrawingParams(int index,
PreviewItemDrawingParams params) {
+
+ int index_order = index;
+ final int previewPadding = FolderRingAnimator.sPreviewPadding;
+
+
index = NUM_ITEMS_IN_PREVIEW - index - 1;
float r = (index * 1.0f) / (NUM_ITEMS_IN_PREVIEW - 1);
float scale = (1 - PERSPECTIVE_SCALE_FACTOR * (1 - r));
@@ -558,10 +563,22 @@ public class FolderIcon extends FrameLayout implements FolderListener {
// We want to imagine our coordinates from the bottom left, growing up and to the
// right. This is natural for the x-axis, but for the y-axis, we have to invert things.
- float transY = mAvailableSpaceInPreview - (offset + scaledSize + scaleOffsetCorrection) + getPaddingTop();
- float transX = (mAvailableSpaceInPreview - scaledSize) / 2;
+ float transY = mAvailableSpaceInPreview - (offset + scaledSize + scaleOffsetCorrection);
+ float transX = offset + scaleOffsetCorrection;
+
+
+ if (0 <= index_order && index_order < 2) {
+ transX = index_order * mBaselineIconSize + 2 * previewPadding;
+ transY = mAvailableSpaceInPreview - (1 * mBaselineIconSize + scaledSize + scaleOffsetCorrection) + (getPaddingTop() / 2) + (getPaddingTop() / 3) + 0.1f * mBaselineIconSize;
+ } else if (2 <= index_order && index_order < 4) {
+ transX = (index_order - 2) * mBaselineIconSize + 2 * previewPadding;
+ //transY=1*mBaselineIconSize+9*previewPadding;
+ transY = mAvailableSpaceInPreview - (0 * mBaselineIconSize + scaledSize + scaleOffsetCorrection) + (getPaddingTop() / 2) + (getPaddingTop() / 3) + 0.1f * mBaselineIconSize;
+ }
+
float totalScale = mBaselineIconScale * scale;
final int overlayAlpha = (int) (80 * (1 - r));
+ totalScale = mBaselineIconScale * 1 - 0.1f;
if (params == null) {
params = new PreviewItemDrawingParams(transX, transY, totalScale, overlayAlpha);