<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dp">
........
</LinearLayout>
我想让一个项目在点击时变成全屏,但过渡只是从列表中增加了元素:
view.setOnClickListener {
TransitionManager.beginDelayedTransition(it as ViewGroup)
it.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
it.requestLayout()
}
如何实现全屏缩放并占据屏幕作为独立元素,无需回收再循环视图?