Stay organized with collections
Save and categorize content based on your preferences.
AppBarLayout.BaseBehavior.BaseDragCallback
public
static
abstract
class
AppBarLayout.BaseBehavior.BaseDragCallback
extends Object
Callback to allow control over any AppBarLayout
dragging.
Summary
Public methods |
abstract
boolean
|
canDrag(T appBarLayout)
Allows control over whether the given AppBarLayout can be dragged or not.
|
Inherited methods |
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
BaseDragCallback
public BaseDragCallback ()
Public methods
canDrag
public abstract boolean canDrag (T appBarLayout)
Allows control over whether the given AppBarLayout
can be dragged or not.
Dragging is defined as a direct touch on the AppBarLayout with movement. This call does
not affect any nested scrolling.
Parameters |
appBarLayout |
T |
Returns |
boolean |
true if we are in a position to scroll the AppBarLayout via a drag, false if not.
|
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 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AppBarLayout.BaseBehavior.BaseDragCallback\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nAppBarLayout.BaseBehavior.BaseDragCallback\n==========================================\n\n\n`\npublic\nstatic\n\nabstract\nclass\nAppBarLayout.BaseBehavior.BaseDragCallback\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.google.android.material.appbar.AppBarLayout.BaseBehavior.BaseDragCallback\\\u003cT extends [com.google.android.material.appbar.AppBarLayout](/reference/com/google/android/material/appbar/AppBarLayout)\\\u003e |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known direct subclasses [AppBarLayout.Behavior.DragCallback](/reference/com/google/android/material/appbar/AppBarLayout.Behavior.DragCallback) |------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | [AppBarLayout.Behavior.DragCallback](/reference/com/google/android/material/appbar/AppBarLayout.Behavior.DragCallback) | Callback to allow control over any [AppBarLayout](/reference/com/google/android/material/appbar/AppBarLayout) dragging. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback to allow control over any [AppBarLayout](/reference/com/google/android/material/appbar/AppBarLayout) dragging.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[BaseDragCallback](/reference/com/google/android/material/appbar/AppBarLayout.BaseBehavior.BaseDragCallback#BaseDragCallback())`() ` |\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[canDrag](/reference/com/google/android/material/appbar/AppBarLayout.BaseBehavior.BaseDragCallback#canDrag(T))`(T appBarLayout) ` Allows control over whether the given [AppBarLayout](/reference/com/google/android/material/appbar/AppBarLayout) can be dragged or not. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` 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() ` | ||\n\nPublic constructors\n-------------------\n\n### BaseDragCallback\n\n```\npublic BaseDragCallback ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### canDrag\n\n```\npublic abstract boolean canDrag (T appBarLayout)\n```\n\nAllows control over whether the given [AppBarLayout](/reference/com/google/android/material/appbar/AppBarLayout) can be dragged or not.\n\nDragging is defined as a direct touch on the AppBarLayout with movement. This call does\nnot affect any nested scrolling.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|------------|\n| `appBarLayout` | `T` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|------------------------------------------------------------------------------------------|\n| `boolean` | true if we are in a position to scroll the AppBarLayout via a drag, false if not. \u003cbr /\u003e |"]]