0%

文档补完-Android API reference

API reference | Android 开发者 | Android Developers

Android Platform

android.widget

Classes

AbsListView Base class that can be used to implement virtualized lists of items.
- 可以实现虚拟列表的基类
AbsListView.LayoutParams AbsListView extends LayoutParams to provide a place to hold the view type.
AbsoluteLayout This class was deprecated in API level 3. Use FrameLayout, RelativeLayout or a custom layout instead.
AbsoluteLayout.LayoutParams Per-child layout information associated with AbsoluteLayout.
AbsSeekBar AbsSeekBar extends the capabilities of ProgressBar by adding a draggable thumb.
AbsSpinner An abstract base class for spinner widgets.
- spinner widgets 的抽象类
ActionMenuView ActionMenuView is a presentation of a series of menu options as a View.
- 菜单
ActionMenuView.LayoutParams
AdapterView
<T extends Adapter>
An AdapterView is a view whose children are determined by an Adapter.
- 子 View 被Adapter决定的(ListView、GridView、Spinner、Gallery…)
AdapterView. AdapterContextMenuInfo Extra menu information provided to the View.OnCreateContextMenuListener.onCreateContextMenu(ContextMenu, View, ContextMenuInfo) callback when a context menu is brought up for this AdapterView.
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.
AlphabetIndexer A helper class for adapters that implement the SectionIndexer interface.
- 帮助 adapter 实现 SectionIndexer 的帮助类
AnalogClock This class was deprecated in API level 23. This widget is no longer supported.
ArrayAdapter You can use this adapter to provide views for an AdapterView, Returns a view for each object in a collection of data objects you provide, and can be used with list-based user interface widgets such as ListView or Spinner.
- AdapterView的 adapter 之一
AutoCompleteTextView An editable text view that shows completion suggestions automatically while the user is typing.
- 自动补全的 TextView
BaseAdapter Common base class of common implementation for an Adapter that can be used in both ListView (by implementing the specialized ListAdapter interface) and Spinner (by implementing the specialized SpinnerAdapter interface).
- Adapter 的基类
BaseExpandableListAdapter Base class for a ExpandableListAdapter used to provide data and Views from some data to an expandable list view.
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.
- CheckBox
CheckedTextView An extension to TextView that supports the Checkable interface and displays.
Chronometer Class that implements a simple timer.
CompoundButton A button with two states, checked and unchecked.
CursorAdapter Adapter that exposes data from a Cursor to a ListView widget.
CursorTreeAdapter An adapter that exposes data from a series of Cursors to an ExpandableListView widget.
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.
EdgeEffect This class performs the graphical effect used at the edges of scrollable widgets when the user scrolls beyond the content bounds in 2D space.
EditText A user interface element for entering and modifying text.
- 输入框 EditText
ExpandableListView A view that shows items in a vertically scrolling two-level list.
ExpandableListView.
ExpandableListContextMenuInfo
Extra menu information specific to an ExpandableListView provided to the View.OnCreateContextMenuListener.onCreateContextMenu(ContextMenu, View, ContextMenuInfo) callback when a context menu is brought up for this AdapterView.
Filter A filter constrains data with a filtering pattern.
Filter.FilterResults Holds the results of a filtering operation.
FrameLayout FrameLayout is designed to block out an area on the screen to display a single item.
FrameLayout.LayoutParams Per-child layout information for layouts that support margins.
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.
Gallery.LayoutParams Gallery extends LayoutParams to provide a place to hold current Transformation information along with previous position/transformation info.
GridLayout A layout that places its children in a rectangular grid.
GridLayout.Alignment Alignments specify where a view should be placed within a cell group and what size it should be.
GridLayout.LayoutParams Layout information associated with each of the children of a GridLayout.
GridLayout.Spec A Spec defines the horizontal or vertical characteristics of a group of cells.
GridView A view that shows items in two-dimensional scrolling grid.
HeaderViewListAdapter ListAdapter used when a ListView has header views.
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.
LinearLayout A layout that arranges other views either horizontally in a single column or vertically in a single row.
LinearLayout.LayoutParams Per-child layout information associated with ViewLinearLayout.
ListPopupWindow A ListPopupWindow anchors itself to a host view and displays a list of choices.
ListView Displays a vertically-scrollable collection of views, where each view is positioned immediatelybelow the previous view in the list.
ListView.FixedViewInfo A class that represents a fixed view in a list, for example a header at the top or a footer at the bottom.
Magnifier Android magnifier widget.
- 放大镜
Magnifier.Builder Builder class for Magnifier objects.
MediaController A view containing controls for a MediaPlayer.
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.
MultiAutoCompleteTextView.
CommaTokenizer
This simple Tokenizer can be used for lists where the items are separated by a comma and one or more spaces.
NumberPicker A widget that enables the user to select a number from a predefined range.
OverScroller This class encapsulates scrolling with the ability to overshoot the bounds of a scrolling operation.
PopupMenu A PopupMenu displays a Menu in a modal popup window anchored to a View.
PopupWindow This class represents a popup window that can be used to display an arbitrary view.
ProgressBar A user interface element that indicates the progress of an operation.
- 进度条
通过 style 设置圆形或条形
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.
RadioGroup.LayoutParams This set of layout parameters defaults the width and the height of the children to ViewGroup.LayoutParams.WRAP_CONTENT when they are not specified in the XML file.
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.
RelativeLayout.
LayoutParams
Specifies how a view is positioned within a RelativeLayout.
RemoteViews A class that describes a view hierarchy that can be displayed in another process.
RemoteViews.
RemoteResponse
Class representing a response to an action performed on any element of a RemoteViews.
RemoteViewsService The service to be connected to for a remote adapter to request RemoteViews.
ResourceCursorAdapter An easy adapter that creates views defined in an XML file.
ResourceCursorTreeAdapter A fairly simple ExpandableListAdapter that creates views defined in an XML file.
Scroller This class encapsulates scrolling.
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.
- 可拖拽的进度条
ShareActionProvider This is a provider for a share action.
SimpleAdapter An easy adapter to map static data to views defined in an XML file.
SimpleCursorAdapter An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file.
SimpleCursorTreeAdapter An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file.
SimpleExpandableListAdapter An easy adapter to map static data to group and child views defined in an XML file.
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.
- 在 View 间设置空隙
Spinner A view that displays one child at a time and lets the user pick among them.
StackView
Switch A Switch is a two-state toggle switch widget that can select between two options.
- 开关 View
TabHost This class was deprecated in API level R. new applications should use fragment APIs instead of this class: Use TabLayout and ViewPager instead.
TabHost.TabSpec A tab has a tab indicator, content, and a tag that is used to keep track of it.
TableLayout A layout that arranges its children into rows and columns.
TableLayout.LayoutParams This set of layout parameters enforces the width of each child to be ViewGroup.LayoutParams.MATCH_PARENT and the height of each child to be ViewGroup.LayoutParams.WRAP_CONTENT, but only if the height is not specified.
TableRow A layout that arranges its children horizontally.
TableRow.LayoutParams Set of layout parameters used in table rows.
TabWidget This class was deprecated in API level R. new applications should use fragment APIs instead of this class: Use TabLayout and ViewPager instead.
TextClock TextClock can display the current date and/or time as a formatted string.
- 文字时钟:显示当前的时间
TextSwitcher Specialized ViewSwitcher that contains only children of type TextView.
- 只包含 TV 的 Switcher
TextView A user interface element that displays text to the user.
TextView
TextView.SavedState User interface state that is stored by TextView for implementing View#onSaveInstanceState.
TimePicker A widget for selecting the time of day, in either 24-hour or AM/PM mode.
Toast A toast is a view containing a quick little message for the user. The toast class helps you create and show those.
Toast.Callback Callback object to be called when the toast is shown or hidden.
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.
Toolbar.LayoutParams Layout information for child views of Toolbars.
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.
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.
ViewSwitcher ViewAnimator that switches between two views, and has a factory from which these views are created.
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.
ZoomButtonsController This class was deprecated in API level 26. This functionality and UI is better handled with custom views and layouts rather than a dedicated zoom-control widget
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

android.app

Classes

ActionBar A primary toolbar within the activity that may display the activity title, application-level navigation affordances, and other interactive items.
ActionBar.LayoutParams Per-child layout information associated with action bar custom views.
ActionBar.Tab This class was deprecated in API level 21. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead.
Activity An activity is a single, focused thing that the user can do.
ActivityGroup This class was deprecated in API level 13. Use the new Fragment and FragmentManager APIs instead; these are also available on older platforms through the Android compatibility package.
ActivityManager This class gives information about, and interacts with, activities, services, and the containing process.
ActivityManager.AppTask The AppTask allows you to manage your own application’s tasks.
ActivityManager.MemoryInfo Information you can retrieve about the available memory through ActivityManager#getMemoryInfo.
ActivityManager.ProcessErrorStateInfo Information you can retrieve about any processes that are in an error condition.
ActivityManager.RecentTaskInfo Information you can retrieve about tasks that the user has most recently started or visited.
ActivityManager.RunningAppProcessInfo Information you can retrieve about a running process.
ActivityManager.RunningServiceInfo Information you can retrieve about a particular Service that is currently running in the system.
ActivityManager.RunningTaskInfo Information you can retrieve about a particular task that is currently “running” in the system.
ActivityManager.TaskDescription Information you can set and retrieve about the current activity within the recent task list.
ActivityOptions Helper class for building an options Bundle that can be used with Context.startActivity(Intent, Bundle) and related methods.
AlarmManager This class provides access to the system alarm services.
AlarmManager.AlarmClockInfo An immutable description of a scheduled “alarm clock” event.
AlertDialog A subclass of Dialog that can display one, two or three buttons.
AlertDialog.Builder
AliasActivity This class was deprecated in API level R. Use `` or subclass Activity directly.
AppComponentFactory Interface used to control the instantiation of manifest elements.
Application Base class for maintaining global application state.
ApplicationErrorReport Describes an application error.
ApplicationErrorReport.AnrInfo Describes an application not responding error.
ApplicationErrorReport.BatteryInfo Describes a battery usage report.
ApplicationErrorReport.CrashInfo Describes an application crash.
ApplicationErrorReport.RunningServiceInfo Describes a running service report.
ApplicationExitInfo Describes the information of an application process’s death.
AppOpsManager App-ops are used for two purposes: Access control and tracking.
AppOpsManager.AppOpsCollector Callback an app can register to monitor the app-ops the system has tracked for it.
AsyncNotedAppOp When an AppOpsManager#noteOp(String, int, String, String, String) and the app the app-op is noted for has a AppOpsManager.AppOpsCollector registered the note-event needs to be delivered to the collector.
AutomaticZenRule Rule instance information for zen mode.
DatePickerDialog A simple dialog containing an DatePicker.
Dialog Base class for Dialogs.
DialogFragment This class was deprecated in API level 28. Use the Support Library DialogFragment for consistent behavior across all devices and access to Lifecycle.
DirectAction Represents a abstract action that can be perform on this app.
DirectAction.Builder Builder for construction of DirectAction.
DownloadManager The download manager is a system service that handles long-running HTTP downloads.
DownloadManager.Query This class may be used to filter download manager queries.
DownloadManager.Request This class contains all the information necessary to request a new download.
ExpandableListActivity This class was deprecated in API level R. Use RecyclerView or use ExpandableListView directly
Fragment This class was deprecated in API level 28. Use the Support Library Fragment for consistent behavior across all devices and access to Lifecycle.
Fragment.SavedState This class was deprecated in API level 28. Use Fragment.SavedState
FragmentBreadCrumbs This class was deprecated in API level 21. This widget is no longer supported.
FragmentContainer This class was deprecated in API level 28. Use the Support Library FragmentContainer.
FragmentController This class was deprecated in API level 28. Use the Support Library FragmentController
FragmentHostCallback This class was deprecated in API level 28. Use the Support Library FragmentHostCallback
FragmentManager This class was deprecated in API level 28. Use the Support Library FragmentManager for consistent behavior across all devices and access to Lifecycle.
FragmentManager.FragmentLifecycleCallbacks This class was deprecated in API level 28. Use the Support Library FragmentManager.FragmentLifecycleCallbacks
FragmentManagerNonConfig This class was deprecated in API level 28. Use the Support Library FragmentManagerNonConfig
FragmentTransaction This class was deprecated in API level 28. Use the Support Library FragmentTransaction
Instrumentation Base class for implementing application instrumentation code.
Instrumentation.ActivityMonitor Information about a particular kind of Intent that is being monitored.
Instrumentation.ActivityResult Description of a Activity execution result to return to the original activity.
IntentService This class was deprecated in API level R. IntentService is subject to all the background execution limits imposed with Android 8.0 (API level 26). Consider using WorkManager or JobIntentService, which uses jobs instead of services when running on Android 8.0 or higher.
KeyguardManager Class that can be used to lock and unlock the keyguard.
KeyguardManager.KeyguardDismissCallback Callback passed to KeyguardManager#requestDismissKeyguard(Activity, KeyguardDismissCallback) to notify caller of result.
KeyguardManager.KeyguardLock This class was deprecated in API level 15. Use LayoutParams#FLAG_DISMISS_KEYGUARD and/or LayoutParams#FLAG_SHOW_WHEN_LOCKED instead; this allows you to seamlessly hide the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested.
LauncherActivity This class was deprecated in API level R. Applications can implement this UI themselves using RecyclerView and PackageManager.queryIntentActivities(Intent, int)
LauncherActivity.IconResizer Utility class to resize icons to match default icon size.
LauncherActivity.ListItem An item in the list
ListActivity This class was deprecated in API level R. Use ListFragment or RecyclerView to implement your Activity instead.
ListFragment This class was deprecated in API level 28. Use the Support Library ListFragment for consistent behavior across all devices and access to Lifecycle.
LoaderManager This class was deprecated in API level 28. Use the Support Library LoaderManager
LocalActivityManager This class was deprecated in API level 13. Use the new Fragment and FragmentManager APIs instead; these are also available on older platforms through the Android compatibility package.
MediaRouteActionProvider The media route action provider displays a MediaRouteButton in the application’s ActionBar to allow the user to select routes and to control the currently selected route.
MediaRouteButton
NativeActivity Convenience for implementing an activity that will be implemented purely in native code.
Notification A class that represents how a persistent notification is to be presented to the user using the NotificationManager.
Notification.Action Structure to encapsulate a named action that can be shown as part of this notification.
Notification.Action.Builder Builder class for Action objects.
Notification.Action.WearableExtender Wearable extender for notification actions.
Notification.BigPictureStyle Helper class for generating large-format notifications that include a large image attachment.
Notification.BigTextStyle Helper class for generating large-format notifications that include a lot of text.
Notification.BubbleMetadata Encapsulates the information needed to display a notification as a bubble.
Notification.BubbleMetadata.Builder Builder to construct a BubbleMetadata object.
Notification.Builder Builder class for Notification objects.
Notification.CarExtender Helper class to add Android Auto extensions to notifications.
Notification.CarExtender.Builder Builder class for CarExtender.UnreadConversation objects.
Notification.CarExtender.UnreadConversation A class which holds the unread messages from a conversation.
Notification.DecoratedCustomViewStyle Notification style for custom views that are decorated by the systemInstead of providing a notification that is completely custom, a developer can set this style and still obtain system decorations like the notification header with the expand affordance and actions.
Notification.DecoratedMediaCustomViewStyle Notification style for media custom views that are decorated by the systemInstead of providing a media notification that is completely custom, a developer can set this style and still obtain system decorations like the notification header with the expand affordance and actions.
Notification.InboxStyle Helper class for generating large-format notifications that include a list of (up to 5) strings.
Notification.MediaStyle Notification style for media playback notifications.
Notification.MessagingStyle Helper class for generating large-format notifications that include multiple back-and-forth messages of varying types between any number of people.
Notification.MessagingStyle.Message
Notification.Style An object that can apply a rich notification style to a Notification.Builder object.
Notification.WearableExtender Helper class to add wearable extensions to notifications.
NotificationChannel A representation of settings that apply to a collection of similarly themed notifications.
NotificationChannelGroup A grouping of related notification channels.
NotificationManager Class to notify the user of events that happen. This is how you tell the user that something has happened in the background.
NotificationManager.Policy Notification policy configuration.
PendingIntent A description of an Intent and target action to perform with it.
Person Provides an immutable reference to an entity that appears repeatedly on different surfaces of the platform.
Person.Builder Builder for the immutable Person class.
PictureInPictureParams Represents a set of parameters used to initialize and update an Activity in picture-in-picture mode.
PictureInPictureParams.Builder Builder class for PictureInPictureParams objects.
Presentation Base class for presentations.
ProgressDialog This class was deprecated in API level 26. ProgressDialog is a modal dialog, which prevents the user from interacting with the app. Instead of using this class, you should use a progress indicator like ProgressBar, which can be embedded in your app’s UI. Alternatively, you can use a notification to inform the user of the task’s progress.
RemoteAction Represents a remote action that can be called from another process.
RemoteInput A RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent.
RemoteInput.Builder Builder class for RemoteInput objects.
SearchableInfo Searchability meta-data for an activity.
SearchManager This class provides access to the system search services.
Service A Service is an application component representing either an application’s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use.
SharedElementCallback Listener provided in Activity#setEnterSharedElementCallback(SharedElementCallback) and Activity#setExitSharedElementCallback(SharedElementCallback) as well as Fragment#setEnterSharedElementCallback(SharedElementCallback) and Fragment#setExitSharedElementCallback(SharedElementCallback) to monitor the Shared element transitions.
StatusBarManager Allows an app to control the status bar.
SyncNotedAppOp Description of an app-op that was noted for the current process.
TabActivity This class was deprecated in API level 13. New applications should use Fragments instead of this class; to continue to run on older devices, you can use the v4 support library which provides a version of the Fragment API that is compatible down to Build.VERSION_CODES.DONUT.
TaskInfo Stores information about a particular Task.
TaskStackBuilder Utility class for constructing synthetic back stacks for cross-task navigation on Android 3.0 and newer.
TimePickerDialog A dialog that prompts the user for the time of day using a TimePicker.
UiAutomation Class for interacting with the device’s UI by simulation user actions and introspection of the screen content.
UiModeManager This class provides access to the system uimode services.
VoiceInteractor Interface for an Activity to interact with the user through voice.
VoiceInteractor.AbortVoiceRequest Reports that the current interaction can not be complete with voice, so the application will need to switch to a traditional input UI.
VoiceInteractor.CommandRequest Execute a vendor-specific command using the trusted system VoiceInteractionService.
VoiceInteractor.CompleteVoiceRequest Reports that the current interaction was successfully completed with voice, so the application can report the final status to the user.
VoiceInteractor.ConfirmationRequest Confirms an operation with the user via the trusted system VoiceInteractionService.
VoiceInteractor.PickOptionRequest Select a single option from multiple potential options with the user via the trusted system VoiceInteractionService.
VoiceInteractor.PickOptionRequest.Option Represents a single option that the user may select using their voice.
VoiceInteractor.Prompt A set of voice prompts to use with the voice interaction system to confirm an action, select an option, or do similar operations.
VoiceInteractor.Request Base class for voice interaction requests that can be submitted to the interactor.
WallpaperColors Provides information about the colors of a wallpaper.
WallpaperInfo This class is used to specify meta information of a wallpaper service.
WallpaperManager Provides access to the system wallpaper.
- 提供对系统壁纸的访问

android.view

暴露出处理屏幕布局和与用户互动的基本的 UI classes 。

Classes

AbsSavedState A Parcelable implementation that should be used by inheritance hierarchies to ensure the state of all classes along the chain is saved.
ActionMode Represents a contextual mode of the user interface.
ActionMode.Callback2 Extension of ActionMode.Callback to provide content rect information.
ActionProvider An ActionProvider defines rich menu interaction in a single component.
Choreographer Coordinates the timing of animations, input and drawing.
ContextThemeWrapper A context wrapper that allows you to modify or replace the theme of the wrapped context.
Display Provides information about the size and density of a logical display.
Display.HdrCapabilities Encapsulates the HDR capabilities of a given display.
Display.Mode A mode supported by a given display.
DisplayCutout Represents the area of the display that is not functional for displaying content.
DragAndDropPermissions DragAndDropPermissions controls the access permissions for the content URIs associated with a DragEvent.
DragEvent Represents an event that is sent out by the system at various times during a drag and drop operation.
FocusFinder The algorithm used for finding the next focusable view in a given direction from a view that currently has focus.
FrameMetrics Class containing timing data for various milestones in a frame lifecycle reported by the rendering subsystem.
FrameStats This is the base class for frame statistics.
GestureDetector Detects various gestures and events using the supplied MotionEvents.
GestureDetector.SimpleOnGestureListener A convenience class to extend when you only want to listen for a subset of all the gestures.
Gravity Standard constants and tools for placing an object within a potentially larger container.
HapticFeedbackConstants Constants to be used to perform haptic feedback effects via View#performHapticFeedback(int)
InputDevice Describes the capabilities of a particular input device.
InputDevice.MotionRange Provides information about the range of values for a particular MotionEvent axis.
InputEvent Common base class for input events.
InputQueue An input queue provides a mechanism for an application to receive incoming input events.
KeyboardShortcutGroup A group of KeyboardShortcutInfo.
KeyboardShortcutInfo Information about a Keyboard Shortcut.
KeyCharacterMap Describes the keys provided by a keyboard device and their associated labels.
KeyCharacterMap.KeyData This class was deprecated in API level 11. instead use KeyCharacterMap#getDisplayLabel(int), KeyCharacterMap#getNumber(int) and KeyCharacterMap#get(int, int).
KeyEvent Object used to report key and button events.
- 按键和按钮事件
KeyEvent.DispatcherState Use with KeyEvent#dispatch(Callback, DispatcherState, Object) for more advanced key dispatching, such as long presses.
LayoutInflater Instantiates a layout XML file into its corresponding View objects.
- 实例化一个 layout XML 文件成对应的 View
MenuInflater This class is used to instantiate menu XML files into Menu objects.
MotionEvent Object used to report movement (mouse, pen, finger, trackball) events.
MotionEvent.PointerCoords Transfer object for pointer coordinates.
MotionEvent.PointerProperties Transfer object for pointer properties.
OrientationEventListener Helper class for receiving notifications from the SensorManager when the orientation of the device has changed.
OrientationListener This class was deprecated in API level 3. use OrientationEventListener instead. This class internally uses the OrientationEventListener.
PixelCopy Provides a mechanisms to issue pixel copy requests to allow for copy operations from Surface to Bitmap
PointerIcon Represents an icon that can be used as a mouse pointer.
ScaleGestureDetector Detects scaling transformation gestures using the supplied MotionEvents.
ScaleGestureDetector.SimpleOnScaleGestureListener A convenience class to extend when you only want to listen for a subset of scaling-related events.
SearchEvent Class that contains information about an event that triggers a search.
SoundEffectConstants Constants to be used to play sound effects via View#playSoundEffect(int)
Surface Handle onto a raw buffer that is being managed by the screen compositor.
SurfaceControl Handle to an on-screen Surface managed by the system compositor.
SurfaceControl.Builder Builder class for SurfaceControl objects.
SurfaceControl.Transaction An atomic set of changes to a set of SurfaceControl.
SurfaceControlViewHost Utility class for adding a View hierarchy to a SurfaceControl.
SurfaceControlViewHost.SurfacePackage Package encapsulating a Surface hierarchy which contains interactive view elements.
SurfaceView Provides a dedicated drawing surface embedded inside of a view hierarchy.
TextureView A TextureView can be used to display a content stream.
TouchDelegate Helper class to handle situations where you want a view to have a larger touch area than its actual view bounds.
VelocityTracker Helper for tracking the velocity of touch events, for implementing flinging and other such gestures.
VerifiedInputEvent Base class for verified events.
VerifiedKeyEvent KeyEvent that has been verified by the system.
VerifiedMotionEvent MotionEvent that has been verified by the system.
View This class represents the basic building block for user interface components.
- UI 元素的基本构建块
View.AccessibilityDelegate This class represents a delegate that can be registered in a View to enhance accessibility support via composition rather via inheritance.
View.BaseSavedState Base class for derived classes that want to save and restore their own state in View.onSaveInstanceState().
View.DragShadowBuilder Creates an image that the system displays during the drag and drop operation.
View.MeasureSpec A MeasureSpec encapsulates the layout requirements passed from parent to child.
ViewAnimationUtils Defines common utilities for working with View’s animations.
ViewConfiguration Contains methods to standard constants used in the UI for timeouts, sizes, and distances.
ViewDebug Various debugging/tracing tools related to View and the view hierarchy.
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.
- 可以包含其他 View 的特殊 View。是 layout classes 和 views containers 的基类。
ViewGroup.LayoutParams LayoutParams are used by views to tell their parents how they want to be laid out.
- 告诉父 View ,子 View 怎么布局的
ViewGroup.MarginLayoutParams Per-child layout information for layouts that support margins.
ViewGroupOverlay A group overlay is an extra layer that sits on top of a ViewGroup (the “host view”) which is drawn after all other content in that view (including the view group’s children).
ViewOutlineProvider Interface by which a View builds its Outline, used for shadow casting and clipping.
ViewOverlay An overlay is an extra layer that sits on top of a View (the “host view”) which is drawn after all other content in that view (including children, if the view is a ViewGroup).
ViewPropertyAnimator This class enables automatic and optimized animation of select properties on View objects.
ViewStructure ViewStructure is a container for storing additional per-view data generated by View#onProvideStructure and View#onProvideAutofillStructure.
ViewStructure.HtmlInfo Simplified representation of the HTML properties of a node that represents an HTML element.
ViewStructure.HtmlInfo.Builder Builder for HtmlInfo objects.
ViewStub A ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime.
- 看不见的,大小为0的 View,可用于在运行时懒加载布局资源
ViewTreeObserver A view tree observer is used to register listeners that can be notified of global changes in the view tree.
Window Abstract base class for a top-level window look and behavior policy.
WindowAnimationFrameStats This class contains window animation frame statistics.
WindowContentFrameStats This class contains window content frame statistics.
WindowId Safe identifier for a window.
- window 的安全 ID。
WindowId.FocusObserver Subclass for observing changes to the focus state of an WindowId.
WindowInsets Describes a set of insets for window content.
WindowInsets.Builder Builder for WindowInsets.
WindowInsets.Side Class that defines different sides for insets.
WindowInsets.Type Class that defines different types of sources causing window insets.
WindowInsetsAnimation Class representing an animation of a set of windows that cause insets.
WindowInsetsAnimation.Bounds Class representing the range of an WindowInsetsAnimation
WindowInsetsAnimation.Callback Interface that allows the application to listen to animation events for windows that cause insets.
WindowManager.LayoutParams
WindowMetrics Metrics about a Window, consisting of the size and WindowInsets.

AndroidX

android.paging

AsyncPagedListDiffer Helper object for mapping a PagedList into a RecyclerView.Adapter.
DataSource<Key, Value> Base class for loading pages of snapshot data into a PagedList.
DataSource.Factory<Key, Value> Factory for DataSources.
ItemKeyedDataSource<Key, Value> Incremental data loader for paging keyed content, where loaded content uses previously loaded items as input to future loads.
ItemKeyedDataSource.LoadCallback Callback for ItemKeyedDataSource ItemKeyedDataSource.loadBefore(LoadParams, LoadCallback) and ItemKeyedDataSource.loadAfter(LoadParams, LoadCallback) to return data.
ItemKeyedDataSource.LoadInitialCallback Callback for ItemKeyedDataSource.loadInitial(LoadInitialParams, LoadInitialCallback) to return data and, optionally, position/count information.
ItemKeyedDataSource.LoadInitialParams Holder object for inputs to ItemKeyedDataSource.loadInitial(LoadInitialParams, LoadInitialCallback).
ItemKeyedDataSource.LoadParams Holder object for inputs to ItemKeyedDataSource.loadBefore(LoadParams, LoadCallback) and ItemKeyedDataSource.loadAfter(LoadParams, LoadCallback).
LivePagedListBuilder<Key, Value> Builder for LiveData, given a DataSource.Factory and a PagedList.Config.
PagedList Lazy loading list that pages in immutable content from a DataSource.
- 懒加载 DataSource 中的不可变内容分页成的 List
PagedList.BoundaryCallback Signals when a PagedList has reached the end of available data.
PagedList.Builder<Key, Value> Builder class for PagedList.
- PagedList 的 Builder
PagedList.Callback Callback signaling when content is loaded into the list.
PagedList.Config Configures how a PagedList loads content from its DataSource.
PagedList.Config.Builder Builder class for PagedList.Config.
PagedListAdapter<T, VH extends RecyclerView.ViewHolder> RecyclerView.Adapter base class for presenting paged data from PagedLists in a RecyclerView.
PageKeyedDataSource<Key, Value> Incremental data loader for page-keyed content, where requests return keys for next/previous pages.
PageKeyedDataSource.LoadCallback<Key, Value> Callback for PageKeyedDataSource PageKeyedDataSource.loadBefore(LoadParams, LoadCallback) and PageKeyedDataSource.loadAfter(LoadParams, LoadCallback) to return data.
PageKeyedDataSource.LoadInitialCallback<Key, Value> Callback for PageKeyedDataSource.loadInitial(LoadInitialParams, LoadInitialCallback) to return data and, optionally, position/count information.
PageKeyedDataSource.LoadInitialParams Holder object for inputs to PageKeyedDataSource.loadInitial(LoadInitialParams, LoadInitialCallback).
PageKeyedDataSource.LoadParams Holder object for inputs to PageKeyedDataSource.loadBefore(LoadParams, LoadCallback) and PageKeyedDataSource.loadAfter(LoadParams, LoadCallback).
PositionalDataSource Position-based data loader for a fixed-size, countable data set, supporting fixed-size loads at arbitrary page positions.
PositionalDataSource.LoadInitialCallback Callback for PositionalDataSource.loadInitial(LoadInitialParams, LoadInitialCallback) to return data, position, and count.
PositionalDataSource.LoadInitialParams Holder object for inputs to PositionalDataSource.loadInitial(LoadInitialParams, LoadInitialCallback).
PositionalDataSource.LoadRangeCallback Callback for PositionalDataSource PositionalDataSource.loadRange(LoadRangeParams, LoadRangeCallback) to return data.
PositionalDataSource.LoadRangeParams Holder object for inputs to PositionalDataSource.loadRange(LoadRangeParams, LoadRangeCallback).
RxPagedListBuilder<Key, Value> Builder for Observable or Flowable, given a DataSource.Factory and a PagedList.Config.

Material Components

com.google.android.material.appbar

Classes

AppBarLayout AppBarLayout is a vertical LinearLayout which implements many of the features of material designs app bar concept, namely scrolling gestures.
- 垂直的 LinearLayout ,实现了许多 Material Design 的 app bar 的概念,即滑动手势
AppBarLayout.BaseBehavior<T extends AppBarLayout> The default AppBarLayout.Behavior for AppBarLayout.
-AppBarLayout默认的 Behavior
AppBarLayout.BaseBehavior.BaseDragCallback<T extends AppBarLayout> Callback to allow control over any AppBarLayout dragging.
AppBarLayout.BaseBehavior.SavedState A Parcelable implementation for AppBarLayout.
AppBarLayout.Behavior The default AppBarLayout.Behavior for AppBarLayout.
AppBarLayout.Behavior.DragCallback Callback to allow control over any AppBarLayout dragging.
AppBarLayout.LayoutParams A ViewGroup.LayoutParams implementation for AppBarLayout.
AppBarLayout.ScrollingViewBehavior Behavior which should be used by Views which can scroll vertically and support nested scrolling to automatically scroll any AppBarLayout siblings.
CollapsingToolbarLayout CollapsingToolbarLayout is a wrapper for Toolbar which implements a collapsing app bar.
CollapsingToolbarLayout.LayoutParams
MaterialToolbar MaterialToolbar is a Toolbar that implements certain Material features, such as elevation overlays for Dark Themes.