84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如图 外边框是有圆角的,内部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...