Window.SetResizingCaptionDrawable(Drawable) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the drawable that is drawn underneath the caption during the resizing.
[Android.Runtime.Register("setResizingCaptionDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetResizingCaptionDrawable_Landroid_graphics_drawable_Drawable_Handler", ApiSince=24)]
public abstract void SetResizingCaptionDrawable(Android.Graphics.Drawables.Drawable? drawable);
[<Android.Runtime.Register("setResizingCaptionDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetResizingCaptionDrawable_Landroid_graphics_drawable_Drawable_Handler", ApiSince=24)>]
abstract member SetResizingCaptionDrawable : Android.Graphics.Drawables.Drawable -> unit
Parameters
- drawable
- Drawable
- Attributes
Remarks
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.
Starting in Android 15, this API is a no-op. New window decorations introduced in Android 14 are drawn in SystemUI process, and OEMs are responsible to make them responsive to resizing. There is no need to set a background drawable to improve UX anymore since then. Additionally, the foremost activity can draw in caption areas starting in Android 15. Check WindowInsetsController#APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND
, WindowInsetsController#APPEARANCE_LIGHT_CAPTION_BARS
, WindowInsetsController#setSystemBarsAppearance(int, int)
and WindowInsets#getBoundingRects(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.