Loading api/current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -41832,6 +41832,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setElevation(float); Loading @@ -41852,6 +41853,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -41880,6 +41883,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -41934,6 +41940,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); api/system-current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -44170,6 +44170,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setDisableWallpaperTouchEvents(boolean); Loading @@ -44191,6 +44192,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -44219,6 +44222,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -44273,6 +44279,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); api/test-current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -41834,6 +41834,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setElevation(float); Loading @@ -41854,6 +41855,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -41882,6 +41885,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -41936,6 +41942,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); core/java/android/view/Window.java +65 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.media.session.MediaController; import android.net.Uri; Loading Loading @@ -247,12 +248,30 @@ public abstract class Window { private static final String PROPERTY_HARDWARE_UI = "persist.sys.ui.hw"; /** * Flag for letting the theme drive the color of the window caption controls. Use with * {@link #setDecorCaptionShade(int)}. This is the default value. */ public static final int DECOR_CAPTION_SHADE_AUTO = 0; /** * Flag for setting light-color controls on the window caption. Use with * {@link #setDecorCaptionShade(int)}. */ public static final int DECOR_CAPTION_SHADE_LIGHT = 1; /** * Flag for setting dark-color controls on the window caption. Use with * {@link #setDecorCaptionShade(int)}. */ public static final int DECOR_CAPTION_SHADE_DARK = 2; private final Context mContext; private TypedArray mWindowStyle; private Callback mCallback; private OnWindowDismissedCallback mOnWindowDismissedCallback; private WindowControllerCallback mWindowControllerCallback; private RestrictedCaptionAreaListener mRestrictedCaptionAreaListener; private Rect mRestrictedCaptionAreaRect; private WindowManager mWindowManager; private IBinder mAppToken; private String mAppName; Loading Loading @@ -565,6 +584,18 @@ public abstract class Window { int getWindowStackId() throws RemoteException; } /** * Callback for clients that want to be aware of where caption draws content. */ public interface RestrictedCaptionAreaListener { /** * Called when the area where caption draws content changes. * * @param rect The area where caption content is positioned, relative to the top view. */ void onRestrictedCaptionAreaChanged(Rect rect); } public Window(Context context) { mContext = context; mFeatures = mLocalFeatures = getDefaultFeatures(context); Loading Loading @@ -777,6 +808,16 @@ public abstract class Window { return mWindowControllerCallback; } /** * Set a callback for changes of area where caption will draw its content. * * @param listener Callback that will be called when the area changes. */ public final void setRestrictedCaptionAreaListener(RestrictedCaptionAreaListener listener) { mRestrictedCaptionAreaListener = listener; mRestrictedCaptionAreaRect = listener != null ? new Rect() : null; } /** * Take ownership of this window's surface. The window's view hierarchy * will no longer draw into the surface, though it will otherwise continue Loading Loading @@ -2040,5 +2081,29 @@ public abstract class Window { return mOverlayWithDecorCaption; } /** @hide */ public void notifyRestrictedCaptionAreaCallback(int left, int top, int right, int bottom) { if (mRestrictedCaptionAreaListener != null) { mRestrictedCaptionAreaRect.set(left, top, right, bottom); mRestrictedCaptionAreaListener.onRestrictedCaptionAreaChanged( mRestrictedCaptionAreaRect); } } /** * Set what color should the caption controls be. By default the system will try to determine * the color from the theme. You can overwrite this by using {@link #DECOR_CAPTION_SHADE_DARK} * or {@link #DECOR_CAPTION_SHADE_DARK}. */ public abstract void setDecorCaptionShade(int decorCaptionShade); /** * Set the drawable that is drawn underneath the caption during the resizing. * * During the resizing the caption might not be drawn fast enough to match the new dimensions. * There is a second caption drawn underneath it that will be fast enough. By default the * caption is constructed from the theme. You can provide a drawable, that will be drawn instead * to better match your application. */ public abstract void setResizingCaptionDrawable(Drawable drawable); } core/java/com/android/internal/policy/BackdropFrameRenderer.java +14 −5 Original line number Diff line number Diff line Loading @@ -63,17 +63,18 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame private boolean mReportNextDraw; private Drawable mCaptionBackgroundDrawable; private Drawable mUserCaptionBackgroundDrawable; private Drawable mResizingBackgroundDrawable; private ColorDrawable mStatusBarColor; public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds, Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable, int statusBarColor) { Drawable userCaptionBackgroundDrawable, int statusBarColor) { setName("ResizeFrame"); mRenderer = renderer; onResourcesLoaded(decorView, resizingBackgroundDrawable, captionBackgroundDrawable, statusBarColor); userCaptionBackgroundDrawable, statusBarColor); // Create a render node for the content and frame backdrop // which can be resized independently from the content. Loading @@ -92,10 +93,12 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame } void onResourcesLoaded(DecorView decorView, Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawableDrawable, int statusBarColor) { Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable, int statusBarColor) { mDecorView = decorView; mResizingBackgroundDrawable = resizingBackgroundDrawable; mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable; mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable; if (statusBarColor != 0) { mStatusBarColor = new ColorDrawable(statusBarColor); addSystemBarNodeIfNeeded(); Loading Loading @@ -281,8 +284,10 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame // Draw the caption and content backdrops in to our render node. DisplayListCanvas canvas = mFrameAndBackdropNode.start(width, height); mCaptionBackgroundDrawable.setBounds(0, 0, left + width, top + mLastCaptionHeight); mCaptionBackgroundDrawable.draw(canvas); final Drawable drawable = mUserCaptionBackgroundDrawable != null ? mUserCaptionBackgroundDrawable : mCaptionBackgroundDrawable; drawable.setBounds(0, 0, left + width, top + mLastCaptionHeight); drawable.draw(canvas); // The backdrop: clear everything with the background. Clipping is done elsewhere. mResizingBackgroundDrawable.setBounds(0, mLastCaptionHeight, left + width, top + height); Loading Loading @@ -324,4 +329,8 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame mChoreographer.postFrameCallback(this); } } void setUserCaptionBackgroundDrawable(Drawable userCaptionBackgroundDrawable) { mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable; } } Loading
api/current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -41832,6 +41832,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setElevation(float); Loading @@ -41852,6 +41853,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -41880,6 +41883,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -41934,6 +41940,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int);
api/system-current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -44170,6 +44170,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setDisableWallpaperTouchEvents(boolean); Loading @@ -44191,6 +44192,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -44219,6 +44222,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -44273,6 +44279,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int);
api/test-current.txt +10 −0 Original line number Diff line number Diff line Loading @@ -41834,6 +41834,7 @@ package android.view { method public abstract void setContentView(int); method public abstract void setContentView(android.view.View); method public abstract void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public abstract void setDecorCaptionShade(int); method protected void setDefaultWindowFormat(int); method public void setDimAmount(float); method public void setElevation(float); Loading @@ -41854,6 +41855,8 @@ package android.view { method public void setMediaController(android.media.session.MediaController); method public abstract void setNavigationBarColor(int); method public void setReenterTransition(android.transition.Transition); method public abstract void setResizingCaptionDrawable(android.graphics.drawable.Drawable); method public final void setRestrictedCaptionAreaListener(android.view.Window.RestrictedCaptionAreaListener); method public void setReturnTransition(android.transition.Transition); method public void setSharedElementEnterTransition(android.transition.Transition); method public void setSharedElementExitTransition(android.transition.Transition); Loading Loading @@ -41882,6 +41885,9 @@ package android.view { method public abstract void takeKeyEvents(boolean); method public abstract void takeSurface(android.view.SurfaceHolder.Callback2); method public abstract void togglePanel(int, android.view.KeyEvent); field public static final int DECOR_CAPTION_SHADE_AUTO = 0; // 0x0 field public static final int DECOR_CAPTION_SHADE_DARK = 2; // 0x2 field public static final int DECOR_CAPTION_SHADE_LIGHT = 1; // 0x1 field protected static final deprecated int DEFAULT_FEATURES = 65; // 0x41 field public static final int FEATURE_ACTION_BAR = 8; // 0x8 field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9 Loading Loading @@ -41936,6 +41942,10 @@ package android.view { method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int); } public static abstract interface Window.RestrictedCaptionAreaListener { method public abstract void onRestrictedCaptionAreaChanged(android.graphics.Rect); } public final class WindowAnimationFrameStats extends android.view.FrameStats implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int);
core/java/android/view/Window.java +65 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.media.session.MediaController; import android.net.Uri; Loading Loading @@ -247,12 +248,30 @@ public abstract class Window { private static final String PROPERTY_HARDWARE_UI = "persist.sys.ui.hw"; /** * Flag for letting the theme drive the color of the window caption controls. Use with * {@link #setDecorCaptionShade(int)}. This is the default value. */ public static final int DECOR_CAPTION_SHADE_AUTO = 0; /** * Flag for setting light-color controls on the window caption. Use with * {@link #setDecorCaptionShade(int)}. */ public static final int DECOR_CAPTION_SHADE_LIGHT = 1; /** * Flag for setting dark-color controls on the window caption. Use with * {@link #setDecorCaptionShade(int)}. */ public static final int DECOR_CAPTION_SHADE_DARK = 2; private final Context mContext; private TypedArray mWindowStyle; private Callback mCallback; private OnWindowDismissedCallback mOnWindowDismissedCallback; private WindowControllerCallback mWindowControllerCallback; private RestrictedCaptionAreaListener mRestrictedCaptionAreaListener; private Rect mRestrictedCaptionAreaRect; private WindowManager mWindowManager; private IBinder mAppToken; private String mAppName; Loading Loading @@ -565,6 +584,18 @@ public abstract class Window { int getWindowStackId() throws RemoteException; } /** * Callback for clients that want to be aware of where caption draws content. */ public interface RestrictedCaptionAreaListener { /** * Called when the area where caption draws content changes. * * @param rect The area where caption content is positioned, relative to the top view. */ void onRestrictedCaptionAreaChanged(Rect rect); } public Window(Context context) { mContext = context; mFeatures = mLocalFeatures = getDefaultFeatures(context); Loading Loading @@ -777,6 +808,16 @@ public abstract class Window { return mWindowControllerCallback; } /** * Set a callback for changes of area where caption will draw its content. * * @param listener Callback that will be called when the area changes. */ public final void setRestrictedCaptionAreaListener(RestrictedCaptionAreaListener listener) { mRestrictedCaptionAreaListener = listener; mRestrictedCaptionAreaRect = listener != null ? new Rect() : null; } /** * Take ownership of this window's surface. The window's view hierarchy * will no longer draw into the surface, though it will otherwise continue Loading Loading @@ -2040,5 +2081,29 @@ public abstract class Window { return mOverlayWithDecorCaption; } /** @hide */ public void notifyRestrictedCaptionAreaCallback(int left, int top, int right, int bottom) { if (mRestrictedCaptionAreaListener != null) { mRestrictedCaptionAreaRect.set(left, top, right, bottom); mRestrictedCaptionAreaListener.onRestrictedCaptionAreaChanged( mRestrictedCaptionAreaRect); } } /** * Set what color should the caption controls be. By default the system will try to determine * the color from the theme. You can overwrite this by using {@link #DECOR_CAPTION_SHADE_DARK} * or {@link #DECOR_CAPTION_SHADE_DARK}. */ public abstract void setDecorCaptionShade(int decorCaptionShade); /** * Set the drawable that is drawn underneath the caption during the resizing. * * During the resizing the caption might not be drawn fast enough to match the new dimensions. * There is a second caption drawn underneath it that will be fast enough. By default the * caption is constructed from the theme. You can provide a drawable, that will be drawn instead * to better match your application. */ public abstract void setResizingCaptionDrawable(Drawable drawable); }
core/java/com/android/internal/policy/BackdropFrameRenderer.java +14 −5 Original line number Diff line number Diff line Loading @@ -63,17 +63,18 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame private boolean mReportNextDraw; private Drawable mCaptionBackgroundDrawable; private Drawable mUserCaptionBackgroundDrawable; private Drawable mResizingBackgroundDrawable; private ColorDrawable mStatusBarColor; public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds, Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable, int statusBarColor) { Drawable userCaptionBackgroundDrawable, int statusBarColor) { setName("ResizeFrame"); mRenderer = renderer; onResourcesLoaded(decorView, resizingBackgroundDrawable, captionBackgroundDrawable, statusBarColor); userCaptionBackgroundDrawable, statusBarColor); // Create a render node for the content and frame backdrop // which can be resized independently from the content. Loading @@ -92,10 +93,12 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame } void onResourcesLoaded(DecorView decorView, Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawableDrawable, int statusBarColor) { Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable, int statusBarColor) { mDecorView = decorView; mResizingBackgroundDrawable = resizingBackgroundDrawable; mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable; mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable; if (statusBarColor != 0) { mStatusBarColor = new ColorDrawable(statusBarColor); addSystemBarNodeIfNeeded(); Loading Loading @@ -281,8 +284,10 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame // Draw the caption and content backdrops in to our render node. DisplayListCanvas canvas = mFrameAndBackdropNode.start(width, height); mCaptionBackgroundDrawable.setBounds(0, 0, left + width, top + mLastCaptionHeight); mCaptionBackgroundDrawable.draw(canvas); final Drawable drawable = mUserCaptionBackgroundDrawable != null ? mUserCaptionBackgroundDrawable : mCaptionBackgroundDrawable; drawable.setBounds(0, 0, left + width, top + mLastCaptionHeight); drawable.draw(canvas); // The backdrop: clear everything with the background. Clipping is done elsewhere. mResizingBackgroundDrawable.setBounds(0, mLastCaptionHeight, left + width, top + height); Loading Loading @@ -324,4 +329,8 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame mChoreographer.postFrameCallback(this); } } void setUserCaptionBackgroundDrawable(Drawable userCaptionBackgroundDrawable) { mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable; } }