Added in API level 1

Drawable.Callback


public static interface Drawable.Callback

android.graphics.drawable.Drawable.Callback
AbsListView Base class that can be used to implement virtualized lists of items. 
AbsSeekBar AbsSeekBar extends the capabilities of ProgressBar by adding a draggable thumb. 
AbsSpinner An abstract base class for spinner widgets. 
AbsoluteLayout This class was deprecated in API level 3. Use FrameLayout, RelativeLayout or a custom layout instead. 
ActionMenuView ActionMenuView is a presentation of a series of menu options as a View. 
AdapterView<T extends Adapter> An AdapterView is a view whose children are determined by an Adapter
AdapterViewAnimator Base class for a AdapterView that will perform animations when switching between its views. 
AdapterViewFlipper Simple ViewAnimator that will animate between two or more views that have been added to it. 
AdaptiveIconDrawable

This class can also be created via XML inflation using <adaptive-icon> tag in addition to dynamic creation. 

AnalogClock This class was deprecated in API level 23. This widget is no longer supported; except for RemoteViews use cases like app widgets. 
AnimatedStateListDrawable Drawable containing a set of Drawable keyframes where the currently displayed keyframe is chosen based on the current state set. 
AnimationDrawable An object used to create frame-by-frame animations, defined by a series of Drawable objects, which can be used as a View object's background. 
AppWidgetHostView Provides the glue to show AppWidget views. 
AutoCompleteTextView

An editable text view that shows completion suggestions automatically while the user is typing. 

Button A user interface element the user can tap or click to perform an action. 
CalendarView This class is a calendar widget for displaying and selecting dates. 
CheckBox

A checkbox is a specific type of two-states button that can be either checked or unchecked. 

CheckedTextView An extension to TextView that supports the Checkable interface and displays. 
Chronometer Class that implements a simple timer. 
ClipDrawable A Drawable that clips another Drawable based on this Drawable's current level value. 
ColorStateListDrawable A Drawable that manages a ColorDrawable to make it stateful and backed by a ColorStateList
CompoundButton

A button with two states, checked and unchecked. 

DatePicker Provides a widget for selecting a date. 
DialerFilter This class was deprecated in API level 26. Use a custom view or layout to handle this functionality instead 
DigitalClock This class was deprecated in API level 17. It is recommended you use TextClock instead. 
DrawableContainer A helper class that contains several Drawables and selects which one to use. 
DrawableWrapper Drawable container with only one child element. 
EditText A user interface element for entering and modifying text. 
ExpandableListView A view that shows items in a vertically scrolling two-level list. 
ExtractEditText Specialization of EditText for showing and interacting with the extracted text in a full-screen input method. 
FragmentBreadCrumbs This class was deprecated in API level 21. This widget is no longer supported. 
FrameLayout FrameLayout is designed to block out an area on the screen to display a single item. 
GLSurfaceView An implementation of SurfaceView that uses the dedicated surface for displaying OpenGL rendering. 
Gallery This class was deprecated in API level 16. This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library. 
GestureOverlayView A transparent overlay for gesture input that can be placed on top of other widgets or contain other widgets. 
GridLayout A layout that places its children in a rectangular grid
GridView A view that shows items in two-dimensional scrolling grid. 
HorizontalScrollView Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. 
ImageButton

Displays a button with an image (instead of text) that can be pressed or clicked by the user. 

ImageSwitcher ViewSwitcher that switches between two ImageViews when a new image is set on it. 
ImageView Displays image resources, for example Bitmap or Drawable resources. 
InlineContentView This class represents a view that holds opaque content from another app that you can inline in your UI. 
InsetDrawable A Drawable that insets another Drawable by a specified distance or fraction of the content bounds. 
KeyboardView This class was deprecated in API level 29. This class is deprecated because this is just a convenient UI widget class that application developers can re-implement on top of existing public APIs. If you have already depended on this class, consider copying the implementation from AOSP into your project or re-implementing a similar widget by yourselves 
LayerDrawable A Drawable that manages an array of other Drawables. 
LevelListDrawable A resource that manages a number of alternate Drawables, each assigned a maximum numerical value. 
LinearLayout A layout that arranges other views either horizontally in a single column or vertically in a single row. 
ListView

Displays a vertically-scrollable collection of views, where each view is positioned immediatelybelow the previous view in the list. 

MediaController A view containing controls for a MediaPlayer. 
MediaRouteButton  
MultiAutoCompleteTextView An editable text view, extending AutoCompleteTextView, that can show completion suggestions for the substring of the text where the user is typing instead of necessarily for the entire thing. 
NumberPicker A widget that enables the user to select a number from a predefined range. 
ProgressBar

A user interface element that indicates the progress of an operation. 

QuickContactBadge Widget used to show an image with the standard QuickContact badge and on-click behavior. 
RadioButton

A radio button is a two-states button that can be either checked or unchecked. 

RadioGroup

This class is used to create a multiple-exclusion scope for a set of radio buttons. 

RatingBar A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. 
RelativeLayout A Layout where the positions of the children can be described in relation to each other or to the parent. 
RippleDrawable Drawable that shows a ripple effect in response to state changes. 
RotateDrawable

A Drawable that can rotate another Drawable based on the current level value. 

ScaleDrawable A Drawable that changes the size of another Drawable based on its current level value. 
ScrollView A view group that allows the view hierarchy placed within it to be scrolled. 
SearchView A widget that provides a user interface for the user to enter a search query and submit a request to a search provider. 
SeekBar A SeekBar is an extension of ProgressBar that adds a draggable thumb. 
SlidingDrawer This class was deprecated in API level 17. This class is not supported anymore. It is recommended you base your own implementation on the source code for the Android Open Source Project if you must use it in your application. 
Space Space is a lightweight View subclass that may be used to create gaps between components in general purpose layouts. 
Spinner A view that displays one child at a time and lets the user pick among them. 
SplashScreenView

The view which allows an activity to customize its splash screen exit animation. 

StackView  
StateListDrawable Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value. 
SurfaceView Provides a dedicated drawing surface embedded inside of a view hierarchy. 
Switch A Switch is a two-state toggle widget. 
TabHost This class was deprecated in API level 30. new applications should use fragment APIs instead of this class: Use TabLayout and ViewPager instead. 
TabWidget This class was deprecated in API level 30. new applications should use fragment APIs instead of this class: Use TabLayout and ViewPager instead. 
TableLayout

A layout that arranges its children into rows and columns. 

TableRow

A layout that arranges its children horizontally. 

TextClock

TextClock can display the current date and/or time as a formatted string. 

TextSwitcher Specialized ViewSwitcher that contains only children of type TextView
TextView A user interface element that displays text to the user. 
TextureView

A TextureView can be used to display a content stream, such as that coming from a camera preview, a video, or an OpenGL scene. 

TimePicker A widget for selecting the time of day, in either 24-hour or AM/PM mode. 
ToggleButton Displays checked/unchecked states as a button with a "light" indicator and by default accompanied with the text "ON" or "OFF". 
Toolbar A standard toolbar for use within application content. 
TransitionDrawable An extension of LayerDrawables that is intended to cross-fade between the first and second layer. 
TvAdView Displays contents of TV advertisement services. 
TvInteractiveAppView Displays contents of interactive TV applications. 
TvView Displays TV contents. 
TwoLineListItem This class was deprecated in API level 17. This class can be implemented easily by apps using a RelativeLayout or a LinearLayout. 
VideoView Displays a video file. 
View

This class represents the basic building block for user interface components. 

ViewAnimator Base class for a FrameLayout container that will perform animations when switching between its views. 
ViewFlipper Simple ViewAnimator that will animate between two or more views that have been added to it. 
ViewGroup

A ViewGroup is a special view that can contain other views (called children.) The view group is the base class for layouts and views containers. 

ViewStub A ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime. 
ViewSwitcher ViewAnimator that switches between two views, and has a factory from which these views are created. 
WebView A View that displays web pages. 
ZoomButton This class was deprecated in API level 26. Use other means to handle this functionality. This widget is merely a simple wrapper around a long-press handler. 
ZoomControls This class was deprecated in API level 29. This functionality and UI is better handled with custom views and layouts rather than a dedicated zoom-control widget 


Implement this interface if you want to create an animated drawable that extends Drawable. Upon retrieving a drawable, use Drawable.setCallback(android.graphics.drawable.Drawable.Callback) to supply your implementation of the interface to the drawable; it uses this interface to schedule and execute animation changes.

Summary

Public methods

abstract void invalidateDrawable(Drawable who)

Called when the drawable needs to be redrawn.

abstract void scheduleDrawable(Drawable who, Runnable what, long when)

A Drawable can call this to schedule the next frame of its animation.

abstract void unscheduleDrawable(Drawable who, Runnable what)

A Drawable can call this to unschedule an action previously scheduled with scheduleDrawable(Drawable, Runnable, long).

Public methods

invalidateDrawable

Added in API level 1
public abstract void invalidateDrawable (Drawable who)

Called when the drawable needs to be redrawn. A view at this point should invalidate itself (or at least the part of itself where the drawable appears).

Parameters
who Drawable: The drawable that is requesting the update. This value cannot be null.

scheduleDrawable

Added in API level 1
public abstract void scheduleDrawable (Drawable who, 
                Runnable what, 
                long when)

A Drawable can call this to schedule the next frame of its animation. An implementation can generally simply call Handler.postAtTime(Runnable, Object, long) with the parameters (what, who, when) to perform the scheduling.

Parameters
who Drawable: The drawable being scheduled. This value cannot be null.

what Runnable: The action to execute. This value cannot be null.

when long: The time (in milliseconds) to run. The timebase is SystemClock.uptimeMillis()

unscheduleDrawable

Added in API level 1
public abstract void unscheduleDrawable (Drawable who, 
                Runnable what)

A Drawable can call this to unschedule an action previously scheduled with scheduleDrawable(Drawable, Runnable, long). An implementation can generally simply call Handler.removeCallbacks(Runnable, Object) with the parameters (what, who) to unschedule the drawable.

Parameters
who Drawable: The drawable being unscheduled. This value cannot be null.

what Runnable: The action being unscheduled. This value cannot be null.