带分隔符的 Android GridView [英] Android GridView with Separator

查看:21
本文介绍了带分隔符的 Android GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 GridView 的元素之间使用分隔符?

is possible to have a separator between elements of a GridView?

谢谢

推荐答案

您可能不得不使用填充和背景颜色.将表格的背景设置为一种颜色,并将表格中每个视图的背景设置为另一种颜色.在表格中的每个 View 周围设置 1 或 2 个像素的内边距,您之间应该有一个边框.

You'll probably have to play with padding and background colors. Set the background for the table to one color, and the background to each View in the table to another color. Set a 1 or 2 pixel padding around each View in the table, and you should have a border between.

这篇关于带分隔符的 Android GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆