文章目录

  • 用到的基础控件及布局
  • 效果图

用到的基础控件及布局

控件:TextView、EditText、Button、ImageView
布局:LinearLayout

  • 奉上源码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="wrap_content"xmlns:tools="http://schemas.android.com/tools"android:orientation="vertical"tools:context=".MainActivity"android:padding="20dp"><TextViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:text="欢迎使用本登录界面"android:layout_marginTop="50dp"android:layout_marginLeft="70dp"android:textColor="@color/purple_500"android:textSize="25dp"></TextView><EditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="请输入账号"android:layout_marginTop="20dp"></EditText><EditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="请输入密码"android:layout_marginTop="20dp"></EditText><Buttonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_weight="1"android:text="登录"android:layout_marginTop="16dp"android:layout_marginLeft="140dp"/><ImageViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:scaleType="centerCrop"android:background="@drawable/img02"></ImageView></LinearLayout><!--orientation:横向/纵向--><!--默认情况为 horizontal 横向此处布局使用 vertival:垂直/纵向-->

注意:要用到的图片放在自己选择的工程下(此处放在了 …/res/drawable 下)

效果图





Android Studio 简单的登陆界面实现(含源码)相关推荐

  1. 人脸识别4:Android InsightFace实现人脸识别Face Recognition(含源码)

    人脸识别4:Android InsightFace实现人脸识别Face Recognition(含源码) 目录 人脸识别4:Android InsightFace实现人脸识别Face Recognit ...

  2. 戴眼镜检测和识别3:Android实现戴眼镜检测和识别(含源码,可实时检测)

    Android实现戴眼镜检测和识别(含源码,可实时检测) 目录 Android实现戴眼镜检测和识别(含源码,可实时检测) 1.戴眼镜检测和识别方法 2.戴眼镜人脸检测 3.戴眼镜识别模型训练 4.戴眼 ...

  3. android studio添加按钮界面,2.3 使用Android Studio 简单设计UI界面

    首先 创建一个新的项目找到app 文件目录下的layout的 activity_main.xml 因为Android Studio 是可视化的,所有操作都可以在图形界面进行. 该res 界面当中  d ...

  4. 基于android的旅游攻略应用(含源码)

    最近做了一个android应用--深圳旅游攻略,界面做的比较清新.简洁,功能简单,可以看下上传的图片. 貌似源码传不了,需要的话我另外传给你. 另外,可以在android手机上在安卓市场或者安智市场搜 ...

  5. Android移动应用开发课程设计(含源码)

    这是一个较为简单理解的Android项目,是一个关于医学小知识的APP,运用了Fragment控件和RecyclerView控件,使用Android自带的MySQLite数据库实现数据存储(也可以通过 ...

  6. 【错误记录】Android Studio 中查看 Gradle 配置的方法源码 ( 配置 gradle-wrapper.properties 中版本为 gradle-x.x.x-all.zip )

    文章目录 一.报错信息 二.解决方案 Android Plugin DSL Reference 参考文档 : https://google.github.io/android-gradle-dsl/2 ...

  7. 【CMake】CMake 引入 ( Android Studio 创建 Native C++ 工程 | C/C++ 源码编译过程 | Makefile 工具 | CMake 引入 )

    文章目录 一.在 Android Studio 中创建 Native C++ 工程 二.C/C++ 源码编译过程 三.Makefile 工具 四.CMake 引入 该系列博客的应用场景是 Androi ...

  8. Qt5.4.1 局域网tcp文件传输工具带界面(含源码下载)

    目录 1.程序设计 2.程序效果 服务端 客户端 3.代码设计 服务端 客户端 4.实验可改进的地方: 点击下载例程源码  1.程序设计 在同一局域网内的两个设备,基于tcp网络编程,实现可靠的.高速 ...

  9. 不翻qiang搞定Android Studio Google库加载不下来的问题 打包生成apk android studio 3.2打灰机程序源码带详细注释

    1.Google库加载不下来的问题 其实我们可以给dl.google.com设置个代理,然后库都能正常加载下来了.步骤如下: 打开站长工具网站,http://ping.chinaz.com/dl.go ...

  10. Java实现拼图小游戏(5)—— 美化界面(含源码阅读)

    美化界面 一.前言 二.添加背景图 1.注意事项 2.创建图片对象 3.创建JLabel的对象(一个用来放图片的容器) 4.调整位置 5.将容器放到界面中 6.优化代码 三.添加边框 1.查看源码 2 ...

最新文章

  1. FreeMarker中的list集合前后台代码
  2. 国务院发文!这些专业,将被撤销!
  3. 如何在两个目录中删除其中一个目录中同名文件
  4. Kubernetes:全面了解 Deployment
  5. 揭秘2019双11背后的云网络 – 双11网络架构和洛神系统
  6. 关于MacBook Pro 15 usb连接iPhone反复重连的解决办法
  7. C# list 多条件排序
  8. FPGA--(verilog)一个完整工程的设计(包含设计块和激励块)及仿真
  9. css3导航渐变 滑过显示动画
  10. 为什么我们程序员难晋升
  11. ios:uibutton 中title 和image 共存那点事
  12. PForDelta的介绍论文
  13. python程序设计简明教程第二版答案_Python简明教程精编.pdf
  14. Linux 软件安装与卸载
  15. gxworks2使用指令手册_三菱编程软件 GX Works2 操作手册简单工程篇中文高清版
  16. wsimport 直接处理wsdl接口
  17. 最全ListView扩展的实例和补充
  18. Kali Linux破解wifi密码教程(无须外置网卡)
  19. nginx做反向代理和后端web服务器之间的交互
  20. SLIC超像素分割的算法介绍和源码分析

热门文章

  1. 面试官问现在工资是多少,该怎么回答?
  2. UART接口基本知识
  3. 【代码笔记】iOS-账号,密码记住
  4. POJ1915(Knight Moves)
  5. php 所有国家时区,php输出全球各个时区列表
  6. linux apache安全,基于Linux平台的Web安全技术研究——Apache安全.doc
  7. Python图像处理](2)---图像融合、加法运算及图像类型转换、图像缩放、图像旋转、图像翻转与图像平移
  8. Spring支持的常用数据库事务传播属性和事务隔离级别
  9. win10命令行查看显卡驱动版本_Win10更新显卡驱动提示尝试重启GeForce Experience的解决方法...
  10. xpath返回结果是否有值_【自学C#】|| 笔记 41 DataReader:读取查询结果