Android Studio登录界面

本文介绍如何使用Android Studio创建登录界面。作者分享了初次接触Android Studio的学习体验,包括遇到的技术难点,如选择合适的UI组件。代码示例中,作者通过注释解释了一些关键点,特别是颜色的自定义方式,不同于以往直接设置颜色的做法。
摘要由CSDN通过智能技术生成

Android Studio登录界面

今天跟大家来分享一个用Android Studio来写的一个登录界面。Android Studio也是我刚刚接触的一种技术,刚开始接触的它的时候,我是有很多不懂的,因为它跟我以前学的还是有很多不同的,不管是它的写法,还是它的技术点,或是它里面的一些类的应用,跟我以前学的都是不一样的,开始的时候很不习惯,就是搞个文本框都不知道应该用哪个标签来写才好,慢慢地跟着老师一步步的来学,现在虽然说还是有不明白的,但是多少还是知道了些知识点的。下面就一起来看看用Android Studio来搭建的登录界面,有一些我在学的过程中我以前没见过的,怕忘记是怎么用的,是什么意思的,我会写个注释在旁边,这样子回头看,我也就知道这个什么意思,应该怎么用了,好了不说废话了,一起看代码吧。
1、 登录界面的代码:

<?xml version="1.0" encoding="utf-8"?>
<!--线性布局 rootLayout 根布局-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@color/colorWhite">
    <!--android:orientation 指定线性布局的方向-->
    <!--占位-->
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"/>

    <!-- 表单布局 -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:orientation="vertical">

        <!--match_parent 适应整个页面-->
        <!--wrap_content 适应内容-->
        <!-- 手机号 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/bg_layout_border"
            android:orientation="horizontal">

       
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值