am ce605142: Merge change 26717 into eclair
Merge commit 'ce60514221f2a143a0f85a1c63637d674eaa3d58' into eclair-plus-aosp * commit 'ce60514221f2a143a0f85a1c63637d674eaa3d58': Newer animations.
This commit is contained in:
@@ -2825,6 +2825,17 @@
|
|||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="detachWallpaper"
|
||||||
|
type="int"
|
||||||
|
transient="false"
|
||||||
|
volatile="false"
|
||||||
|
value="16843430"
|
||||||
|
static="true"
|
||||||
|
final="true"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</field>
|
||||||
<field name="detailColumn"
|
<field name="detailColumn"
|
||||||
type="int"
|
type="int"
|
||||||
transient="false"
|
transient="false"
|
||||||
@@ -162482,6 +162493,17 @@
|
|||||||
visibility="protected"
|
visibility="protected"
|
||||||
>
|
>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="getDetachWallpaper"
|
||||||
|
return="boolean"
|
||||||
|
abstract="false"
|
||||||
|
native="false"
|
||||||
|
synchronized="false"
|
||||||
|
static="false"
|
||||||
|
final="false"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</method>
|
||||||
<method name="getDuration"
|
<method name="getDuration"
|
||||||
return="long"
|
return="long"
|
||||||
abstract="false"
|
abstract="false"
|
||||||
@@ -162728,6 +162750,19 @@
|
|||||||
<parameter name="listener" type="android.view.animation.Animation.AnimationListener">
|
<parameter name="listener" type="android.view.animation.Animation.AnimationListener">
|
||||||
</parameter>
|
</parameter>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="setDetachWallpaper"
|
||||||
|
return="void"
|
||||||
|
abstract="false"
|
||||||
|
native="false"
|
||||||
|
synchronized="false"
|
||||||
|
static="false"
|
||||||
|
final="false"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
<parameter name="detachWallpaper" type="boolean">
|
||||||
|
</parameter>
|
||||||
|
</method>
|
||||||
<method name="setDuration"
|
<method name="setDuration"
|
||||||
return="void"
|
return="void"
|
||||||
abstract="false"
|
abstract="false"
|
||||||
|
|||||||
@@ -175,6 +175,11 @@ public abstract class Animation implements Cloneable {
|
|||||||
*/
|
*/
|
||||||
private int mZAdjustment;
|
private int mZAdjustment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't animate the wallpaper.
|
||||||
|
*/
|
||||||
|
private boolean mDetachWallpaper = false;
|
||||||
|
|
||||||
private boolean mMore = true;
|
private boolean mMore = true;
|
||||||
private boolean mOneMoreTime = true;
|
private boolean mOneMoreTime = true;
|
||||||
|
|
||||||
@@ -218,6 +223,8 @@ public abstract class Animation implements Cloneable {
|
|||||||
|
|
||||||
setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL));
|
setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL));
|
||||||
|
|
||||||
|
setDetachWallpaper(a.getBoolean(com.android.internal.R.styleable.Animation_detachWallpaper, false));
|
||||||
|
|
||||||
ensureInterpolator();
|
ensureInterpolator();
|
||||||
|
|
||||||
a.recycle();
|
a.recycle();
|
||||||
@@ -514,6 +521,19 @@ public abstract class Animation implements Cloneable {
|
|||||||
mZAdjustment = zAdjustment;
|
mZAdjustment = zAdjustment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If detachWallpaper is true, and this is a window animation of a window
|
||||||
|
* that has a wallpaper background, then the window will be detached from
|
||||||
|
* the wallpaper while it runs. That is, the animation will only be applied
|
||||||
|
* to the window, and the wallpaper behind it will remain static.
|
||||||
|
*
|
||||||
|
* @param detachWallpaper true if the wallpaper should be detached from the animation
|
||||||
|
* @attr ref android.R.styleable#Animation_detachWallpaper
|
||||||
|
*/
|
||||||
|
public void setDetachWallpaper(boolean detachWallpaper) {
|
||||||
|
mDetachWallpaper = detachWallpaper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the acceleration curve type for this animation.
|
* Gets the acceleration curve type for this animation.
|
||||||
*
|
*
|
||||||
@@ -610,6 +630,14 @@ public abstract class Animation implements Cloneable {
|
|||||||
return mZAdjustment;
|
return mZAdjustment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return value of {@link #setDetachWallpaper(boolean)}.
|
||||||
|
* @attr ref android.R.styleable#Animation_detachWallpaper
|
||||||
|
*/
|
||||||
|
public boolean getDetachWallpaper() {
|
||||||
|
return mDetachWallpaper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Indicates whether or not this animation will affect the transformation
|
* <p>Indicates whether or not this animation will affect the transformation
|
||||||
* matrix. For instance, a fade animation will not affect the matrix whereas
|
* matrix. For instance, a fade animation will not affect the matrix whereas
|
||||||
|
|||||||
@@ -17,8 +17,22 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
|
wallpaper, without zooming the wallpaper itself. -->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
|
android:zAdjustment="top">
|
||||||
|
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||||
|
android:fromYScale="2.0" android:toYScale="1.0"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
<alpha android:fromAlpha="0" android:toAlpha="1.0"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
<!-- This version zooms the new non-wallpaper down on top of the
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
wallpaper. -->
|
wallpaper. -->
|
||||||
|
<!--
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:interpolator="@anim/decelerate_interpolator">
|
android:interpolator="@anim/decelerate_interpolator">
|
||||||
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||||
@@ -26,6 +40,7 @@
|
|||||||
android:pivotX="50%p" android:pivotY="50%p"
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
android:duration="@android:integer/config_mediumAnimTime" />
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
</set>
|
</set>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- This version is a variation on the inter-activity slide that
|
<!-- This version is a variation on the inter-activity slide that
|
||||||
also scales the wallpaper. -->
|
also scales the wallpaper. -->
|
||||||
|
|||||||
@@ -17,8 +17,20 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
|
wallpaper, without zooming the wallpaper itself. -->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
|
android:detachWallpaper="true">
|
||||||
|
<scale android:fromXScale="1.0" android:toXScale=".5"
|
||||||
|
android:fromYScale="1.0" android:toYScale=".5"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
</set>
|
||||||
|
|
||||||
<!-- This version zooms the new non-wallpaper down on top of the
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
wallpaper. The wallpaper here just stays fixed behind. -->
|
wallpaper. The wallpaper here just stays fixed behind. -->
|
||||||
|
<!--
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:interpolator="@anim/decelerate_interpolator"
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
android:zAdjustment="top">
|
android:zAdjustment="top">
|
||||||
@@ -29,6 +41,7 @@
|
|||||||
<alpha android:fromAlpha="1.0" android:toAlpha="0"
|
<alpha android:fromAlpha="1.0" android:toAlpha="0"
|
||||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
</set>
|
</set>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- This version is a variation on the inter-activity slide that
|
<!-- This version is a variation on the inter-activity slide that
|
||||||
also scales the wallpaper. -->
|
also scales the wallpaper. -->
|
||||||
|
|||||||
@@ -17,8 +17,20 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
|
wallpaper, without zooming the wallpaper itself. -->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
|
android:detachWallpaper="true">
|
||||||
|
<scale android:fromXScale=".5" android:toXScale="1.0"
|
||||||
|
android:fromYScale=".5" android:toYScale="1.0"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
</set>
|
||||||
|
|
||||||
<!-- This version zooms the new non-wallpaper up off the wallpaper the
|
<!-- This version zooms the new non-wallpaper up off the wallpaper the
|
||||||
wallpaper. The wallpaper here just stays fixed behind. -->
|
wallpaper. The wallpaper here just stays fixed behind. -->
|
||||||
|
<!--
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:interpolator="@anim/decelerate_interpolator"
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
android:zAdjustment="top">
|
android:zAdjustment="top">
|
||||||
@@ -29,6 +41,7 @@
|
|||||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
</set>
|
</set>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- This version is a variation on the inter-activity slide that
|
<!-- This version is a variation on the inter-activity slide that
|
||||||
also scales the wallpaper. -->
|
also scales the wallpaper. -->
|
||||||
|
|||||||
@@ -17,8 +17,22 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
|
wallpaper, without zooming the wallpaper itself. -->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:interpolator="@anim/decelerate_interpolator"
|
||||||
|
android:zAdjustment="top">
|
||||||
|
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
||||||
|
android:fromYScale="1.0" android:toYScale="2.0"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
<alpha android:fromAlpha="1.0" android:toAlpha="0"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
<!-- This version zooms the new non-wallpaper down on top of the
|
<!-- This version zooms the new non-wallpaper down on top of the
|
||||||
wallpaper. -->
|
wallpaper. -->
|
||||||
|
<!--
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:interpolator="@anim/decelerate_interpolator">
|
android:interpolator="@anim/decelerate_interpolator">
|
||||||
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
||||||
@@ -26,6 +40,7 @@
|
|||||||
android:pivotX="50%p" android:pivotY="50%p"
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
android:duration="@android:integer/config_mediumAnimTime" />
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
</set>
|
</set>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- This version is a variation on the inter-activity slide that
|
<!-- This version is a variation on the inter-activity slide that
|
||||||
also scales the wallpaper. -->
|
also scales the wallpaper. -->
|
||||||
|
|||||||
@@ -2639,6 +2639,9 @@
|
|||||||
content for the duration of the animation. -->
|
content for the duration of the animation. -->
|
||||||
<enum name="bottom" value="-1" />
|
<enum name="bottom" value="-1" />
|
||||||
</attr>
|
</attr>
|
||||||
|
<!-- Special option for window animations: if this window is on top
|
||||||
|
of a wallpaper, don't animate the wallpaper with it. -->
|
||||||
|
<attr name="detachWallpaper" format="boolean" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="RotateAnimation">
|
<declare-styleable name="RotateAnimation">
|
||||||
|
|||||||
@@ -1170,6 +1170,7 @@
|
|||||||
<public type="attr" name="detailColumn" />
|
<public type="attr" name="detailColumn" />
|
||||||
<public type="attr" name="detailSocialSummary" />
|
<public type="attr" name="detailSocialSummary" />
|
||||||
<public type="attr" name="thumbnail" />
|
<public type="attr" name="thumbnail" />
|
||||||
|
<public type="attr" name="detachWallpaper" />
|
||||||
|
|
||||||
<public type="style" name="Theme.Wallpaper" />
|
<public type="style" name="Theme.Wallpaper" />
|
||||||
<public type="style" name="Theme.Wallpaper.NoTitleBar" />
|
<public type="style" name="Theme.Wallpaper.NoTitleBar" />
|
||||||
|
|||||||
@@ -7320,18 +7320,22 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// are currently targeting.
|
// are currently targeting.
|
||||||
if (mAttrs.type == TYPE_WALLPAPER && mLowerWallpaperTarget == null
|
if (mAttrs.type == TYPE_WALLPAPER && mLowerWallpaperTarget == null
|
||||||
&& mWallpaperTarget != null) {
|
&& mWallpaperTarget != null) {
|
||||||
if (mWallpaperTarget.mHasLocalTransformation) {
|
if (mWallpaperTarget.mHasLocalTransformation &&
|
||||||
|
mWallpaperTarget.mAnimation != null &&
|
||||||
|
!mWallpaperTarget.mAnimation.getDetachWallpaper()) {
|
||||||
attachedTransformation = mWallpaperTarget.mTransformation;
|
attachedTransformation = mWallpaperTarget.mTransformation;
|
||||||
|
if (DEBUG_WALLPAPER && attachedTransformation != null) {
|
||||||
|
Log.v(TAG, "WP target attached xform: " + attachedTransformation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mWallpaperTarget.mAppToken != null &&
|
if (mWallpaperTarget.mAppToken != null &&
|
||||||
mWallpaperTarget.mAppToken.hasTransformation) {
|
mWallpaperTarget.mAppToken.hasTransformation &&
|
||||||
|
mWallpaperTarget.mAppToken.animation != null &&
|
||||||
|
!mWallpaperTarget.mAppToken.animation.getDetachWallpaper()) {
|
||||||
appTransformation = mWallpaperTarget.mAppToken.transformation;
|
appTransformation = mWallpaperTarget.mAppToken.transformation;
|
||||||
}
|
if (DEBUG_WALLPAPER && appTransformation != null) {
|
||||||
if (DEBUG_WALLPAPER && attachedTransformation != null) {
|
Log.v(TAG, "WP target app xform: " + appTransformation);
|
||||||
Log.v(TAG, "WP target attached xform: " + attachedTransformation);
|
}
|
||||||
}
|
|
||||||
if (DEBUG_WALLPAPER && appTransformation != null) {
|
|
||||||
Log.v(TAG, "WP target app xform: " + appTransformation);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user