vesp
08/21/2020, 8:35 PMView.kt
which calls getLayoutParams
and setLayoutParams
inline fun View.updateLayoutParams(block: ViewGroup.LayoutParams.() -> Unit) {
updateLayoutParams<ViewGroup.LayoutParams>(block)
}
After utilizing this in a recyclerview to expand the size of an item's viewgroup's height with a pinch gesture, it only seemed to increase the height by adding to the bottom of the itemview.
Which leads me to two questions:
• Are there extension functions for views that would allow me to add height split between the top and bottom of the view?
• Are there extension function for Views that are able to measure visibility of an viewholder? There's functions in RecyclerView.LayoutManager to check for that but what would the extension function look like when using that updateLayoutParams and that visibility function in tandem.