前文:

桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 2

导航:

桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The End 导航页及收尾工作

二、构建登录注册界面

1.构建UI界面

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"><VideoViewandroid:id="@+id/video_background"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_alignParentStart="true"android:layout_alignParentTop="true"android:layout_alignParentEnd="true"android:layout_alignParentBottom="true"android:alpha="1"tools:layout_editor_absoluteX="0dp"tools:layout_editor_absoluteY="0dp" /><androidx.constraintlayout.widget.Guidelineandroid:id="@+id/guideline2"android:layout_width="wrap_content"android:layout_height="wrap_content"android:orientation="horizontal"app:layout_constraintGuide_percent="0.3" /><EditTextandroid:id="@+id/editTextTextPassword"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="280dp"android:alpha="255"android:ems="8"android:hint="@string/Password"android:inputType="textPassword"android:shadowColor="@color/transparent"android:textColor="@color/teal_200"android:textColorHighlight="@color/transparent"android:textColorHint="@color/teal_200"android:textColorLink="@color/transparent"android:textSize="24sp"app:layout_constraintBottom_toBottomOf="@+id/video_background"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintStart_toStartOf="parent"app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName5"app:layout_constraintVertical_bias="0.259" /><EditTextandroid:id="@+id/editTextTextPersonName5"android:layout_width="wrap_content"android:layout_height="wrap_content"android:alpha="10000"android:ems="8"android:hint="@string/Username"android:inputType="textPersonName"android:shadowColor="@color/transparent"android:textAlignment="viewStart"android:textColor="@color/teal_200"android:textColorHighlight="@color/transparent"android:textColorHint="@color/teal_200"android:textColorLink="@color/transparent"android:textSize="24sp"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintStart_toStartOf="parent"app:layout_constraintTop_toTopOf="@+id/guideline2"app:layout_constraintVertical_bias="0.0" /><ImageButtonandroid:id="@+id/imageButton"android:layout_width="60dp"android:layout_height="51dp"android:backgroundTint="#00FFFFFF"android:contentDescription="@string/TODO"android:tint="@color/teal_200"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintHorizontal_bias="0.0"app:layout_constraintStart_toEndOf="@+id/editTextTextPassword"app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName5"app:layout_constraintVertical_bias="0.096"app:srcCompat="@drawable/ic_baseline_visibility_24" /><TextViewandroid:id="@+id/textView"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="16dp"android:text="@string/textview"app:layout_constraintBottom_toBottomOf="@+id/video_background"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintStart_toStartOf="parent" /><Buttonandroid:id="@+id/button"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="280dp"android:backgroundTint="#00FFFFFF"android:shadowColor="#00BCD4"android:text="@string/button"android:textColor="@color/teal_200"android:textColorHighlight="@color/teal_200"android:textColorHint="@color/teal_200"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintHorizontal_bias="0.333"app:layout_constraintStart_toEndOf="@+id/button2"app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword"app:layout_constraintVertical_bias="0.0" /><Buttonandroid:id="@+id/button2"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="280dp"android:backgroundTint="#00FFFFFF"android:shadowColor="#00BCD4"android:text="@string/Contact"android:textColor="@color/teal_200"android:textColorHighlight="@color/teal_200"android:textColorHint="@color/teal_200"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintHorizontal_bias="0.291"app:layout_constraintStart_toStartOf="parent"app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword"app:layout_constraintVertical_bias="0.0" /><ImageButtonandroid:id="@+id/imageButton4"android:layout_width="64dp"android:layout_height="60dp"android:backgroundTint="#00FFFFFF"android:contentDescription="@string/TODO"android:minHeight="48dp"android:tint="@color/teal_200"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintHorizontal_bias="0.498"app:layout_constraintStart_toStartOf="parent"app:layout_constraintTop_toTopOf="parent"app:layout_constraintVertical_bias="0.702"app:srcCompat="@drawable/ic_baseline_login_24" /></androidx.constraintlayout.widget.ConstraintLayout>

其中的drawable都为android studio自带的矢量图。

分别为:

@drawable/ic_baseline_visibility_24
@drawable/ic_baseline_login_24

附上矢量图添加方法

在此处附上strings.xml和colors.xml(部分没有用到,懒得删了)

strings.xml

<resources><string name="app_name">Peach Dictionary</string><string name="Username">Username</string><string name="TODO" translatable="false">todo</string><string name="Password">Password</string><string name="textview">Beta1.0.0</string><string name="checkbox">Keep</string><string name="button">Register</string><string name="textview1">Start to register!</string><string name="RePassword">Reconfirm</string><string name="textview2">Welcome to the Peach Dictionary!</string><string name="search">Search</string><!-- TODO: Remove or change this placeholder text --><string name="hello_blank_fragment">Hello blank fragment</string><string name="Contact">Contact</string><string name="title_activity_button_nav">ButtonNav</string><string name="title_home">Home</string><string name="title_dashboard">Dashboard</string><string name="title_notifications">Notifications</string><string name="blank" /><string name="setting">Setting</string><string name="Cancel">Cacel the account</string><string name="Focusmode">Focus Mode</string><string name="time">Time</string>
</resources>

colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources><color name="purple_200">#FFBB86FC</color><color name="purple_500">#FF6200EE</color><color name="purple_700">#FF3700B3</color><color name="teal_200">#FF03DAC5</color><color name="teal_700">#FF018786</color><color name="black">#FF000000</color><color name="white">#FFFFFFFF</color><color name="transparent">#00F44336</color>
</resources>

此时,UI界面搭建完成。

实现:

桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 3相关推荐

  1. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 4

    前文: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 3 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The E ...

  2. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 7

    前文: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 6 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The E ...

  3. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 8

    前文: ​​​​​​桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 7 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 ...

  4. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The End 导航页及收尾工作

    导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 1 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 2 桃词 ...

  5. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 1

    前言 由于笔者操作不当,将项目搞崩了,所以打算重写一遍,记下开发过程,作为学习记录.此软件能实现最普通的单词查询功能,也有启动动画.登录注册之类的功能,但笔者目前能力有限,未能将其完善,这是初学阶段的 ...

  6. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 9

    前文: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 8 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The E ...

  7. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 5

    前文: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 4 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The E ...

  8. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 6

    前文: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 5 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The E ...

  9. 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 2

    前文:  桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 Part 1 导航: 桃词典 Peach Dictionary 简易英语词典app开发 安卓软件开发 The ...

最新文章

  1. golang的GUI库,使用go-fyne设计一个代办事项APP
  2. Redis三种集群模式介绍
  3. CPU主频频率越高,手机运行速度就越快吗?
  4. 【转】在C#中使用SQLite
  5. 如何在IE浏览器播放RTSP或RTMP流
  6. Docker logs 命令——查看docker容器日志
  7. 汽车语音控制是什么意思 汽车语音控制怎么用
  8. 授权windows客户端用户连接Linux mysql命令
  9. PKI/CA工作原理及架构
  10. linux如何安装github下载的东西,Linux如何安装使用GitHub
  11. 金牛判势 精品起涨预警 主升浪起爆点指标 通达信绝对精准买点指标选股公式
  12. C++:动态规划DP;
  13. mongodb仲裁者_真理的仲裁者
  14. Discuz! 6.x/7.x 全局变量防御绕过导致命令执行
  15. FaceX-Zoo: A PyTocrh Toolbox for Face Recognition
  16. APP测试点总结(全面)
  17. c语言0x前缀的作用,有趣的问题,C语言程序中,为什么十六进制数字以前缀0x开头呢?...
  18. Java实现图片渲染((拖动)马赛克、黑白照、油画风格等)
  19. 基于标定板的手眼标定
  20. 模拟电子技术-模拟集成电路

热门文章

  1. 【DB宝14】在Docker中只需2步即可拥有Oracle 11g企业版环境(11.2.0.4)
  2. MFC在两控件间画线
  3. Oracle创建HR示例模式
  4. preceding-sibling::*[1]
  5. c#获取百度服务器时间
  6. 三极管 vs MOS管 | PMOS与NMOS
  7. 将多个csv文件合并成一个
  8. 全球与中国玻璃通孔中介层市场深度研究分析报告
  9. 人心惶惶:利用新西兰特大枪击案进行网络钓鱼攻击的前因后果
  10. BIM模型文件下载——三层江湖别墅