java.lang.Object | ||
↳ | androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior<V extends android.view.View> | |
↳ | com.sap.cloud.mobile.fiori.maps.SideSheetBehavior<V extends android.view.View> |
Adapted from BottomSheetBehavior
, supports
STATE_EXPANDED
and STATE_COLLAPSED
states, can be used to show/hide side
sheet on tablet landscape mode.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | SideSheetBehavior.OnStateChangeListener | Callback interface used to notify the application that the view has been dismissed. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | STATE_COLLAPSED | View collapsed with only handle visible | |||||||||
int | STATE_DRAGGING | A view is currently being dragged. | |||||||||
int | STATE_EXPANDED | View expanded | |||||||||
int | STATE_SETTLING | A view is currently settling into place as a result of a fling or predefined non-interactive motion. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SideSheetBehavior() | |||||||||||
SideSheetBehavior(Context context, AttributeSet attrs) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static <V extends View> SideSheetBehavior<V> |
from(V view)
A utility function to get the
SideSheetBehavior associated with the view . | ||||||||||
int |
getExpandedWidth()
Returns the expanded width
| ||||||||||
int |
getPeekWidth()
The peek width when the sheet is collapsed
| ||||||||||
int |
getState()
Retrieve the current drag state of this behavior.
| ||||||||||
void | onAttachedToLayoutParams(CoordinatorLayout.LayoutParams layoutParams) | ||||||||||
void | onDetachedFromLayoutParams() | ||||||||||
boolean | onInterceptTouchEvent(CoordinatorLayout parent, V child, MotionEvent event) | ||||||||||
boolean | onLayoutChild(CoordinatorLayout parent, V child, int layoutDirection) | ||||||||||
boolean | onTouchEvent(CoordinatorLayout parent, V child, MotionEvent event) | ||||||||||
void |
setExpandedWidth(int expandedWidth)
Sets the expanded width
| ||||||||||
void |
setListener(SideSheetBehavior.OnStateChangeListener listener)
Set the listener to be used when a dismiss event occurs.
| ||||||||||
void |
setPeekWidth(int peekWidth)
Sets the peek width when the sheet is collapsed
| ||||||||||
void |
setSensitivity(float sensitivity)
Set the sensitivity used for detecting the start of a swipe.
| ||||||||||
final void |
setState(int state)
Sets the state of the side sheet.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
View collapsed with only handle visible
A view is currently being dragged. The position is currently changing as a result of user input or simulated user input.
View expanded
A view is currently settling into place as a result of a fling or predefined non-interactive motion.
A utility function to get the SideSheetBehavior
associated with the view
.
view | The View with SideSheetBehavior . |
---|
SideSheetBehavior
associated with the view
.
Returns the expanded width
The peek width when the sheet is collapsed
Retrieve the current drag state of this behavior. This will return one of STATE_COLLAPSED
,
STATE_EXPANDED
, STATE_DRAGGING
or STATE_SETTLING
.
Sets the expanded width
Set the listener to be used when a dismiss event occurs.
listener | the listener to use. |
---|
Sets the peek width when the sheet is collapsed
Set the sensitivity used for detecting the start of a swipe. This only takes effect if no touch handling has occured yet.
sensitivity | Multiplier for how sensitive we should be about detecting the start of a drag. Larger values are more sensitive. 1.0f is normal. |
---|
Sets the state of the side sheet. The side sheet will transition to that state with animation.
state | One of STATE_COLLAPSED , or STATE_EXPANDED . Other states are
used internally.
|
---|