如图 外边框是有圆角的,内部item有分割线,而且是直角的。
ringa_lee
It is recommended to use the RecyclerView,外面的样式可以自定义drawable设置background,至于里面的item分割线,可以使用RecyclerView的addItemDecoration() method to achieve this.
RecyclerView
drawable
background
item
addItemDecoration()
Use a selector to set the background externallyThen set the vertical spacing and horizontal spacing, and use the transparent part as the dividing line
In the adapter’s getView(), replace the background for different position values
Owner, has the effect been achieved? Please answer
The table uses recyclerview, and the background of recyclerview uses cardview
I wrote two blogs on how to use RecyclerView+CardView, you can take a look http://liompei.com/2016/07/20...
It is recommended to use the
RecyclerView
,外面的样式可以自定义drawable
设置background
,至于里面的item
分割线,可以使用RecyclerView
的addItemDecoration()
method to achieve this.Use a selector to set the background externally
Then set the vertical spacing and horizontal spacing, and use the transparent part as the dividing line
In the adapter’s getView(), replace the background for different position values
Owner, has the effect been achieved? Please answer
The table uses recyclerview, and the background of recyclerview uses cardview
I wrote two blogs on how to use RecyclerView+CardView, you can take a look http://liompei.com/2016/07/20...