Nested classes |
class |
AppBarLayout.BaseBehavior.BaseDragCallback<T extends AppBarLayout>
Callback to allow control over any AppBarLayout dragging.
|
class |
AppBarLayout.BaseBehavior.SavedState
A Parcelable implementation for AppBarLayout .
|
Public methods |
int
|
getLeftAndRightOffset()
|
int
|
getTopAndBottomOffset()
|
boolean
|
isHorizontalOffsetEnabled()
|
boolean
|
isVerticalOffsetEnabled()
|
boolean
|
onInterceptTouchEvent(CoordinatorLayout parent, V child, MotionEvent ev)
|
boolean
|
onLayoutChild(CoordinatorLayout parent, V child, int layoutDirection)
|
boolean
|
onLayoutChild(CoordinatorLayout parent, T abl, int layoutDirection)
|
boolean
|
onMeasureChild(CoordinatorLayout parent, T child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed)
|
void
|
onNestedPreScroll(CoordinatorLayout coordinatorLayout, T child, View target, int dx, int dy, int[] consumed, int type)
|
void
|
onNestedScroll(CoordinatorLayout coordinatorLayout, T child, View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type, int[] consumed)
|
void
|
onRestoreInstanceState(CoordinatorLayout parent, T appBarLayout, Parcelable state)
|
Parcelable
|
onSaveInstanceState(CoordinatorLayout parent, T abl)
|
boolean
|
onStartNestedScroll(CoordinatorLayout parent, T child, View directTargetChild, View target, int nestedScrollAxes, int type)
|
void
|
onStopNestedScroll(CoordinatorLayout coordinatorLayout, T abl, View target, int type)
|
boolean
|
onTouchEvent(CoordinatorLayout parent, V child, MotionEvent ev)
|
void
|
setDragCallback(BaseDragCallback callback)
Set a callback to control any AppBarLayout dragging.
|
void
|
setHorizontalOffsetEnabled(boolean horizontalOffsetEnabled)
|
boolean
|
setLeftAndRightOffset(int offset)
|
boolean
|
setTopAndBottomOffset(int offset)
|
void
|
setVerticalOffsetEnabled(boolean verticalOffsetEnabled)
|
Protected methods |
void
|
layoutChild(CoordinatorLayout parent, V child, int layoutDirection)
|
Inherited methods |
From class
androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior
boolean
|
blocksInteractionBelow(CoordinatorLayout arg0, V arg1)
|
boolean
|
getInsetDodgeRect(CoordinatorLayout arg0, V arg1, Rect arg2)
|
int
|
getScrimColor(CoordinatorLayout arg0, V arg1)
|
float
|
getScrimOpacity(CoordinatorLayout arg0, V arg1)
|
static
Object
|
getTag(View arg0)
|
boolean
|
layoutDependsOn(CoordinatorLayout arg0, V arg1, View arg2)
|
WindowInsetsCompat
|
onApplyWindowInsets(CoordinatorLayout arg0, V arg1, WindowInsetsCompat arg2)
|
void
|
onAttachedToLayoutParams(CoordinatorLayout.LayoutParams arg0)
|
boolean
|
onDependentViewChanged(CoordinatorLayout arg0, V arg1, View arg2)
|
void
|
onDependentViewRemoved(CoordinatorLayout arg0, V arg1, View arg2)
|
void
|
onDetachedFromLayoutParams()
|
boolean
|
onInterceptTouchEvent(CoordinatorLayout arg0, V arg1, MotionEvent arg2)
|
boolean
|
onLayoutChild(CoordinatorLayout arg0, V arg1, int arg2)
|
boolean
|
onMeasureChild(CoordinatorLayout arg0, V arg1, int arg2, int arg3, int arg4, int arg5)
|
boolean
|
onNestedFling(CoordinatorLayout arg0, V arg1, View arg2, float arg3, float arg4, boolean arg5)
|
boolean
|
onNestedPreFling(CoordinatorLayout arg0, V arg1, View arg2, float arg3, float arg4)
|
void
|
onNestedPreScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3, int arg4, int[] arg5, int arg6)
|
void
|
onNestedPreScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3, int arg4, int[] arg5)
|
void
|
onNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
|
void
|
onNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int[] arg8)
|
void
|
onNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3, int arg4, int arg5, int arg6)
|
void
|
onNestedScrollAccepted(CoordinatorLayout arg0, V arg1, View arg2, View arg3, int arg4, int arg5)
|
void
|
onNestedScrollAccepted(CoordinatorLayout arg0, V arg1, View arg2, View arg3, int arg4)
|
boolean
|
onRequestChildRectangleOnScreen(CoordinatorLayout arg0, V arg1, Rect arg2, boolean arg3)
|
void
|
onRestoreInstanceState(CoordinatorLayout arg0, V arg1, Parcelable arg2)
|
Parcelable
|
onSaveInstanceState(CoordinatorLayout arg0, V arg1)
|
boolean
|
onStartNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, View arg3, int arg4, int arg5)
|
boolean
|
onStartNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, View arg3, int arg4)
|
void
|
onStopNestedScroll(CoordinatorLayout arg0, V arg1, View arg2, int arg3)
|
void
|
onStopNestedScroll(CoordinatorLayout arg0, V arg1, View arg2)
|
boolean
|
onTouchEvent(CoordinatorLayout arg0, V arg1, MotionEvent arg2)
|
static
void
|
setTag(View arg0, Object arg1)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
BaseBehavior
public BaseBehavior ()
BaseBehavior
public BaseBehavior (Context context,
AttributeSet attrs)
Parameters |
context |
Context |
attrs |
AttributeSet |
Public methods
getLeftAndRightOffset
public int getLeftAndRightOffset ()
getTopAndBottomOffset
public int getTopAndBottomOffset ()
isHorizontalOffsetEnabled
public boolean isHorizontalOffsetEnabled ()
isVerticalOffsetEnabled
public boolean isVerticalOffsetEnabled ()
public boolean onInterceptTouchEvent (CoordinatorLayout parent,
V child,
MotionEvent ev)
Parameters |
parent |
CoordinatorLayout |
child |
V |
ev |
MotionEvent |
public boolean onLayoutChild (CoordinatorLayout parent,
V child,
int layoutDirection)
Parameters |
parent |
CoordinatorLayout |
child |
V |
layoutDirection |
int |
public boolean onLayoutChild (CoordinatorLayout parent,
T abl,
int layoutDirection)
Parameters |
parent |
CoordinatorLayout |
abl |
T |
layoutDirection |
int |
public boolean onMeasureChild (CoordinatorLayout parent,
T child,
int parentWidthMeasureSpec,
int widthUsed,
int parentHeightMeasureSpec,
int heightUsed)
Parameters |
parent |
CoordinatorLayout |
child |
T |
parentWidthMeasureSpec |
int |
widthUsed |
int |
parentHeightMeasureSpec |
int |
heightUsed |
int |
public void onNestedPreScroll (CoordinatorLayout coordinatorLayout,
T child,
View target,
int dx,
int dy,
int[] consumed,
int type)
Parameters |
coordinatorLayout |
CoordinatorLayout |
child |
T |
target |
View |
dx |
int |
dy |
int |
consumed |
int |
type |
int |
public void onNestedScroll (CoordinatorLayout coordinatorLayout,
T child,
View target,
int dxConsumed,
int dyConsumed,
int dxUnconsumed,
int dyUnconsumed,
int type,
int[] consumed)
Parameters |
coordinatorLayout |
CoordinatorLayout |
child |
T |
target |
View |
dxConsumed |
int |
dyConsumed |
int |
dxUnconsumed |
int |
dyUnconsumed |
int |
type |
int |
consumed |
int |
public void onRestoreInstanceState (CoordinatorLayout parent,
T appBarLayout,
Parcelable state)
Parameters |
parent |
CoordinatorLayout |
appBarLayout |
T |
state |
Parcelable |
public Parcelable onSaveInstanceState (CoordinatorLayout parent,
T abl)
Parameters |
parent |
CoordinatorLayout |
abl |
T |
public boolean onStartNestedScroll (CoordinatorLayout parent,
T child,
View directTargetChild,
View target,
int nestedScrollAxes,
int type)
Parameters |
parent |
CoordinatorLayout |
child |
T |
directTargetChild |
View |
target |
View |
nestedScrollAxes |
int |
type |
int |
public void onStopNestedScroll (CoordinatorLayout coordinatorLayout,
T abl,
View target,
int type)
Parameters |
coordinatorLayout |
CoordinatorLayout |
abl |
T |
target |
View |
type |
int |
public boolean onTouchEvent (CoordinatorLayout parent,
V child,
MotionEvent ev)
Parameters |
parent |
CoordinatorLayout |
child |
V |
ev |
MotionEvent |
setDragCallback
public void setDragCallback (BaseDragCallback callback)
Set a callback to control any AppBarLayout
dragging.
Parameters |
callback |
BaseDragCallback : the callback to use, or null to use the default behavior.
|
setHorizontalOffsetEnabled
public void setHorizontalOffsetEnabled (boolean horizontalOffsetEnabled)
Parameters |
horizontalOffsetEnabled |
boolean |
setLeftAndRightOffset
public boolean setLeftAndRightOffset (int offset)
setTopAndBottomOffset
public boolean setTopAndBottomOffset (int offset)
setVerticalOffsetEnabled
public void setVerticalOffsetEnabled (boolean verticalOffsetEnabled)
Parameters |
verticalOffsetEnabled |
boolean |
Protected methods
protected void layoutChild (CoordinatorLayout parent,
V child,
int layoutDirection)
Parameters |
parent |
CoordinatorLayout |
child |
V |
layoutDirection |
int |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2021-02-08 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2021-02-08 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-02-08 UTC."]]