relativelayout设置边框_Android表格布局之设置边框
Android表格布局本身没有边框,不过可以通过背景色的设置可以实现表格边框的显示。
首先可以设置TableRow的背景色,然后设置内容的背景色。根据它们的颜色差就出现了边框。只要微调Content与TableRow的margin和pading属性就可以了!
调的过程真是烦人!下次不做这种工作了~呜呜!难受!
贴上布局代码:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white" >
android:id="@+id/table1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:padding="6.5dip" >
android:background="@color/jiemianbiankuang"
android:orientation="horizontal"
android:paddingLeft="0.5dip"
android:paddingRight="0.5dip"
android:paddingTop="1dip" >
android:id="@+id/imageViewMSG"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:contentDescription="@string/messagecenter"
android:src="@drawable/msg" />
android:id="@+id/imageView1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:src="@drawable/book" />
android:id="@+id/imageView2"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:src="@drawable/maozi" />
android:background="@color/jiemianbiankuang"
android:orientation="horizontal"
android:paddingLeft="0.5dip"
android:paddingRight="0.5dip"
android:paddingTop="0dip" >
android:id="@+id/imageView4"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:src="@drawable/earth" />
android:id="@+id/imageView5"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:src="@drawable/unno" />
android:id="@+id/imageView6"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="0.5dip"
android:layout_marginLeft="0.5dip"
android:background="@color/white"
android:src="@drawable/zuoye" />
界面效果图
Android表格布局(Table Layout)
Android表格布局(Table Layout) 先来看布局管理器之间继承关系图: 图1 可知TableLayout继承了LinearLayout,所以表格布局本质上依然是线性管理器. 表格布局采用 ...
Android 表格布局<;TableLayout>;
表格布局即,tableLayout,表格布局通过行.列的形式来管理UI组件,TablelLayout并不需要明确地声明包含多少行.多少列,而是通过TableRow,以及其他组件来控制表格的行数和列数, ...
[android] 表格布局和绝对布局
/*****************2016年4月28日 更新*************************************/ 知乎:为什么Android没有像iOS一样提供autolay ...
Android 表格布局 TableLayout
属性介绍 stretchColumns:列被拉伸 shrinkColumns:列被收缩 collapseColumns:列被隐藏 举例测试
android横屏布局文件设置
一.AndroidManifest.xml配置 1.在AndroidManifest.xml的activity(需要禁止转向的activity)配置中加入 android:screenOrient ...
android动态设置边框颜色
relativelayout设置边框_Android表格布局之设置边框相关推荐
- html表格虚线外边框,html表格虚线怎么设置
HTML如何在表格与表格之间加虚线,我已经border设单元格之间加虚线么?border不要设置为零,给个dashed样式就可以了,举个栗子 TEST table{margin:100px;borde ...
- html表格怎么设置浮动,html – 表格布局和浮动左和引导网格
我已经研究过这个问题,但没有得到令人满意的答案.我正在使用bootstrap的网格布局. 请查看Fiddle here并调整输出窗口的大小 – 在调整大小时,您可能已经注意到当寡妇大小足以添加col- ...
- android html 显示表格边框,tablelayout表格布局详解
如果你已经下载好MT4软件(很多专业外汇平台都有提供下载的),在手机桌面找到图表打开,然后选择好交易商,输入账号密码就可以了. TableLayout怎样实现表格布局 表格布局的子对象不能指定 lay ...
- android虚线边框_Android实现代码画虚线边框背景效果
实现如下边框效果: 虚线画效果,可以使用Android中的xml来做.下面话不多说,直接上代码: android:id="@+id/coupon_popup" android:la ...
- 安卓-表格布局 及 边框颜色设置
卓-表格布局 及 边框 原创 2015年08月19日 19:08:37 1768 [html] view plain copy <LinearLayout xmlns:android=&q ...
- 如何修改控件边框的样式_Excel如何设置表格边框样式,记住这几个关键属性就懂了...
Excel表格边框的设置,对于制作一个漂亮的工作表,十分有用. 由于审美的差异,我们通常做的表格都是以黑色边框白底为主,或者说,有些人根本不知道除了黑白表格还有带颜色的. 如何设置表格边框属性呢,下面 ...
- 计算机考试中如何设置表格外边框,Excel表格中怎么为单元格区域设置边框
在Excel表格工作表中,我们可以为选中的单元格区域设置各种类型的边框.Excel表格中为单元格区域设置边框的方法其实很简单,下面由学习啦小编告诉你! Excel表格中为单元格区域设置边框的方法 01 ...
- CSS设置原生table表格边框样式(添加表格横线)(附最后表格td画斜线)
table表格边框样式: 推荐这种 原理: 只对table td设置左与上边框: 对table设置右与下边框: <style> .table-c table{border-right:1p ...
- CSS如何设置html table表格边框样式
CSS如何设置table表格边框样式 对table设置css样式边框,分为几种情况: 1.只对table设置边框 2.对td设置边框 3.对table和td技巧性设置表格边框 4.对table和td设 ...
最新文章
- 案例 | 河小象:智办事高效驱动组织升级
- spring包镜像下载地址
- mysql数据库---授权语句以及备份
- 使用 MTR 诊断网络问题
- onvif规范的实现:成功实现ONVIF协议RTSP-Video-Stream与OnvifDeviceManager的视频对接
- 行星齿轮设计手册_合理选用行星齿轮传动装置的侧隙
- c语言和gtk实现的游戏,Ubuntu下用glade和GTK+开发C语言界面程序(一)
- NOIP2016普及组第四题——魔法阵
- git合并多个commit成为一个commit
- Java黑皮书课后题第2章:2.3(将英尺转化为米)编写程序,读入英尺数,将其转换为米数并显示结果。1英尺等于0.305米
- 转: vim 的编辑格式设置
- pytorch保存和加载模型state_dict
- HTML+CSS+JS实现月球上行走的宇航员网页设计
- vue传递数组对象_详解vue组件三大核心概念
- cmake make
- Windows server 2016远程桌面登录和修改3389端口
- python界面开发webview_Python+Appium学习篇之WebView处理
- Exception in Tkinter callback
- TDirectory.GetParent获取指定目录的父目录
- 优化理论17----wolfe_Powell准则、Wo1fe-Powell搜索法
热门文章
- MySQL的char与varchar:类型长度 记录字节 截取报错 保存trim 数据校验 存储占用
- Linux负载均衡Nginx六种策略
- PHP的上传文件思路及其代码
- 非计算机专业的学生,简谈非计算机专业的计算机教育
- 2008matlab error 95,VS2008和MATLAB2010b混合编程有关问题 error LINK2028 恳请指教!(2)
- HTTP常用头部信息
- php 本地mysql 代码_基于本地数据库的 IP 地址查询 PHP 源码
- 【nginx】return 301 302 重定向URL
- 【若依(ruoyi)】table定制列宽
- zookeeper启动占用8080端口