summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-pt-rPT/strings.xml6
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java123
2 files changed, 66 insertions, 63 deletions
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 94025d5..ca1904f 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -21,7 +21,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="home" msgid="5921706419368316758">"Página Inicial"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplicações Principais do Android"</string>
- <string name="folder_name" msgid="8551881338202938211"></string>
+ <string name="folder_name" msgid="8551881338202938211">"Nome da pasta"</string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Escolher imagem de fundo de"</string>
<string name="wallpaper_instructions" msgid="4215640646180727542">"Definir imagem de fundo"</string>
<string name="pick_wallpaper" msgid="5630222540525626723">"Imagens de fundo"</string>
@@ -29,7 +29,7 @@
<string name="widgets_tab_label" msgid="9145860100000983599">"Widgets"</string>
<string name="long_press_widget_to_add" msgid="7395697462851217506">"Prima sem soltar para escolher um widget."</string>
<string name="market" msgid="2652226429823445833">"Loja"</string>
- <string name="external_drop_widget_error" msgid="2285187188524172774">"Não foi possível largar o item neste Ecrã Principal."</string>
+ <string name="external_drop_widget_error" msgid="2285187188524172774">"Não foi possível largar o item neste ecrã Principal."</string>
<string name="external_drop_widget_pick_title" msgid="7040647073452295370">"Escolher um widget para criar"</string>
<string name="rename_folder_label" msgid="5646236631298452787">"Nome da pasta"</string>
<string name="rename_folder_title" msgid="4544573104191526550">"Mudar o nome da pasta"</string>
@@ -40,7 +40,7 @@
<string name="group_shortcuts" msgid="9133529424900391877">"Atalhos"</string>
<string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Imagens de fundo"</string>
- <string name="completely_out_of_space" msgid="1759078539443491182">"Sem espaço nos Ecrãs principais."</string>
+ <string name="completely_out_of_space" msgid="1759078539443491182">"Sem espaço nos ecrãs principais."</string>
<string name="out_of_space" msgid="8365249326091984698">"Não existe espaço suficiente neste ecrã principal."</string>
<string name="hotseat_out_of_space" msgid="6304886797358479361">"Não existe espaço suficiente na barra personalizável."</string>
<string name="invalid_hotseat_item" msgid="6545340627805449250">"Este widget é demasiado grande para a barra inferior."</string>
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index bb74c6f..cb96f36 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -81,6 +81,8 @@ public class Workspace extends PagedView
DragController.DragListener, LauncherTransitionable, ViewGroup.OnHierarchyChangeListener {
private static final String TAG = "Trebuchet.Workspace";
+ private static final boolean DEBUG_CHANGE_STATE_ANIMATIONS = false;
+
// Y rotation to apply to the workspace screens
private static final float WORKSPACE_ROTATION = 12.5f;
private static final float WORKSPACE_OVERSCROLL_ROTATION = 24f;
@@ -1575,6 +1577,9 @@ public class Workspace extends PagedView
} else if (cl.getVisibility() != VISIBLE) {
cl.setVisibility(VISIBLE);
}
+ if (mFadeInAdjacentScreens && !isSmall()) {
+ setCellLayoutFadeAdjacent(cl, scrollProgress);
+ }
}
}
invalidate();
@@ -2212,89 +2217,72 @@ public class Workspace extends PagedView
}
}
- // Zoom Effects
- if ((mTransitionEffect == TransitionEffect.ZoomIn ||
- mTransitionEffect == TransitionEffect.ZoomOut) && stateIsNormal) {
- if (i != mCurrentPage) {
- scale = (mTransitionEffect == TransitionEffect.ZoomIn ? 0.5f : 1.1f);
+ if (stateIsNormal) {
+ // Zoom Effects
+ if ((mTransitionEffect == TransitionEffect.ZoomIn || mTransitionEffect == TransitionEffect.ZoomOut)) {
+ if (i != mCurrentPage) {
+ scale = (mTransitionEffect == TransitionEffect.ZoomIn ? 0.5f : 1.1f);
+ }
}
- }
- // Stack Effect
- if (mTransitionEffect == TransitionEffect.Stack) {
- if (stateIsSpringLoaded) {
- cl.setVisibility(VISIBLE);
- } else if (stateIsNormal) {
+ // Stack Effect
+ if (mTransitionEffect == TransitionEffect.Stack) {
if (i <= mCurrentPage) {
cl.setVisibility(VISIBLE);
} else {
cl.setVisibility(INVISIBLE);
}
}
- }
- // Flip Effect
- if (mTransitionEffect == TransitionEffect.Flip) {
- if (stateIsSpringLoaded) {
- cl.setVisibility(VISIBLE);
- } else if (stateIsNormal) {
+ // Flip Effect
+ if (mTransitionEffect == TransitionEffect.Flip || mTransitionEffect == TransitionEffect.Accordion) {
if (i == mCurrentPage) {
cl.setVisibility(VISIBLE);
} else {
cl.setVisibility(INVISIBLE);
}
}
- }
-
- // Rotate Effects
- if ((mTransitionEffect == TransitionEffect.RotateUp ||
- mTransitionEffect == TransitionEffect.RotateDown) && stateIsNormal) {
- boolean up = mTransitionEffect == TransitionEffect.RotateUp;
- rotation = (up ? WORKSPACE_ROTATION : -WORKSPACE_ROTATION) * Math.max(-1.0f, Math.min(1.0f , mCurrentPage - i));
- translationX = cl.getMeasuredWidth() * (Math.max(-1.0f, Math.min(1.0f, i - mCurrentPage))) +
- (up ? -1.0f : 1.0f) * (float) Math.sin(Math.toRadians((double) rotation)) *
- (mRotatePivotPoint + cl.getMeasuredHeight() * 0.5f);
- translationY += (up ? -1.0f : 1.0f) * (1.0f - Math.cos(Math.toRadians((double) rotation))) *
- (mRotatePivotPoint + cl.getMeasuredHeight() * 0.5f);
- }
- // Cube Effects
- if ((mTransitionEffect == TransitionEffect.CubeIn || mTransitionEffect == TransitionEffect.CubeOut) && stateIsNormal) {
- if (i < mCurrentPage) {
- rotationY = mTransitionEffect == TransitionEffect.CubeOut ? -90.0f : 90.0f;
- } else if (i > mCurrentPage) {
- rotationY = mTransitionEffect == TransitionEffect.CubeOut ? 90.0f : -90.0f;
+ // Rotate Effects
+ if ((mTransitionEffect == TransitionEffect.RotateUp || mTransitionEffect == TransitionEffect.RotateDown)) {
+ boolean up = mTransitionEffect == TransitionEffect.RotateUp;
+ rotation = (up ? WORKSPACE_ROTATION : -WORKSPACE_ROTATION) * Math.max(-1.0f, Math.min(1.0f , mCurrentPage - i));
+ translationX = cl.getMeasuredWidth() * (Math.max(-1.0f, Math.min(1.0f, i - mCurrentPage))) +
+ (up ? -1.0f : 1.0f) * (float) Math.sin(Math.toRadians((double) rotation)) *
+ (mRotatePivotPoint + cl.getMeasuredHeight() * 0.5f);
+ translationY += (up ? -1.0f : 1.0f) * (1.0f - Math.cos(Math.toRadians((double) rotation))) *
+ (mRotatePivotPoint + cl.getMeasuredHeight() * 0.5f);
}
- }
- // Cylinder Effects
- if ((mTransitionEffect == TransitionEffect.CylinderIn || mTransitionEffect == TransitionEffect.CylinderOut) && stateIsNormal) {
- if (i < mCurrentPage) {
- rotationY = mTransitionEffect == TransitionEffect.CylinderOut ? -WORKSPACE_ROTATION : WORKSPACE_ROTATION;
- } else if (i > mCurrentPage) {
- rotationY = mTransitionEffect == TransitionEffect.CylinderOut ? WORKSPACE_ROTATION : -WORKSPACE_ROTATION;
+ // Cube Effects
+ if ((mTransitionEffect == TransitionEffect.CubeIn || mTransitionEffect == TransitionEffect.CubeOut)) {
+ if (i < mCurrentPage) {
+ rotationY = mTransitionEffect == TransitionEffect.CubeOut ? -90.0f : 90.0f;
+ } else if (i > mCurrentPage) {
+ rotationY = mTransitionEffect == TransitionEffect.CubeOut ? 90.0f : -90.0f;
+ }
}
- }
- // Carousel Effects
- if (mTransitionEffect == TransitionEffect.CarouselLeft || mTransitionEffect == TransitionEffect.CarouselRight && stateIsNormal) {
- if (i < mCurrentPage) {
- rotationY = 90.0f;
- } else if (i > mCurrentPage) {
- rotationY = -90.0f;
+ // Cylinder Effects
+ if ((mTransitionEffect == TransitionEffect.CylinderIn || mTransitionEffect == TransitionEffect.CylinderOut)) {
+ if (i < mCurrentPage) {
+ rotationY = mTransitionEffect == TransitionEffect.CylinderOut ? -WORKSPACE_ROTATION : WORKSPACE_ROTATION;
+ cl.setPivotX(cl.getMeasuredWidth());
+ cl.setTranslationX(0);
+ } else if (i > mCurrentPage) {
+ rotationY = mTransitionEffect == TransitionEffect.CylinderOut ? WORKSPACE_ROTATION : -WORKSPACE_ROTATION;
+ cl.setPivotX(0);
+ cl.setTranslationX(0);
+ }
}
- }
- // Accordion Effect
- if (mTransitionEffect == TransitionEffect.Accordion) {
- if (stateIsSpringLoaded) {
- cl.setVisibility(VISIBLE);
- } else if (stateIsNormal) {
- if (i == mCurrentPage) {
- cl.setVisibility(VISIBLE);
- } else {
- cl.setVisibility(INVISIBLE);
+ // Carousel Effects
+ if (mTransitionEffect == TransitionEffect.CarouselLeft || mTransitionEffect == TransitionEffect.CarouselRight) {
+ if (i < mCurrentPage) {
+ rotationY = 90.0f;
+ } else if (i > mCurrentPage) {
+ rotationY = -90.0f;
}
}
}
@@ -2303,6 +2291,7 @@ public class Workspace extends PagedView
cl.setCameraDistance(1280 * mDensity);
cl.setPivotX(cl.getMeasuredWidth() * 0.5f);
cl.setPivotY(cl.getMeasuredHeight() * 0.5f);
+ cl.setVisibility(VISIBLE);
}
// Determine the pages alpha during the state transition
@@ -2350,8 +2339,22 @@ public class Workspace extends PagedView
}
if (animated) {
+ if (DEBUG_CHANGE_STATE_ANIMATIONS) Log.d(TAG, oldState + " > " + state);
for (int index = 0; index < getChildCount(); index++) {
final int i = index;
+
+ if (DEBUG_CHANGE_STATE_ANIMATIONS) {
+ Log.d(TAG, i + " alpha: " + mOldAlphas[i] + " > " + mNewAlphas[i]);
+ Log.d(TAG, i + " translationX: " + mOldTranslationXs[i] + " > " + mNewTranslationXs[i]);
+ Log.d(TAG, i + " translationY: " + mOldTranslationYs[i] + " > " + mNewTranslationYs[i]);
+ Log.d(TAG, i + " scaleX: " + mOldScaleXs[i] + " > " + mNewScaleXs[i]);
+ Log.d(TAG, i + " scaleY: " + mOldScaleYs[i] + " > " + mNewScaleYs[i]);
+ Log.d(TAG, i + " alpha: " + mOldAlphas[i] + " > " + mNewAlphas[i]);
+ Log.d(TAG, i + " backgroundAlpha: " + mOldBackgroundAlphas[i] + " > " + mNewBackgroundAlphas[i]);
+ Log.d(TAG, i + " rotation: " + mOldRotations[i] + " > " + mNewRotations[i]);
+ Log.d(TAG, i + " rotationY: " + mOldRotationYs[i] + " > " + mNewRotationYs[i]);
+ }
+
final CellLayout cl = (CellLayout) getChildAt(i);
float currentAlpha = cl.getShortcutsAndWidgets().getAlpha();
if (mOldAlphas[i] == 0 && mNewAlphas[i] == 0) {