GridView加分隔线,最简单的方式实现网格
2015-10-22 14:12
375 查看
实现方式:
<GridView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/mwhite" android:cacheColorHint="@android:color/transparent" android:numColumns="3"/>
item.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#CCC2CF" android:orientation="vertical" android:padding="1px"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/mwhite" android:padding="@dimen/dp_20"> <TextView android:id="@+id/im_tv_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:drawableTop="@drawable/ic_launcher" android:gravity="center" /> </RelativeLayout> </LinearLayout>
也可以使用Selector给item加上方格线,不过如果需求简单,不需要那么麻烦。
相关文章推荐
- C#中GridView动态添加列的实现方法
- Gridview用法大总结(全程图解珍藏版)
- C#使用RenderControl将GridView控件导出到EXCEL的方法
- asp.net gridview中用checkbox全选的几种实现的区别
- GridView使用学习总结
- asp.net 设置GridView的选中行
- 让GridView只显示特定用户的数据的方法
- GridView单元格合并
- C#导出GridView数据到Excel文件类实例
- C#与SQL连接:GridView控件对数据库的操作
- ASP.NET中为GridView添加删除提示框的方法
- 在ASP.NET 2.0中操作数据之十二:在GridView控件中使用TemplateField
- 如何用jQuery实现ASP.NET GridView折叠伸展效果
- JQuery的ajax基础上的超强GridView展示
- asp.net gridview指定某一列滚动
- datalist,Repeater和Gridview的区别分析
- js获取GridView中行数据的两种方法 分享
- asp.net gridview强制换行
- asp.net GridView中超链接的使用(带参数)
- ASP.NET―001:GridView绑定List、页面返回值具体实现