效果

     

代码

     拖控件出来的,这里贴上xml代码

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@drawable/background"android:gravity="center"android:orientation="vertical"tools:context=".MainActivity"><TableRowandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:background="@drawable/blockbg_big"android:gravity="center"android:orientation="horizontal"><TextViewandroid:id="@+id/textView"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_weight="0"android:text="2021年01月19日 11:53"android:textSize="16sp" /></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:background="@drawable/blockbg_big"android:gravity="center"android:orientation="horizontal"><ImageViewandroid:id="@+id/imageView"android:layout_width="150px"android:layout_height="150px"app:srcCompat="@drawable/img01" /><ImageViewandroid:id="@+id/imageView2"android:layout_width="150px"android:layout_height="150px"android:layout_marginLeft="50px"android:layout_marginRight="50px"app:srcCompat="@drawable/img02" /><ImageViewandroid:id="@+id/imageView3"android:layout_width="150px"android:layout_height="150px"app:srcCompat="@drawable/img03a" /></LinearLayout></TableRow><TableRowandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:layout_weight="1"android:background="@drawable/blockbg_big"android:gravity="center"android:orientation="horizontal"><ImageViewandroid:id="@+id/imageView4"android:layout_width="150px"android:layout_height="150px"android:layout_weight="0"app:srcCompat="@drawable/img04" /><ImageViewandroid:id="@+id/imageView5"android:layout_width="150px"android:layout_height="150px"android:layout_marginLeft="50px"android:layout_marginRight="50px"android:layout_weight="0"app:srcCompat="@drawable/img05" /><ImageViewandroid:id="@+id/imageView6"android:layout_width="150px"android:layout_height="150px"android:layout_weight="0"app:srcCompat="@drawable/img06" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:layout_weight="1"android:background="@drawable/blockbg_big"android:gravity="center"android:orientation="horizontal"><ImageViewandroid:id="@+id/imageView7"android:layout_width="150px"android:layout_height="150px"android:layout_marginRight="50px"android:layout_weight="0"app:srcCompat="@drawable/img07" /><TextViewandroid:id="@+id/textView2"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_weight="0"android:text="转到音乐"android:textSize="16sp" /></LinearLayout></TableRow><TableRowandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:background="@drawable/blockbg_big"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center_vertical"android:orientation="horizontal"><ImageViewandroid:id="@+id/imageView8"android:layout_width="150px"android:layout_height="150px"android:layout_marginLeft="50px"android:layout_marginRight="50px"android:layout_weight="0"app:srcCompat="@drawable/email" /><TextViewandroid:id="@+id/textView3"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_weight="0"android:text="电子邮件"android:textSize="16sp" /></LinearLayout></TableRow>
</TableLayout>

关注

笔者 - jxd

微信公众号搜索 “码农总动员” 或 微信扫描下方二维码,了解更多你不知道的XX,O(∩_∩)O

Android Studio —— TableLayout相关推荐

  1. android studio 微信登录界面,如何使用Android Studio开发用户登录界面

    满意答案 zhou9081 2016.05.21 采纳率:51%    等级:7 已帮助:411人 如何使用Android Studio开发用户登录界面,具体解决方案如下: 解决方案1: <:t ...

  2. Android studio设计app登录界面

    Android studio设计app登录界面 UI界面设计 在设计登录界面时,可以使用不同布局方式来实现该功能,通常情况下使用的是LinearLayout(线性布局)和TableLayout(表格布 ...

  3. Android Studio学习开发笔记--基础

    关于进阶项目篇,点击这里 文章目录 前言 构建首个应用 运行 第一次可能会出现的问题 想要重新下载安装Android Studio 文件在哪里编辑 android基础--控件 基础属性 带阴影的Tex ...

  4. 《Android移动应用基础教程》(Android Studio)(第二版)黑马程序员 课后习题答案

    <Android移动应用基础教程>(Android Studio)(第二版)黑马程序员 课后习题答案 目录 第1章 Android基础入门 第2章 Android常见界面布局 第3章 An ...

  5. Android Studio:线性布局

    目录 一.导入新课 二.新课讲解 (一)界面与布局 1.界面 2.布局 (1)视图层次结构图 (3)UI控件 (Control) (4)两种方式声明布局 (二)线性布局 1.继承关系图 2.常用属性 ...

  6. Android Studio 2.2 正式起航

    原文地址:http://blog.csdn.net/xiaole0313/article/details/52621766 转载请注明出处:http://blog.csdn.net/xiaole031 ...

  7. 基于 SQLite 开发Android studio 的记账APP

    使用Android studio版本:3.2  JDK版本: jdk1.8.0_151 华为 mate s 测试不显示Log.d()部分手机解决方法 https://blog.csdn.net/Hor ...

  8. 安卓学习布局篇 Android studio(二)

    TableLayout布局(表格布局) 常见属性 android:collapseColumns,设置需要被隐藏的列的序号,从0开始 android:stretchColumns 设置允许被拉伸的列的 ...

  9. Android Studio Notes/学习笔记

    学习视频来源:https://www.bilibili.com/video/BV1jW411375J?from=search&seid=16068849106535436916 文章目录 小知 ...

最新文章

  1. R和Python谁更好?这次让你「鱼与熊掌」兼得
  2. Nginx源码分析:惊群处理与负载均衡
  3. 从3D人脸到自动驾驶,CVPR2020十个顶级开源数据集
  4. 返回后通知(After Return Advice)
  5. java面试四 运算符测试
  6. github使用总结
  7. 【白皮书分享】站外种草白皮书.pdf(附下载链接)
  8. api-gateway实践(01)服务网关 - 原型功能
  9. 二叉链表存储的二叉C语言,C语言实现二叉链表存储
  10. vue2.x中slot-scope插槽在vue3.x中的新写法
  11. 动画效果html5,HTML5动画效果
  12. css3 实现十字光标和光标外圆圈环绕
  13. 后端技术交流群,邀你加入
  14. 报错解决:urllib3.exceptions.MaxRetryError
  15. win10系统修改hosts文件无法保存
  16. 邢台计算机编程培训学校,邢台有几家计算机培训中心
  17. JavaScript、js文件、Node.js、静态文件
  18. ActionScript,Flash,Flash/Flex Builder,FlashPlayer,AIR,swf,swc,swz之间的区别
  19. 超级仓库管理系统---(1)概述
  20. 编译安装和极速安装的区别

热门文章

  1. hjm家族信托科技研究报告
  2. 【建议收藏】面试官会问的位运算奇淫技巧
  3. 数据中心建筑设计的好帮手——BIM
  4. python第五天 程序设计方法学
  5. 网秦通过亚马逊云科技进行全球应用的快速部署
  6. (二)打地鼠游戏的设计与实现
  7. EndNote笔记(一)——导入文献
  8. 【打卡第258道】【字符串】【leetCode高频】:8. 字符串转换整数 (atoi)
  9. Drupal8 社区文档之主题文件夹结构
  10. 使用redis 加锁的方式生成订单号