Loading core/java/android/widget/Toast.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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 @@ -308,6 +309,13 @@ public class Toast { | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; 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(); mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); } Loading core/java/com/tmobile/widget/ListItemLabelText.java +2 −2 Original line number Diff line number Diff line package com.tmobile.widget; import com.android.internal.R; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; Loading @@ -9,6 +7,8 @@ import android.view.LayoutInflater; import android.widget.LinearLayout; import android.widget.TextView; import com.android.internal.R; public class ListItemLabelText extends LinearLayout { private TextView mItemLabel; Loading core/res/res/values/attrs.xml +10 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ <resources> <!-- These are the standard attributes that make up a complete theme. --> <declare-styleable name="Theme"> <!-- ============== --> <!-- Generic styles --> <!-- ============== --> Loading Loading @@ -1555,6 +1556,14 @@ <attr name="gravity" /> </declare-styleable> <!-- ============== --> <!-- Toast styles --> <!-- ============== --> <eat-comment /> <declare-styleable name="ToastStyle"> <attr name="toastAnimation" format="reference" /> </declare-styleable> <declare-styleable name="ImageSwitcher"> </declare-styleable> <declare-styleable name="ImageView"> Loading core/res/res/values/themes.xml +4 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,10 @@ <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> <!-- Toast styles --> <item name="toastAnimation">@android:style/Animation.Toast</item> </style> <!-- Variant of the default (dark) theme with no title bar --> Loading Loading
core/java/android/widget/Toast.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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 @@ -308,6 +309,13 @@ public class Toast { | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; 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(); mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); } Loading
core/java/com/tmobile/widget/ListItemLabelText.java +2 −2 Original line number Diff line number Diff line package com.tmobile.widget; import com.android.internal.R; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; Loading @@ -9,6 +7,8 @@ import android.view.LayoutInflater; import android.widget.LinearLayout; import android.widget.TextView; import com.android.internal.R; public class ListItemLabelText extends LinearLayout { private TextView mItemLabel; Loading
core/res/res/values/attrs.xml +10 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ <resources> <!-- These are the standard attributes that make up a complete theme. --> <declare-styleable name="Theme"> <!-- ============== --> <!-- Generic styles --> <!-- ============== --> Loading Loading @@ -1555,6 +1556,14 @@ <attr name="gravity" /> </declare-styleable> <!-- ============== --> <!-- Toast styles --> <!-- ============== --> <eat-comment /> <declare-styleable name="ToastStyle"> <attr name="toastAnimation" format="reference" /> </declare-styleable> <declare-styleable name="ImageSwitcher"> </declare-styleable> <declare-styleable name="ImageView"> Loading
core/res/res/values/themes.xml +4 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,10 @@ <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child</item> <!-- Toast styles --> <item name="toastAnimation">@android:style/Animation.Toast</item> </style> <!-- Variant of the default (dark) theme with no title bar --> Loading