summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-08-15 12:27:37 -0700
committerDan Sandler <dsandler@android.com>2014-08-19 20:45:36 +0000
commitabedcab44cc56d28ad57fec2d12104818a555dbc (patch)
treea4fc090509c0a134d51b0866b6dbba5310ee567b /packages
parent1bd805c943141690c7446321a43e7113f272fd8f (diff)
downloadframeworks_base-abedcab44cc56d28ad57fec2d12104818a555dbc.zip
frameworks_base-abedcab44cc56d28ad57fec2d12104818a555dbc.tar.gz
frameworks_base-abedcab44cc56d28ad57fec2d12104818a555dbc.tar.bz2
Small tweaks to the stack curve and header transition. (Bug 16656169)
Change-Id: I96120063a66f267ad0b6a39b3dd020bc030083b8
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/values/dimens.xml4
-rw-r--r--packages/SystemUI/res/values/styles.xml14
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java12
5 files changed, 26 insertions, 12 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 5415d19..1b8eeb2 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -205,10 +205,10 @@
<dimen name="recents_task_view_rounded_corners_radius">2dp</dimen>
<!-- The min translation in the Z index for the last task. -->
- <dimen name="recents_task_view_z_min">5dp</dimen>
+ <dimen name="recents_task_view_z_min">25dp</dimen>
<!-- The max translation in the Z index for the last task. -->
- <dimen name="recents_task_view_z_max">65dp</dimen>
+ <dimen name="recents_task_view_z_max">100dp</dimen>
<!-- The amount to translate when animating the removal of a task. -->
<dimen name="recents_task_view_remove_anim_translation_x">100dp</dimen>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 27e58a4..48a031a 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -21,11 +21,23 @@
</style>
<!-- Alternate Recents theme -->
- <style name="RecentsTheme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
+ <style name="RecentsTheme" parent="@android:style/Theme">
+ <!-- NoTitle -->
+ <item name="android:windowNoTitle">true</item>
+ <!-- Wallpaper -->
+ <item name="android:windowBackground">@color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!-- Misc -->
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
+ <item name="*android:lightingStyle">@style/RecentsLighting</item>
+ </style>
+
+ <style name="RecentsLighting" parent="@*android:style/Lighting">
+ <item name="*android:ambientShadowAlpha">0.30</item>
</style>
<!-- Animations for a non-full-screen window or activity. -->
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
index 667faa7..f0bdfa2 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
@@ -53,7 +53,7 @@ public class TaskStackViewLayoutAlgorithm {
// Log function
static final float XScale = 1.75f; // The large the XScale, the longer the flat area of the curve
- static final float LogBase = 300;
+ static final float LogBase = 3000;
static final int PrecisionSteps = 250;
static float[] xp;
static float[] px;
@@ -84,7 +84,7 @@ public class TaskStackViewLayoutAlgorithm {
left + size, mStackRect.top + size);
// Update the affiliation offsets
- float visibleTaskPct = 0.55f;
+ float visibleTaskPct = 0.5f;
mWithinAffiliationOffset = mConfig.taskBarHeight;
mBetweenAffiliationOffset = (int) (visibleTaskPct * mTaskRect.height());
}
@@ -312,4 +312,4 @@ public class TaskStackViewLayoutAlgorithm {
}
return px[xFloorIndex] + pFraction;
}
-} \ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 5914b39..a0e5e44 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -57,7 +57,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
ObjectAnimator mDimAnimator;
float mMaxDimScale;
int mDim;
- AccelerateInterpolator mDimInterpolator = new AccelerateInterpolator(1.25f);
+ AccelerateInterpolator mDimInterpolator = new AccelerateInterpolator(1f);
PorterDuffColorFilter mDimColorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.MULTIPLY);
Task mTask;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index 4b09549..dbfd001 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -211,13 +211,14 @@ class TaskViewHeader extends FrameLayout {
void startEnterRecentsAnimation(int delay, Runnable postAnimRunnable) {
// Animate the task bar of the first task view
setVisibility(View.VISIBLE);
- setTranslationY(-getMeasuredHeight());
+ setAlpha(0f);
animate()
- .translationY(0)
+ .alpha(1f)
.setStartDelay(delay)
- .setInterpolator(mConfig.fastOutSlowInInterpolator)
+ .setInterpolator(mConfig.linearOutSlowInInterpolator)
.setDuration(mConfig.taskBarEnterAnimDuration)
.withEndAction(postAnimRunnable)
+ .withLayer()
.start();
}
@@ -225,9 +226,9 @@ class TaskViewHeader extends FrameLayout {
void startLaunchTaskAnimation(Runnable preAnimRunnable, final Runnable postAnimRunnable) {
// Animate the task bar out of the first task view
animate()
- .translationY(-getMeasuredHeight())
+ .alpha(0f)
.setStartDelay(0)
- .setInterpolator(mConfig.fastOutLinearInInterpolator)
+ .setInterpolator(mConfig.linearOutSlowInInterpolator)
.setDuration(mConfig.taskBarExitAnimDuration)
.withStartAction(preAnimRunnable)
.withEndAction(new Runnable() {
@@ -236,6 +237,7 @@ class TaskViewHeader extends FrameLayout {
post(postAnimRunnable);
}
})
+ .withLayer()
.start();
}