summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-sw600dp/dimens.xml19
-rw-r--r--res/values-sw720dp/dimens.xml1
-rw-r--r--src/com/android/launcher2/CellLayout.java22
-rw-r--r--src/com/android/launcher2/FolderIcon.java12
-rw-r--r--src/com/android/launcher2/Hotseat.java2
5 files changed, 29 insertions, 27 deletions
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 07976323b..1b866707a 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -16,26 +16,25 @@
<resources>
<dimen name="app_icon_size">72dp</dimen>
- <integer name="app_icon_hotseat_scale_percent">78</integer>
+ <integer name="app_icon_hotseat_scale_percent">75</integer>
<dimen name="app_icon_drawable_padding">3dp</dimen>
<dimen name="app_icon_padding_top">4dp</dimen>
<!-- Hotseat -->
<dimen name="hotseat_width_gap">-1dp</dimen>
<dimen name="hotseat_height_gap">-1dp</dimen>
- <dimen name="button_bar_height">94dip</dimen>
- <dimen name="button_bar_height_bottom_padding">9dp</dimen>
- <dimen name="button_bar_height_top_padding">9dp</dimen>
- <dimen name="button_bar_width_left_padding">9dp</dimen>
- <dimen name="button_bar_width_right_padding">9dp</dimen>
- <dimen name="button_bar_height_plus_padding">94dp</dimen>
+ <dimen name="button_bar_height">82dip</dimen>
+ <dimen name="button_bar_height_bottom_padding">0dp</dimen>
+ <dimen name="button_bar_height_top_padding">0dp</dimen>
+ <dimen name="button_bar_width_left_padding">33dp</dimen>
+ <dimen name="button_bar_width_right_padding">33dp</dimen>
+ <dimen name="button_bar_height_plus_padding">82dp</dimen>
<!-- Folders -->
<!-- The size of the image which sits behind the preview of the folder contents -->
- <dimen name="folder_preview_size">75dp</dimen>
+ <dimen name="folder_preview_size">72dp</dimen>
<dimen name="folder_cell_width">96dp</dimen>
<dimen name="folder_cell_height">96dp</dimen>
- <dimen name="folder_icon_padding_top">0dp</dimen>
<!-- AppsCustomize -->
<dimen name="apps_customize_cell_width">96dp</dimen>
@@ -55,6 +54,6 @@
<dimen name="workspace_width_gap_land">32dp</dimen>
<dimen name="workspace_width_gap_port">0dp</dimen>
<dimen name="workspace_height_gap_land">0dp</dimen>
- <dimen name="workspace_height_gap_port">32dp</dimen>
+ <dimen name="workspace_height_gap_port">28dp</dimen>
</resources>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 37f62b881..04937cd90 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -27,6 +27,7 @@
<dimen name="folder_cell_width">96dp</dimen>
<dimen name="folder_cell_height">96dp</dimen>
+ <dimen name="folder_preview_size">75dp</dimen>
<!-- AppsCustomize -->
<integer name="apps_customize_maxCellCountX">-1</integer>
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 1223d1c35..6f4759d1e 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -447,6 +447,8 @@ public class CellLayout extends ViewGroup {
}
}
+ int previewOffset = FolderRingAnimator.sPreviewSize;
+
// The folder outer / inner ring image(s)
for (int i = 0; i < mFolderOuterRings.size(); i++) {
FolderRingAnimator fra = mFolderOuterRings.get(i);
@@ -458,7 +460,7 @@ public class CellLayout extends ViewGroup {
cellToPoint(fra.mCellX, fra.mCellY, mTempLocation);
int centerX = mTempLocation[0] + mCellWidth / 2;
- int centerY = mTempLocation[1] + FolderRingAnimator.sPreviewSize / 2;
+ int centerY = mTempLocation[1] + previewOffset / 2;
canvas.save();
canvas.translate(centerX - width / 2, centerY - height / 2);
@@ -473,7 +475,7 @@ public class CellLayout extends ViewGroup {
cellToPoint(fra.mCellX, fra.mCellY, mTempLocation);
centerX = mTempLocation[0] + mCellWidth / 2;
- centerY = mTempLocation[1] + FolderRingAnimator.sPreviewSize / 2;
+ centerY = mTempLocation[1] + previewOffset / 2;
canvas.save();
canvas.translate(centerX - width / 2, centerY - width / 2);
d.setBounds(0, 0, width, height);
@@ -488,7 +490,7 @@ public class CellLayout extends ViewGroup {
cellToPoint(mFolderLeaveBehindCell[0], mFolderLeaveBehindCell[1], mTempLocation);
int centerX = mTempLocation[0] + mCellWidth / 2;
- int centerY = mTempLocation[1] + FolderRingAnimator.sPreviewSize / 2;
+ int centerY = mTempLocation[1] + previewOffset / 2;
canvas.save();
canvas.translate(centerX - width / 2, centerY - width / 2);
@@ -570,12 +572,8 @@ public class CellLayout extends ViewGroup {
return mIsHotseat ? mHotseatChildScale : mChildScale;
}
- public boolean addViewToCellLayout(
- View child, int index, int childId, LayoutParams params, boolean markCells) {
- return addViewToCellLayout(child, index, childId, params, markCells, false);
- }
- private void scaleChild(BubbleTextView bubbleChild, float pivot, float scale) {
+ private void scaleChild(BubbleTextView bubbleChild, float scale) {
// If we haven't measured the child yet, do it now
// (this happens if we're being dropped from all-apps
if (bubbleChild.getLayoutParams() instanceof LayoutParams &&
@@ -595,7 +593,7 @@ public class CellLayout extends ViewGroup {
}
public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params,
- boolean markCells, boolean allApps) {
+ boolean markCells) {
final LayoutParams lp = params;
// Hotseat icons - scale down and remove text
@@ -608,14 +606,14 @@ public class CellLayout extends ViewGroup {
// Start the child with 100% scale and visible text
resetChild(bubbleChild);
- if (mIsHotseat && !allApps && mHotseatChildScale >= 0) {
+ if (mIsHotseat && mHotseatChildScale >= 0) {
// Scale/make transparent for a hotseat
- scaleChild(bubbleChild, 0f, mHotseatChildScale);
+ scaleChild(bubbleChild, mHotseatChildScale);
bubbleChild.setTextColor(getResources().getColor(android.R.color.transparent));
} else if (mChildScale >= 0) {
// Else possibly still scale it if we need to for smaller icons
- scaleChild(bubbleChild, 0f, mChildScale);
+ scaleChild(bubbleChild, mChildScale);
}
}
diff --git a/src/com/android/launcher2/FolderIcon.java b/src/com/android/launcher2/FolderIcon.java
index 4a713293a..d64308406 100644
--- a/src/com/android/launcher2/FolderIcon.java
+++ b/src/com/android/launcher2/FolderIcon.java
@@ -198,11 +198,13 @@ public class FolderIcon extends LinearLayout implements FolderListener {
}
mAcceptAnimator = ValueAnimator.ofFloat(0f, 1f);
mAcceptAnimator.setDuration(CONSUMPTION_ANIMATION_DURATION);
+
+ final int previewSize = sPreviewSize;
mAcceptAnimator.addUpdateListener(new AnimatorUpdateListener() {
public void onAnimationUpdate(ValueAnimator animation) {
final float percent = (Float) animation.getAnimatedValue();
- mOuterRingSize = (1 + percent * OUTER_RING_GROWTH_FACTOR) * sPreviewSize;
- mInnerRingSize = (1 + percent * INNER_RING_GROWTH_FACTOR) * sPreviewSize;
+ mOuterRingSize = (1 + percent * OUTER_RING_GROWTH_FACTOR) * previewSize;
+ mInnerRingSize = (1 + percent * INNER_RING_GROWTH_FACTOR) * previewSize;
if (mCellLayout != null) {
mCellLayout.invalidate();
}
@@ -225,11 +227,13 @@ public class FolderIcon extends LinearLayout implements FolderListener {
}
mNeutralAnimator = ValueAnimator.ofFloat(0f, 1f);
mNeutralAnimator.setDuration(CONSUMPTION_ANIMATION_DURATION);
+
+ final int previewSize = sPreviewSize;
mNeutralAnimator.addUpdateListener(new AnimatorUpdateListener() {
public void onAnimationUpdate(ValueAnimator animation) {
final float percent = (Float) animation.getAnimatedValue();
- mOuterRingSize = (1 + (1 - percent) * OUTER_RING_GROWTH_FACTOR) * sPreviewSize;
- mInnerRingSize = (1 + (1 - percent) * INNER_RING_GROWTH_FACTOR) * sPreviewSize;
+ mOuterRingSize = (1 + (1 - percent) * OUTER_RING_GROWTH_FACTOR) * previewSize;
+ mInnerRingSize = (1 + (1 - percent) * INNER_RING_GROWTH_FACTOR) * previewSize;
if (mCellLayout != null) {
mCellLayout.invalidate();
}
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java
index a6c9fb28a..15d606d8f 100644
--- a/src/com/android/launcher2/Hotseat.java
+++ b/src/com/android/launcher2/Hotseat.java
@@ -132,6 +132,6 @@ public class Hotseat extends FrameLayout {
int y = getCellYFromOrder(mAllAppsButtonRank);
CellLayout.LayoutParams lp = new CellLayout.LayoutParams(x,y,1,1);
lp.canReorder = false;
- mContent.addViewToCellLayout(allAppsButton, -1, 0, lp, true, true);
+ mContent.addViewToCellLayout(allAppsButton, -1, 0, lp, true);
}
}