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

移动应用的界面配置-手机银行APP

  • 设置登录界面为线性布局,组件垂直居中排列
  • 设置主页为滚动模式,包括布局、添加背景图片
  • 设置按钮样式,包括形状、边框线的宽度和颜色

设置登录界面

设置界面为线性布局,组件垂直居中排列

--android:gravity="center_vertical" 这个的意思是指 限定它里面的内容要垂直居中显示。
--android:layout_gravity="center_vertical",这个是指它的位置是相对于它父亲的垂直居中。
<LinearLayout 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"tools:context=".MainActivity"android:orientation="vertical"android:background="@drawable/back"android:gravity="center_vertical"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="欢迎进入手机银行"android:textColor="#000079"android:layout_marginBottom="70dp"android:textSize="35dp"/>
</LinearLayout>

设置主页为滚动模式

<RelativeLayout 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/zhuye"tools:context=".LendActivity"android:id="@+id/parent">
<!-- 设置表格布局的宽度为铺满,高度为自适应(随组件的高度自动调整),
排列方式为垂直排列 --><TableLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"></TableLayout>
</RelativeLayout>

设置按钮样式

<?xml version="1.0" encoding="utf-8"?>
<!--相当于做了一张圆角的图片,然后给button作为背景图片-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><!--设置圆角--><corners android:radius="105dip" /><solid android:color="#E0E0E0"></solid><paddingandroid:bottom="3dp"android:left="5dp"android:right="5dp"android:top="5dp"/><!--设置边框线的宽度和颜色-->
</shape>
<Buttonandroid:id="@+id/btn"android:layout_width="wrap_content"android:layout_height="wrap_content"android:background="@xml/btn"android:text="登录"android:layout_weight="1"android:layout_marginRight="30dp"android:layout_marginBottom="10dp"></Button>

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

相关文章:

  • 微服务nginx解析部署使用全流程
  • 华硕天选笔记本外接音箱没有声音
  • Unity中Socket_TCP异步连接,加入断线检测以及重连功能
  • Android build子系统(01)Ninja构建系统解读
  • 徐老师的吉祥数
  • 使用html写一个能发起请求的登录界面
  • 五子棋双人对战项目(2)——登录模块
  • 几种操作系统和几种cpu
  • [Cocoa]_[初级]_[使用NSNotificationCenter作为目标观察者实现时需要注意的事项]
  • 彩虹易支付最新版源码及安装教程(修复BUG+新增加订单投诉功能)
  • ping香港服务器超时的原因通常有哪些?
  • 书生大模型实战(从入门到进阶)L3-彩蛋岛-InternLM 1.8B 模型 Android 端侧部署实践
  • setState是同步更新还是异步更新
  • TCP 流量控制 - 滑动窗口和拥塞控制算法解析
  • MongoDB聚合操作及索引底层原理
  • C++ | Leetcode C++题解之第454题四数相加II
  • 【从零开始实现stm32无刷电机FOC】【实践】【7.2/7 完整代码编写】
  • 谷歌收录查询工具,谷歌收录查询工具的使用指南
  • vue3 拖拽插件(drag)
  • 数据结构--线性表(顺序结构)
  • 面试准备111
  • Spring 的 IOC 和 AOP 是什么,有哪些优点?解密 Spring两大核心概念:IOC与AOP的魅力所在
  • 第二百六十四节 JPA教程 - JPA查询日期参数示例
  • Spring MVC的运行流程详解
  • 判断有向图是否为单连通图的算法
  • php与python建站的区别有哪些
  • 模型评估与验证:确保模型在未知数据上的表现----示例:使用K折交叉验证评估分类模型、房价预测问题使用K折交叉验证来评估一个线性回归模型的性能
  • awd基础学习
  • C#基于SkiaSharp实现印章管理(10)
  • 通过栈实现字符串中查找是否有指定字符串的存在