Skip to content

Most visited

Recently visited

navigation
added in version 22.0.0

android.support.v4.view

Support android.util classes to assist with development of applications for android API level 4 or later. The main features here are a variety of classes for handling backwards compatibility with views (for example MotionEventCompat allows retrieving multi-touch data if available), and a new ViewPager widget (which at some point should be moved over to the widget package).

Annotations

ViewPager.DecorView Annotation which allows marking of views to be decoration views when added to a view pager. 

Interfaces

ActionProvider.VisibilityListener Listens to changes in visibility as reported by refreshVisibility()
AsyncLayoutInflater.OnInflateFinishedListener  
LayoutInflaterFactory This interface was deprecated in API level 26.0.0. Use LayoutInflater.Factory2 directly.  
MenuItemCompat.OnActionExpandListener This interface was deprecated in API level 26.0.0. Use MenuItem.OnActionExpandListener directly.  
NestedScrollingChild This interface should be implemented by View subclasses that wish to support dispatching nested scrolling operations to a cooperating parent ViewGroup
NestedScrollingChild2 This interface should be implemented by View subclasses that wish to support dispatching nested scrolling operations to a cooperating parent ViewGroup
NestedScrollingParent This interface should be implemented by ViewGroup subclasses that wish to support scrolling operations delegated by a nested child view. 
NestedScrollingParent2 This interface should be implemented by ViewGroup subclasses that wish to support scrolling operations delegated by a nested child view. 
OnApplyWindowInsetsListener Listener for applying window insets on a view in a custom way. 
ScrollingView An interface that can be implemented by Views to provide scroll related APIs. 
TintableBackgroundView Interface which allows a View to receive background tinting calls from ViewCompat when running on API v20 devices or lower. 
ViewPager.OnAdapterChangeListener Callback interface for responding to adapter changes. 
ViewPager.OnPageChangeListener Callback interface for responding to changing state of the selected page. 
ViewPager.PageTransformer A PageTransformer is invoked whenever a visible/attached page is scrolled. 
ViewPropertyAnimatorListener

An animation listener receives notifications from an animation. 

ViewPropertyAnimatorUpdateListener Implementors of this interface can add themselves as update listeners to an ViewPropertyAnimatorCompat instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that ViewPropertyAnimatorCompat

Classes

AbsSavedState A Parcelable implementation that should be used by inheritance hierarchies to ensure the state of all classes along the chain is saved. 
AccessibilityDelegateCompat Helper for accessing View.AccessibilityDelegate
ActionProvider This class is a mediator for accomplishing a given task, for example sharing a file. 
AsyncLayoutInflater

Helper class for inflating layouts asynchronously. 

GestureDetectorCompat Detects various gestures and events using the supplied MotionEvents. 
GravityCompat Compatibility shim for accessing newer functionality from Gravity
InputDeviceCompat Helper class for accessing values in InputDevice
KeyEventCompat This class was deprecated in API level 26.0.0. Use KeyEvent directly.  
LayoutInflaterCompat Helper for accessing features in LayoutInflater
MarginLayoutParamsCompat Helper for accessing API features in MarginLayoutParams in a backwards compatible way. 
MenuCompat Helper for accessing features in Menu
MenuItemCompat Helper for accessing features in MenuItem
MotionEventCompat Helper for accessing features in MotionEvent
NestedScrollingChildHelper Helper class for implementing nested scrolling child views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21). 
NestedScrollingParentHelper Helper class for implementing nested scrolling parent views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21). 
PagerAdapter Base class providing the adapter to populate pages inside of a ViewPager
PagerTabStrip PagerTabStrip is an interactive indicator of the current, next, and previous pages of a ViewPager
PagerTitleStrip PagerTitleStrip is a non-interactive indicator of the current, next, and previous pages of a ViewPager
PointerIconCompat Helper for accessing features in PointerIcon in a backwards compatible fashion. 
ScaleGestureDetectorCompat Helper for accessing features in ScaleGestureDetector
VelocityTrackerCompat This class was deprecated in API level 26.0.0. Use VelocityTracker directly.  
ViewCompat Helper for accessing features in View
ViewConfigurationCompat This class was deprecated in API level 26.0.0. Use ViewConfiguration directly.  
ViewGroupCompat Helper for accessing features in ViewGroup
ViewPager Layout manager that allows the user to flip left and right through pages of data. 
ViewPager.LayoutParams Layout parameters that should be supplied for views added to a ViewPager. 
ViewPager.SavedState This is the persistent state that is saved by ViewPager. 
ViewPager.SimpleOnPageChangeListener Simple implementation of the ViewPager.OnPageChangeListener interface with stub implementations of each method. 
ViewParentCompat Helper for accessing features in ViewParent
ViewPropertyAnimatorCompat  
ViewPropertyAnimatorListenerAdapter This adapter class provides empty implementations of the methods from ViewPropertyAnimatorListener
WindowCompat Helper for accessing features in Window
WindowInsetsCompat Describes a set of insets for window content. 
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.