其他分享
首页 > 其他分享> > android – 展开并折叠CardView

android – 展开并折叠CardView

作者:互联网

扩展CardView的正确方法是什么?

example

解决方法:

Use an expandable list view with cardview

甚至

You can use wrap content as height of cardview and use
textview inside it below title, so on click make the textview visible
and vice-versa.

但是设计不是很糟糕吗?

nope it isn’t if you give some transition or animation when it’s expanded
or collapsed

If you want to see some default transition then just write android:animateLayoutChanges=”true” in parent layout.

标签:android,android-cardview
来源: https://codeday.me/bug/20191003/1850632.html