inboxrecyclerview / me.saket.inboxrecyclerview.page / StandaloneExpandablePageLayout

StandaloneExpandablePageLayout

class StandaloneExpandablePageLayout : ExpandablePageLayout

Standalone because this page can live without an InboxRecyclerView.

Constructors

<init>

StandaloneExpandablePageLayout(context: Context, attrs: AttributeSet? = null)

Standalone because this page can live without an InboxRecyclerView.

Inherited Properties

currentState

lateinit var currentState: PageState

isCollapsed

val isCollapsed: Boolean

isCollapsedOrCollapsing

val isCollapsedOrCollapsing: Boolean

isCollapsing

val isCollapsing: Boolean

isExpanded

val isExpanded: Boolean

isExpandedOrExpanding

val isExpandedOrExpanding: Boolean

isExpanding

val isExpanding: Boolean

isExpandingOrCollapsing

val isExpandingOrCollapsing: Boolean

parentToolbar

var parentToolbar: View?

pullToCollapseEnabled

var pullToCollapseEnabled: Boolean

pullToCollapseInterceptor

var pullToCollapseInterceptor: OnPullToCollapseInterceptor

pullToCollapseListener

val pullToCollapseListener: PullToCollapseListener

pullToCollapseThresholdDistance

var pullToCollapseThresholdDistance: Int

Minimum Y-distance the page has to be pulled before it's eligible for collapse.

Functions

onLayout

fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int): Unit

Inherited Functions

addOnPullListener

fun addOnPullListener(listener: OnPullListener): Unit

Listener that gets called when this page is being pulled.

addStateChangeCallbacks

fun addStateChangeCallbacks(callbacks: PageStateChangeCallbacks): Unit

dispatchTouchEvent

open fun dispatchTouchEvent(ev: MotionEvent): Boolean

draw

open fun draw(canvas: Canvas): Unit

drawChild

open fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean

hasOverlappingRendering

open fun hasOverlappingRendering(): Boolean

onAttachedToWindow

open fun onAttachedToWindow(): Unit

onDetachedFromWindow

open fun onDetachedFromWindow(): Unit

onInterceptTouchEvent

open fun onInterceptTouchEvent(event: MotionEvent): Boolean

onPageAboutToCollapse

open fun onPageAboutToCollapse(collapseAnimDuration: Long): Unit

onPageAboutToExpand

open fun onPageAboutToExpand(expandAnimDuration: Long): Unit

onPageCollapsed

open fun onPageCollapsed(): Unit

Page is totally invisible to the user when this is called.

onPageExpanded

open fun onPageExpanded(): Unit

onPull

open fun onPull(deltaY: Float, currentTranslationY: Float, upwardPull: Boolean, deltaUpwardPull: Boolean, collapseEligible: Boolean): Unit

Called when the user is pulling down / up the expandable page or the list.

onRelease

open fun onRelease(collapseEligible: Boolean): Unit

Called when the user's finger is lifted.

onTouchEvent

open fun onTouchEvent(event: MotionEvent): Boolean

pushParentToolbarOnExpand

fun pushParentToolbarOnExpand(toolbar: Toolbar): Unit

Push toolbar out of the screen during expansion when this page reaches the bottom of the toolbar. When this page is collapsing or being pulled downwards. the toolbar will be animated back to its position.

removeOnPullListener

fun removeOnPullListener(pullListener: OnPullListener): Unit

removeStateChangeCallbacks

fun removeStateChangeCallbacks(callbacks: PageStateChangeCallbacks): Unit

setNestedExpandablePage

fun setNestedExpandablePage(nestedPage: ExpandablePageLayout): Unit

Experimental: To be used when another ExpandablePageLayout is shown inside this page. This page will avoid all draw calls while the nested page is open to minimize overdraw.

Extension Functions

executeOnMeasure

fun View.executeOnMeasure(listener: () -> Unit): Unit

Execute a runnable when a view's dimensions get measured and is laid out on the screen.

executeOnNextLayout

fun View.executeOnNextLayout(listener: () -> Unit): Unit

Execute a runnable when the next global layout happens for a View. Example usage includes waiting for a list to draw its children just after you have updated its adapter's data-set.

globalVisibleRect

fun View.globalVisibleRect(): RectF