summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/CellLayout.java
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-27 17:34:01 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-27 17:34:44 +0000
commit5ffcd2b98cad37a08338f6e1677b6ba0b6eee0be (patch)
treef4bf7468b0a1a8a3fc221a4fe1af0a4ab5e301ef /src/com/cyanogenmod/trebuchet/CellLayout.java
parent16e27563f01f95ed7ded10f2a2ba76d2ea4e65b4 (diff)
downloadandroid_packages_apps_Trebuchet-5ffcd2b98cad37a08338f6e1677b6ba0b6eee0be.tar.gz
android_packages_apps_Trebuchet-5ffcd2b98cad37a08338f6e1677b6ba0b6eee0be.tar.bz2
android_packages_apps_Trebuchet-5ffcd2b98cad37a08338f6e1677b6ba0b6eee0be.zip
Hotseat: Icon scale
Change-Id: I6cae71283c164fe576dfd8338097f74d5d025b4a
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/CellLayout.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/CellLayout.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/com/cyanogenmod/trebuchet/CellLayout.java b/src/com/cyanogenmod/trebuchet/CellLayout.java
index 0521ef7c7..4029ed119 100644
--- a/src/com/cyanogenmod/trebuchet/CellLayout.java
+++ b/src/com/cyanogenmod/trebuchet/CellLayout.java
@@ -138,8 +138,7 @@ public class CellLayout extends ViewGroup {
private TimeInterpolator mEaseOutInterpolator;
private ShortcutAndWidgetContainer mShortcutsAndWidgets;
- private boolean mIsHotseat = false;
- private float mHotseatScale = 1f;
+ private float mChildrenScale = 1f;
public static final int MODE_DRAG_OVER = 0;
public static final int MODE_ON_DROP = 1;
@@ -202,8 +201,6 @@ public class CellLayout extends ViewGroup {
setAlwaysDrawnWithCacheEnabled(false);
final Resources res = getResources();
- mHotseatScale = (res.getInteger(R.integer.hotseat_item_scale_percentage) / 100f);
-
mNormalBackground = res.getDrawable(R.drawable.homescreen_blue_normal_holo);
mActiveGlowBackground = res.getDrawable(R.drawable.homescreen_blue_strong_holo);
@@ -326,8 +323,12 @@ public class CellLayout extends ViewGroup {
mShortcutsAndWidgets.buildLayer();
}
+ public void setChildrenScale(float childrenScale) {
+ mChildrenScale = childrenScale;
+ }
+
public float getChildrenScale() {
- return mIsHotseat ? mHotseatScale : 1.0f;
+ return mChildrenScale;
}
public void setGridSize(int x, int y) {
@@ -609,10 +610,6 @@ public class CellLayout extends ViewGroup {
return mCountY;
}
- public void setIsHotseat(boolean isHotseat) {
- mIsHotseat = isHotseat;
- }
-
public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params,
boolean markCells) {
final LayoutParams lp = params;
@@ -622,11 +619,7 @@ public class CellLayout extends ViewGroup {
BubbleTextView bubbleChild = (BubbleTextView) child;
Resources res = getResources();
- if (mIsHotseat) {
- bubbleChild.setTextColor(res.getColor(android.R.color.transparent));
- } else {
- bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
- }
+ bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
}
child.setScaleX(getChildrenScale());