android 05 桢布局:FrameLayout 网格布据 GridLayout
2024-08-26 15:44:58
xml文件:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"> <ImageView
android:layout_width="128dp"
android:layout_height="128dp"
android:src="@drawable/p03"/> 图片
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/p02"/>
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/p01"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textColor="#000"
android:text="查看图片"
android:layout_gravity="bottom|center_horizontal"/>
</FrameLayout>
网格布局:GridLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="5" 跨列
android:orientation="horizontal" > <TextView android:text="用户名" /> <EditText
android:layout_columnSpan="4" 跨行
android:layout_gravity="fill_horizontal"
android:hint="2-10个字符" /> <TextView android:text="密 码" /> <EditText
android:layout_columnSpan="4"
android:layout_gravity="fill_horizontal"
android:hint="2-10个字符" />
</GridLayout> <GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="5"
android:orientation="horizontal"
android:layout_marginTop="20dp"> <Button
android:text="不"
android:visibility="invisible" /> <Button
android:background="@drawable/btn_bg"
android:drawableLeft="@drawable/login32x32"
android:text="登陆"
android:textColor="#fff"/> <Button
android:text="不"
android:visibility="invisible" /> <Button
android:background="@drawable/btn_bg"
android:drawableLeft="@drawable/exit32x32"
android:text="退出"
android:textColor="#fff"/> <Button
android:text="不"
android:visibility="invisible"
/>
</GridLayout> </LinearLayout>
最新文章
- arcgis软件集合
- linux下解压war格式的包
- python 异常类型
- php大力力 [014节] 八杆子打不着的非技术文章,哈哈
- fasterflect-vs-hyperdescriptor-vs-fastmember-vs-reflection/
- zend studio-如何更改字符集
- PHP session 跨子域问题总结
- weiapi 获取项目根目录
- sublime text 3 ctrl+b浏览器启动html
- Springboot中关于跨域问题的一种解决方法
- 流程控制:顺序结构: 代码默认从上到下依次执行 分支结构: 细分在分为如下 循环结构: while .. for ..
- FireDac 同时连接SQLserver2000时出现 Connection is busy with results for another command
- getattribute
- LeetCode OJ 102. Binary Tree Level Order Traversal
- TCP/IP协议---ARP协议
- CF939D Love Rescue 并查集
- onkeydown事件
- 在CentOS上以源码编译的方式安装Greenplum数据库
- 收集整理的mybatis资料
- shell编程学习笔记之sed编辑器