Loading core/java/android/widget/Toast.java +3 −7 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.INotificationManager; import android.app.ITransientNotification; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.os.RemoteException; import android.os.Handler; Loading Loading @@ -310,12 +309,9 @@ public class Toast { mParams.format = PixelFormat.TRANSLUCENT; mParams.windowAnimations = com.android.internal.R.style.Animation_Toast; //TODO: this should work once themes are applied at the phonewindow level. Log.d("~~~TOAST~~~", "windowAnimations:" + mParams.windowAnimations); TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.ToastStyle); mParams.windowAnimations = a.getResourceId(com.android.internal.R.styleable.ToastStyle_toastAnimation, com.android.internal.R.style.Animation_Toast); Log.d("~~~TOAST~~~", "a count:" + a.getIndexCount()); Log.d("~~~TOAST~~~", "windowAnimations:" + mParams.windowAnimations); a.recycle(); // TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.ToastStyle); // mParams.windowAnimations = a.getResourceId(com.android.internal.R.styleable.ToastStyle_toastAnimation, com.android.internal.R.style.Animation_Toast); // a.recycle(); mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); } Loading core/res/res/anim/toast_enter.xml +7 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ */ --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" <!--<alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@anim/decelerate_interpolator" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" /> android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" />--> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator" android:fromYDelta="10%p" android:toYDelta="0" android:duration="800"/> core/res/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ <!-- The standard size (both width and height) of an application icon that will be displayed in the app launcher and elsewhere. --> <dimen name="app_icon_size">48dip</dimen> <dimen name="toast_y_offset">64dip</dimen> <dimen name="toast_y_offset">0dip</dimen> <!-- Height of the status bar --> <dimen name="status_bar_height">25dip</dimen> <dimen name="header_split_button_width">81dp</dimen> Loading Loading
core/java/android/widget/Toast.java +3 −7 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.INotificationManager; import android.app.ITransientNotification; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.os.RemoteException; import android.os.Handler; Loading Loading @@ -310,12 +309,9 @@ public class Toast { mParams.format = PixelFormat.TRANSLUCENT; mParams.windowAnimations = com.android.internal.R.style.Animation_Toast; //TODO: this should work once themes are applied at the phonewindow level. Log.d("~~~TOAST~~~", "windowAnimations:" + mParams.windowAnimations); TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.ToastStyle); mParams.windowAnimations = a.getResourceId(com.android.internal.R.styleable.ToastStyle_toastAnimation, com.android.internal.R.style.Animation_Toast); Log.d("~~~TOAST~~~", "a count:" + a.getIndexCount()); Log.d("~~~TOAST~~~", "windowAnimations:" + mParams.windowAnimations); a.recycle(); // TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.ToastStyle); // mParams.windowAnimations = a.getResourceId(com.android.internal.R.styleable.ToastStyle_toastAnimation, com.android.internal.R.style.Animation_Toast); // a.recycle(); mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); } Loading
core/res/res/anim/toast_enter.xml +7 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ */ --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" <!--<alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@anim/decelerate_interpolator" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" /> android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" />--> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator" android:fromYDelta="10%p" android:toYDelta="0" android:duration="800"/>
core/res/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ <!-- The standard size (both width and height) of an application icon that will be displayed in the app launcher and elsewhere. --> <dimen name="app_icon_size">48dip</dimen> <dimen name="toast_y_offset">64dip</dimen> <dimen name="toast_y_offset">0dip</dimen> <!-- Height of the status bar --> <dimen name="status_bar_height">25dip</dimen> <dimen name="header_split_button_width">81dp</dimen> Loading