android - 如何实现这样效果的GridView?
ringa_lee
ringa_lee 2017-04-17 17:33:15
0
6
784

如图 外边框是有圆角的,内部item有分割线,而且是直角的。

ringa_lee
ringa_lee

ringa_lee

reply all(6)
迷茫

It is recommended to use the RecyclerView,外面的样式可以自定义drawable设置background,至于里面的item分割线,可以使用RecyclerViewaddItemDecoration() 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...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!