当前位置: 首页 > news >正文

安卓网格布局GridLayout

 

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:columnCount="2"android:rowCount="2"><TextViewandroid:layout_width="0dp"android:layout_height="60dp"android:layout_columnWeight="1"android:background="#ffcccc"android:gravity="center"android:text="浅红色"android:textColor="#000000"android:textSize="17sp"/><TextViewandroid:layout_width="0dp"android:layout_height="60dp"android:layout_columnWeight="1"android:background="#ffaa00"android:gravity="center"android:text="橙色"android:textColor="#000000"android:textSize="17sp"/><TextViewandroid:layout_width="0dp"android:layout_height="60dp"android:layout_columnWeight="1"android:background="#00ff00"android:gravity="center"android:text="绿色"android:textColor="#000000"android:textSize="17sp"/><TextViewandroid:layout_width="0dp"android:layout_height="60dp"android:layout_columnWeight="1"android:background="#660066"android:gravity="center"android:text="深紫色"android:textColor="#000000"android:textSize="17sp"/></GridLayout>

http://www.lryc.cn/news/292672.html

相关文章:

  • DHCP简介
  • Hadoop生态系统中一些关键组件的详细解析
  • 功能强大的开源数据中台系统 DataCap 2024.01.1 发布
  • Redis的bitmap使用不当,我内存爆了
  • 基于python的新闻爬虫
  • C#基础题
  • AI大语言模型学习笔记之三:协同深度学习的黑魔法 - GPU与Transformer模型
  • c++阶梯之auto关键字与范围for
  • 第八篇:node模版引擎Handlebars及他的高级用法(动态参数)
  • css3 属性 backface-visibility 的实践应用
  • 嵌入式学习第十七天
  • 使用Python的Turtle模块简单绘制烟花效果
  • 数学建模-退火算法和遗传算法
  • Qt开源版 vs 商业版 详细比较!!!!
  • 华为云CodeArts Snap荣获信通院优秀大模型案例及两项荣誉证书
  • 小程序的应用、页面、组件生命周期(超全版)
  • TCP四次握手
  • EBC金融英国CEO:高波动性周期下,如何寻找市场的稳定性?
  • C++ Web 编程
  • docker笔记整理
  • 什么是git,怎样下载安装?
  • Camille-学习笔记-测试流程和测试设计
  • 【Python笔记-设计模式】建造者模式
  • 【LVGL源码移植】
  • 双非本科准备秋招(14.2)—— 进程与线程
  • 数据结构和算法笔记5:堆和优先队列
  • 第8章 SpringBoot任务管理
  • Qt5 基于OpenGL实现六轴机械臂三维仿真
  • 路由进阶
  • 分类预测 | Matlab实现SCN-Adaboost随机配置网络模型SCN的Adaboost数据分类预测/故障识别