open class ExpandablePageLayout : BaseExpandablePageLayout, PullToCollapseListener.OnPullListener
An expandable / collapsible layout for use with a InboxRecyclerView.
enum class PageState |
ExpandablePageLayout(context: Context, attrs: AttributeSet? = null)
An expandable / collapsible layout for use with a InboxRecyclerView. |
lateinit var currentState: ExpandablePageLayout.PageState |
|
val isCollapsed: Boolean |
|
val isCollapsedOrCollapsing: Boolean |
|
val isCollapsing: Boolean |
|
val isExpanded: Boolean |
|
val isExpandedOrExpanding: Boolean |
|
val isExpanding: Boolean |
|
val isExpandingOrCollapsing: Boolean |
|
var pullToCollapseEnabled: Boolean |
|
var pullToCollapseInterceptor: OnPullToCollapseInterceptor? |
|
val pullToCollapseListener: PullToCollapseListener |
|
var pullToCollapseThresholdDistance: Int
Minimum Y-distance the page has to be pulled before it's eligible for collapse. |
var animationDurationMillis: Long |
|
var animationInterpolator: TimeInterpolator |
fun addOnPullListener(listener: PullToCollapseListener.OnPullListener): Unit
Listener that gets called when this page is being pulled. |
|
fun addStateChangeCallbacks(callbacks: PageStateChangeCallbacks): Unit |
|
open fun dispatchTouchEvent(ev: MotionEvent): Boolean |
|
open fun draw(canvas: Canvas): Unit |
|
open fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean |
|
open fun hasOverlappingRendering(): Boolean |
|
fun locationOnScreen(): IntArray |
|
open fun onAttachedToWindow(): Unit |
|
open fun onDetachedFromWindow(): Unit |
|
open fun onInterceptTouchEvent(event: MotionEvent): Boolean |
|
open fun onPageAboutToCollapse(collapseAnimDuration: Long): Unit |
|
open fun onPageAboutToExpand(expandAnimDuration: Long): Unit |
|
open fun onPageCollapsed(): Unit
Page is totally invisible to the user when this is called. |
|
open fun onPageExpanded(): Unit |
|
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. |
|
open fun onRelease(collapseEligible: Boolean): Unit
Called when the user's finger is lifted. |
|
open fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int): Unit |
|
open fun onTouchEvent(event: MotionEvent): Boolean |
|
fun pushParentToolbarOnExpand(toolbar: View): 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. |
|
fun removeOnPullListener(pullListener: PullToCollapseListener.OnPullListener): Unit |
|
fun removeStateChangeCallbacks(callbacks: PageStateChangeCallbacks): Unit |
|
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. |
fun animateDimensions(toWidth: Int, toHeight: Int): Unit |
|
fun resetClipping(): Unit
Immediately reset the clipping so that this layout is fully visible. |
|
fun setClippedDimensions(newClippedWidth: Int, newClippedHeight: Int): Unit |
fun View.executeOnMeasure(listener: () -> Unit): Unit
Execute a runnable when a view's dimensions get measured and is laid out on the screen. |
|
fun View.executeOnNextLayout(listener: () -> Unit): Unit
Execute a runnable when the next global layout happens for a |
|
fun View.globalVisibleRect(): RectF |
|
fun View.locationOnScreen(loc: IntArray): Rect |
class StandaloneExpandablePageLayout : ExpandablePageLayout
Standalone because this page can live without an InboxRecyclerView. |