第一阶段团队冲刺第二天
今天进行界面的设计,主要也是对登录界面的设计,对编辑框进行美化,对按钮进行样式的优化。
实现这些需要在控件的background属性中加入代表样式的xml,在drawable中新建xml,然后对控件的样式进行美化和修改。
对于整体的布局,我使用的Linearlayout,在我的感觉里这样编写出来的界面还是比较层次清晰的。
布局代码如下:
<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"
android:orientation="vertical"
android:background="@drawable/bag_2"
tools:context=".">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="280dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
<LinearLayout
android:layout_weight="2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/zced"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="还没有?点我注册"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp">
</LinearLayout>
<EditText
android:id="@+id/DLID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_editview"
android:gravity="center"
android:hint="输入账号"
android:inputType="number"
android:maxLength="6"
android:padding="8dp"
android:textColorHint="@color/white"
android:textSize="16sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="20dp"></LinearLayout>
<EditText
android:id="@+id/DLPA"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_editview"
android:gravity="center"
android:hint="输入密码"
android:inputType="textPassword"
android:maxLength="16"
android:padding="8dp"
android:textColorHint="@color/white"
android:textSize="16sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/dlbt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@animator/btn_nor_down"
android:text="登录"
/>
</LinearLayout>
</LinearLayout>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具