Android仿QQ登录界面示例,实现登录、注册功能。

在 Android Studio 中创建一个简单的 QQ 登录界面 接下来,选择 "Phone and Tablet" 作为您的设备类型,然后选择 "Empty Activity" 作为您的 Activity 模板。ImageView 元素具有一个名为 "src" 的属性,用于指定应用程序将显示的图像。在此示例中,我们将 "src" 属性设置为名为 "qq_logo" 的 drawable 资源。打开 "res" 文件夹下的 "layout" 文件夹,找到名为 "activity_main.xml" 的文件。添加两个 EditText 元素,用于输入用户名和密码。 阅读详情
首语

欢迎大家关注我的公众号:八归少年

微信公众号优先更新文章。扫描上面二维码即可关注!一起进步,一同成长。

Android开发经常用到注册、登录功能,于是便整理出一般通用的登录界面,并实现其相应功能。供读者参阅。此项目包含三个活动,即登录,注册界面,找回密码。

GitHub源码地址:LoginTest
界面
下面是对代码的分析过程。

首先是登录界面 activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<!--登录界面,用LinearLayout-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@mipmap/bg"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="35dp">

        <ImageView
            android:id="@+id/symbol"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            />

        <TextView
            android:layout_marginLeft="20dp"
            android:id="@+id/qq"
            android:layout_width="wrap_content"
            android:layout_marginTop="35dp"
            android:text="仿QQ"
            android:textSize="24sp"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <!--输入框-->
    <EditText
        android:id="@+id/et_user_name"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="60dp"
        android:hint="账号"
        android:textSize="20sp" />
    <!--输入框-->
    <EditText
        android:id="@+id/et_psw"
        android:layout_width="320dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="10dp"
        android:hint="密码"
        android:textSize="20sp"
        android:inputType="textPassword"/>
    <!--按钮-->
    <Button
        android:id="@+id/btn_login"
        android:text="登录"
        android:background="#1E90FF"
        android:textSize="24sp"
        android:layout_gravity="center"
        android:layout_marginTop="20dp"
        android:layout_width="320dp"
        android:layout_height="wrap_content"/>
 
    <RelativeLayout
        android:layout_marginTop="15dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/tv_register"
            android:layout_alignParentRight="true"
            android:layout_marginRight="20dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="新用户注册"/>
        <!--layout_weight="1" layout_width="0dp"实现均分效果-->
        <TextView
            android:id="@+id/tv_find_psw"
            android:layout_alignParentLeft="true"
            android:layout_marginLeft="20dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="忘记密码?" />
   </RelativeLayout>
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <RelativeLayout
            android:layout_gravity="center"
            android:layout_marginBottom="30dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">

            <TextView
                android:layout_alignParentBottom="true"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="登录即代表阅读并同意服务条款" />
        </RelativeLayout>
    </LinearLayout>
</LinearLayout>

对应的就是登录活动 MainActivity:

public class MainActivity extends AppCompatActivity {
    private String userName,psw,spPsw;//获取的用户名,密码,加密密码
    private EditText et_user_name,et_psw;//编辑框
    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //设置此界面为竖屏
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        init();
    }
    //获取界面控件
    private void init() {
        //从main_title_bar中获取的id
        //从activity_login.xml中获取的
        TextView tv_register = (TextView) findViewById(R.id.tv_register);
        TextView tv_find_psw = (TextView) findViewById(R.id.tv_find_psw);
        Button btn_login = (Button) findViewById(R.id.btn_login);
        et_user_name= (EditText) findViewById(R.id.et_user_name);
        et_psw= (EditText) findViewById(R.id.et_psw);
        //立即注册控件的点击事件
        tv_register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //为了跳转到注册界面,并实现注册功能
                Intent intent=new Intent(MainActivity.this,RegisterActivity.class);
                startActivityForResult(intent, 1);
            }
        });
        //找回密码控件的点击事件
        tv_find_psw.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               startActivity(new Intent(MainActivity.this,LostFindActivity.class));
            }
        });
        //登录按钮的点击事件
        btn_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //开始登录,获取用户名和密码 getText().toString().trim();
                userName = et_user_name.getText().toString().trim();
                psw = et_psw.getText().toString().trim();
                //对当前用户输入的密码进行MD5加密再进行比对判断, MD5Utils.md5( ); psw 进行加密判断是否一致
                String md5Psw = MD5Utils.md5(psw);
                // md5Psw ; spPsw 为 根据从SharedPreferences中用户名读取密码
                // 定义方法 readPsw为了读取用户名,得到密码
                spPsw = readPsw(userName);
                // TextUtils.isEmpty
                if (TextUtils.isEmpty(userName)) {
                    Toast.makeText(MainActivity.this, "请输入用户名", Toast.LENGTH_SHORT).show();
                } else if (TextUtils.isEmpty(psw)) {
                    Toast.makeText(MainActivity.this, "请输入密码", Toast.LENGTH_SHORT).show();
                    // md5Psw.equals(); 判断,输入的密码加密后,是否与保存在SharedPreferences中一致
                } else if (md5Psw.equals(spPsw)) {
                    //一致登录成功
                    Toast.makeText(MainActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
         //保存登录状态,在界面保存登录的用户名 定义个方法 saveLoginStatus boolean 状态 , userName 用户名;
                    saveLoginStatus(true, userName);
                    //登录成功后关闭此页面进入主页
                    Intent data = new Intent();
                    //datad.putExtra( ); name , value ;
                    data.putExtra("isLogin", true);
                    //RESULT_OK为Activity系统常量,状态码为-1
       // 表示此页面下的内容操作成功将data返回到上一页面,如果是用back返回过去的则不存在用setResult传递data值
                    setResult(RESULT_OK, data);
                    //销毁登录界面
                    MainActivity.this.finish();
                    //跳转到主界面,登录成功的状态传递到 MainActivity 中
                    startActivity(new Intent(MainActivity.this, ItemActivity.class));
                } else if ((spPsw != null && !TextUtils.isEmpty(spPsw) && !md5Psw.equals(spPsw))) {
                    Toast.makeText(MainActivity.this, "输入的用户名和密码不一致", Toast.LENGTH_SHORT).show();
                } else {
                    Toast.makeText(MainActivity.this, "此用户名不存在", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
    /**
     *从SharedPreferences中根据用户名读取密码
     */
    private String readPsw(String userName){
        //getSharedPreferences("loginInfo",MODE_PRIVATE);
        //"loginInfo",mode_private; MODE_PRIVATE表示可以继续写入
        SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
        //sp.getString() userName, "";
        return sp.getString(userName , "");
    }
    /**
     *保存登录状态和登录用户名到SharedPreferences中
     */
    private void saveLoginStatus(boolean status,String userName){
              //loginInfo表示文件名  SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
        SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
        //获取编辑器
        SharedPreferences.Editor editor=sp.edit();
        //存入boolean类型的登录状态
        editor.putBoolean("isLogin", status);
        //存入登录状态时的用户名
        editor.putString("loginUserName", userName);
        //提交修改
        editor.apply();
    }
    /**
     * 注册成功的数据返回至此
     * @param requestCode 请求码
     * @param resultCode 结果码
     * @param data 数据
     */
    @Override
    //显示数据, onActivityResult
    //startActivityForResult(intent, 1); 从注册界面中获取数据
    //int requestCode , int resultCode , Intent data
    // LoginActivity -> startActivityForResult -> onActivityResult();
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        //super.onActivityResult(requestCode, resultCode, data);
        super.onActivityResult(requestCode, resultCode, data);
        if(data!=null){
            //是获取注册界面回传过来的用户名
            // getExtra().getString("***");
            String userName=data.getStringExtra("userName");
            if(!TextUtils.isEmpty(userName)){
                //设置用户名到 et_user_name 控件
                et_user_name.setText(userName);
                //et_user_name控件的setSelection()方法来设置光标位置
                et_user_name.setSelection(userName.length());
            }
        }
    }
}

接下来是注册界面 activity_register.xml

<?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="match_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="@color/colorPrimary"
        android:gravity="center_vertical">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="注册"
            android:textSize="30sp"/>

    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:background="@drawable/shap"
        android:orientation="vertical" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:gravity="center_vertical"
            android:orientation="horizontal" >
            <EditText
                android:id="@+id/et_user_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:paddingTop="2dp"
                android:paddingBottom="2dp"
                android:paddingLeft="6dp"
                android:hint="账号"
                android:singleLine="true"
                android:maxLength="15"
                android:background="#ffffff"
                android:textSize="18sp" />
        </LinearLayout>


        <LinearLayout
            android:background="@drawable/shap"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:gravity="center_vertical"
            android:orientation="horizontal" >
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:paddingTop="2dp"
                android:paddingBottom="2dp"
                android:paddingLeft="6dp"
                android:singleLine="true"
                android:hint="请输入密码"
                android:inputType="textPassword"
                android:maxLength="15"
                android:background="#ffffff"
                android:id="@+id/et_psw"
                android:textSize="18sp" />
        </LinearLayout>

        <LinearLayout
            android:background="@drawable/shap"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:gravity="center_vertical"
            android:orientation="horizontal" >
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:paddingTop="2dp"
                android:paddingBottom="2dp"
                android:paddingLeft="6dp"
                android:singleLine="true"
                android:hint="请再次输入密码"
                android:inputType="textPassword"
                android:maxLength="15"
                android:background="#ffffff"
                android:id="@+id/et_psw_again"
                android:textSize="18sp" />
        </LinearLayout>

        <LinearLayout
            android:background="@drawable/shap"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:gravity="center_vertical"
            android:orientation="horizontal" >
            <TextView
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginLeft="10dp"
                android:paddingLeft="6dp"
                android:gravity="left"
                android:text="性别"
                android:textSize="18sp" />
            <RadioGroup
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_weight="2.6"
                android:id="@+id/SexRadio"
                android:paddingLeft="5dp">
                <RadioButton
                    android:id="@+id/mainRegisterRdBtnFemale"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="女生"/>
                <RadioButton
                    android:id="@+id/mainRegisterRdBtnMale"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="男生"/>
            </RadioGroup>
        </LinearLayout>
        
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:gravity="center_vertical"
            android:orientation="horizontal" >
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:paddingTop="2dp"
                android:paddingBottom="2dp"
                android:paddingLeft="6dp"
                android:hint="学校"
                android:singleLine="true"
                android:maxLength="15"
                android:background="#ffffff"
                android:textSize="18sp" />
        </LinearLayout>

    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp" >
        <Button
            android:id="@+id/btn_register"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="40dp"
            android:text="注册"
            android:textSize="24sp"
            android:background="@color/colorPrimary" />
     </RelativeLayout>

</LinearLayout>

对应注册活动 RegisterActivity:

public class RegisterActivity extends AppCompatActivity {

    //用户名,密码,再次输入的密码的控件
    private EditText et_user_name,et_psw,et_psw_again;
    //用户名,密码,再次输入的密码的控件的获取值
    private String userName,psw,pswAgain;
    private RadioGroup Sex;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置页面布局 ,注册界面
        setContentView(R.layout.activity_register);
        //设置此界面为竖屏
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        init();
    }

    private void init() {

        //从activity_register.xml 页面中获取对应的UI控件
        Button btn_register = (Button) findViewById(R.id.btn_register);
        et_user_name= (EditText) findViewById(R.id.et_user_name);
        et_psw= (EditText) findViewById(R.id.et_psw);
        et_psw_again= (EditText) findViewById(R.id.et_psw_again);
        Sex= (RadioGroup) findViewById(R.id.SexRadio);
        //注册按钮
        btn_register.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {

                //获取输入在相应控件中的字符串
                getEditString();
                //判断输入框内容
                int sex;
                int sexChoseId = Sex.getCheckedRadioButtonId();
                switch (sexChoseId) {
                    case R.id.mainRegisterRdBtnFemale:
                        sex = 0;
                        break;
                    case R.id.mainRegisterRdBtnMale:
                        sex = 1;
                        break;
                    default:
                        sex = -1;
                        break;
                }

                if(TextUtils.isEmpty(userName)){
                    Toast.makeText(RegisterActivity.this, "请输入用户名", Toast.LENGTH_SHORT).show();
                }else if(TextUtils.isEmpty(psw)){
                    Toast.makeText(RegisterActivity.this, "请输入密码", Toast.LENGTH_SHORT).show();
                }else if(TextUtils.isEmpty(pswAgain)) {
                    Toast.makeText(RegisterActivity.this, "请再次输入密码", Toast.LENGTH_SHORT).show();
                } else if (sex<0){
                    Toast.makeText(RegisterActivity.this, "请选择性别", Toast.LENGTH_SHORT).show();
                }else if(!psw.equals(pswAgain)){
                    Toast.makeText(RegisterActivity.this, "输入两次的密码不一样", Toast.LENGTH_SHORT).show();

                    /**
                     *从SharedPreferences中读取输入的用户名,判断SharedPreferences中是否有此用户名
                     */
                }else if(isExistUserName(userName)){
                    Toast.makeText(RegisterActivity.this, "此账户名已经存在", Toast.LENGTH_SHORT).show();

                }else{
                    Toast.makeText(RegisterActivity.this, "注册成功", Toast.LENGTH_SHORT).show();
                    //把账号、密码和账号标识保存到sp里面
                    /**
                     * 保存账号和密码到SharedPreferences中
                     */
                    saveRegisterInfo(userName, psw);
                    //注册成功后把账号传递到LoginActivity.java中
                    // 返回值到loginActivity显示
                    Intent data = new Intent();
                    data.putExtra("userName", userName);
                    setResult(RESULT_OK, data);
                    //RESULT_OK为Activity系统常量,状态码为-1,
                    // 表示此页面下的内容操作成功将data返回到上一页面,如果是用back返回过去的则不存在用setResult传递data值
                    RegisterActivity.this.finish();
                }
            }
        });
    }
    /**
     * 获取控件中的字符串
     */
    private void getEditString(){
        userName=et_user_name.getText().toString().trim();
        psw=et_psw.getText().toString().trim();
        pswAgain=et_psw_again.getText().toString().trim();
    }
    /**
     * 从SharedPreferences中读取输入的用户名,判断SharedPreferences中是否有此用户名
     */
    private boolean isExistUserName(String userName){
        boolean has_userName=false;
        //mode_private SharedPreferences sp = getSharedPreferences( );
        // "loginInfo", MODE_PRIVATE
        SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
        //获取密码
        String spPsw=sp.getString(userName, "");//传入用户名获取密码
        //如果密码不为空则确实保存过这个用户名
        if(!TextUtils.isEmpty(spPsw)) {
            has_userName=true;
        }
        return has_userName;
    }
    /**
     * 保存账号和密码到SharedPreferences中SharedPreferences
     */
    private void saveRegisterInfo(String userName,String psw){
        String md5Psw = MD5Utils.md5(psw);//把密码用MD5加密
        //loginInfo表示文件名, mode_private SharedPreferences sp = getSharedPreferences( );
        SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);

        //获取编辑器, SharedPreferences.Editor  editor -> sp.edit();
        SharedPreferences.Editor editor=sp.edit();
        //以用户名为key,密码为value保存在SharedPreferences中
        //key,value,如键值对,editor.putString(用户名,密码);
        editor.putString(userName, md5Psw);
        //提交修改 editor.commit();
        editor.apply();
    }
}

最后是找回密码界面 activity_lost_find.xml:

<?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="match_parent"
    android:orientation="vertical">

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="@color/colorPrimary"
    android:gravity="center">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="忘记密码"
        android:textSize="30sp"/>
        
  </LinearLayout>
    
  <LinearLayout
    android:layout_marginTop="15dp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:paddingTop="2dp"
        android:paddingBottom="2dp"
        android:paddingLeft="6dp"
        android:hint="请输入忘记密码的账号"
        android:singleLine="true"
        android:maxLength="15"
        android:background="#ffffff"
        android:textSize="24sp" />
  </LinearLayout>

</LinearLayout>

找回密码功能只是新建了一个活动,并未实现功能。

小结:功能未使用内置数据库SQLite,运用MD5加密算法完成。

Android实现简单的登录和注册功能 GitHub地址:https://github.com/PeachLuis/LoginTest 文章目录登录和注册功能app一.UI设计1.实现隐藏状态栏和全屏幕2.图片设置为背景被拉伸的解决方案3.设置圆角Button按钮4.设置圆形图片二.运用数据库功能1.实现退出登录活动后再进入可以记住账号2.实现记住密码 登录和注册功能app 一.UI设计 这里我想要仿照现在的qq登录界面,实现不止隐藏A... 阅读详情

相关推荐

基于安卓开发的QQ登陆页面,实现登陆注册内容

基于安卓开发的QQ登陆页面,实现登陆注册内容(一) QQ登陆注册 首先对于QQ登陆注册而言,先控制好布局,和对控件的使用; 页面效果如下: 部分代码: <TextView android:layout_width="match_parent" android:layout_height="67dp" android:layout_marginTop="50dp" ...

windseeker_的博客 5947

【实战】(一)android模拟qq登录(get和post方法)

一、项目介绍 主要是模拟qq登录,像服务器发送登录数据,如果数据相等,则登录成功。 二、项目架构 客户端Eclipse中 StreamTool.java 主要功能是将返回的数据流转化为数据串的工具类 源码: MainActivity.java: package com.lcz.login_in; import java.io.InputStream; import java

Mind_programmonkey的博客 4227

安卓Android第三方登录-QQ登录

要实现QQ第三方登录,其实只需要一个封装类:QQLoginManager 几乎 三行代码 就实现QQ登录功能 这里先给出Github开源项目地址,项目下有详细的使用说明 下面就开始详细说一说怎么实现基于这个强大开源项目的安卓第三方QQ登录吧! 准备工作:获取 AppID 打开 http://open.qq.com/ 点击应用接入 第一次需要按照说明 注册类型 ,如果是小白练...

夏日云泊镇的博客 3103

Android开发 登录注册设计

用Android Studio 简单的实现登录注册。

qq_51936803的博客 2万+

安卓开发个人小作品(2)- QQ简仿

个人小作品系列,这次继续介绍自己曾经写的一些“小玩意”,这次就介绍下自己初学安卓时,写的一个简仿QQ吧。 里面都是一些基础知识,但是作为初学者来说,还是可以学到很多东西的。 由于这个涉及到的知识很散,就按照界面一个个说,主要就是一些安卓基础,要是你能耐心看下去的话,肯定都能做到。好啦,开始吧。 目录 1.欢迎界面(handler、Timer的使用等) 2.登录界面(属性动画、editTe...

黄庆庆的世界 3979

【Android Studio】简单的QQ登录界面

android studio 仿QQ客户端登陆界面

南京大学软件工程硕士在读 1万+

Android实例开发中登录注册界面的框架实现(android studio)

小项目框架 今天用QQ的时候想到了,不如用android studio 做一个类似于这样的登录软件。当然QQ的实现的功能特别复杂,UI界面也很多,不是单纯的一时新奇就可以做出来的。就是简单的实现了一些功能,做了三个界面;1.登录界面。2.注册界面。3.登陆后的界面。 功能描述 登录按钮------按钮实现跳转到下一个界面,并且判断输入的账号、密码是否符合规则(不为空),提示,登陆成功或失败 注册按...

不会游泳的程序猿 10万+

深入解析Android仿QQ应用源码:实现登录注册与聊天功能

在深入探讨Android高级应用开发之前,了解项目的代码结构是至关重要的。Android项目通常由src目录和res目录组成。src目录包含应用的所有源代码,而res目录则包含所有资源文件,如布局XML、图像、字符串资源等。

weixin_35749440的博客 1023

Android第三天——实现一个仿QQ的登录界面

Android第三天——实现一个仿QQ的登录界面(一)仿QQ登录界面1.最终效果2.设计分析3.资源获取3.布局搭建4.业务实现5.Demo下载功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图...

Ice_Nation的博客 1万+

android模拟实现QQ登录界面

这个资源主要是使用Android模拟开发了一个QQ登录界面的小案例。 内容概要:了解基础Android组件的使用,以及shape和selector组件美化。 适合人群:初学Android开发的小萌新,可以利用这个小案例巩固Android基础控件的使用。 能学到什么:可以加深Android布局的使用,以及基础组件的使用知识。

基于Android仿QQ聊天系统(Android端+服务端)

该项目主要用户注册功能、用户登录功能、查找添加好友功能、聊天功能,后台运行,退出登录功能,后台管理。 开发技术:Android 集成开发工具:Eclipse 运行平台:Android

Android实现qq登录注册和好友列表界面

android实现登录注册和好友列表界面

qq_62603185的博客 4975

电力工程师必看:GOOSE/SV/MMS三协议在智能变电站中的分工与联动实例

本文深入解析了智能变电站中GOOSE、SV、MMS三大核心通信协议的分工与协同机制。GOOSE协议作为过程层的“闪电信使”,负责毫秒级传输跳闸命令等事件信息;SV协议则传输精确同步的电流电压采样值流;而MMS协议作为站控层的“管理语言”,实现设备监控与数据管理。三者基于IEC 61850标准,在过程层、间隔层和站控层之间高效联动,共同构建了智能变电站稳定可靠的通信骨架。

jj890的博客 364

android studio 登录与注册,Android Studio实现QQ的注册登录和好友列表跳转

Android Studio实现QQ的注册登录和好友列表跳转,在这里,界面,跳转,账号,插入图片Android Studio实现QQ的注册登录和好友列表跳转易采站长站,站长之家为您整理了Android Studio实现QQ的注册登录和好友列表跳转的相关内容。一、项目概述本次项目主要包含了注册、登录和好友列表三个界面以及之间相互跳转。其中好友列表界面设计的很详细,有好友头像和消息内容。用户先点击注册...

weixin_30510711的博客 3689

Windows系统的Mamba环境配置详细教程(状态空间模型)

causal_conv1d也是安装mamba的依赖必须库。安装完成后,通过pip list可以查看到安装的库。Triton是安装mamba的依赖,需要先安装。上述工作准备好后,按下面步骤安装。直接根据离线文件安装即可。是自己的虚拟环境名字。

2301_77831163的博客 3674

Android dex, odex, oat, vdex, art文件介绍

下图可以简化将Java源转换为OAT的过程: .dex Dalvik虚拟机字节码文件 .vdex 其中包含APK的未压缩DEX代码,以及一些旨在加快验证速度的元数据 .odex .oat // JIT,Just-in-time,即时编译,边运行边编译; // AOT,Ahead Of Time,提前编译,指运行前编译。 其中包含APK中已经过AOT编译的方法代码。 原始DEX文件(例如classes.dex)被转换为另一个包含本机代码的文件。这个新文件通常具有.odex。.oat扩展名,并由ELF格式

he980725866的博客 3618

仿 手机QQ 登录、注册、找回密码、好友列表、QQ状态等功能的实现

仿 手机QQ 登录、注册、找回密码、好友列表、QQ状态等功能的实现。

小西瓜吖的博客 2282

如何下载era5数据?(两种方式)

供水利大数据云计算课程同学参考使用#

Camiel_sweet的博客 1万+

安卓中注册登录功能模块的编写

一、前言 很多的应用程序都有登录功能模块,这里的登录注册功能只是简单地模拟了登录注册的过程,并没有真正的发送短信、接收短信的功能。如果想要实现这样的功能,就需要借助第三方平台,比如Bomb。 二、界面截图 登录界面 在该界面只要输入了用户名和密码,再点击登录就能进入到主界面。用户名和密码是可以随便输入的,因为只是一个模拟过程,如果需要真的登录,就需要另外添加登录的逻辑了。 注册界面 该界面同样...

英勇的博客 3016

[PCIe5.0] 3.4.1 Flow Control Initialization State Machine Rules

流控初始化是PCIe链路中每个虚拟通道(VC)启用的必经流程,分为FC_INIT1和FC_INIT2两个阶段,确保发送端与接收端的缓冲区信用值协商一致。

系统固件工程师 138

【保姆级教程】基于UNet++&MobileNetv3的语义分割模型从训练到RK3588部署:让边缘AI落地效率提升300%

通过SMP库一键构建encoder_name="mobilenet_v2", # 选择MobileNetv3作为骨干encoder_weights="imagenet", # 加载预训练权重加速收敛in_channels=3, # 输入图像通道数(RGB)classes=29, # Cityscapes数据集类别数activation=None # 输出无激活,便于后续损失计算本教程从“模型设计-训练-转换-边缘部署”全链路拆解了。

FJN110的博客 253

android里qq登录界面,Android仿QQ登陆窗口实现原理

今天根据腾讯qq,我们做一个练习,来学习如何制作一个漂亮的布局。首先看一下官方图片 还是一个启动画面,之后进入登录页面,导航页面就不介绍了,大家可以参考微信的导航页面。首先程序进入SplashActivity,就是启动页面,Activity代码如下:package com.example.imitateqq;import android.app.Activity;import android.co...

weixin_34345599的博客 1767

Python画柱状图(双柱状图,三柱状图)且显示对应数值

使用python实现双柱状图和三柱状图,并且在柱状图形的顶部显示对应数值;

yue200403的博客 1万+

安卓开发之仿QQ界面

安卓开发之仿腾讯QQ1.系统功能说明及软件界面展示2.软件界面展示3.数据流图(我瞎画的)4.操作流程图(也是我瞎画的) 1.系统功能说明及软件界面展示 此APP是模仿的移动端的腾讯QQ。众所周知,腾讯QQ是一个社交平台,在这个软件里面能进行加好友,加群,聊天等功能,以及qq空间,qq空间可以看到别人发出来的说说,就像是微信的朋友圈一样,不仅可以看好友的动态,还可以去空间里面玩游戏。本系统主要是为了了解腾讯QQ移动端的登录、布局以及一部分功能。在这个大作业中,我实现了注册,登录,找回密码,记住密码,聊天,数

qq_45900875的博客 1689

智能车图像处理11-进阶篇3--中线累积差值的统计

中线累积差值的统计在后面判断小S,以及长直道的时候都有用到,关键点在于中线的跳变 第12 - 13 行:comulants1 和comlants2代表的是两种不同的累差,取的行数不同 第14-17 行:comulants2取6到25行,其实就是My_Abs(LCenter[i], LCenter[i - 1])的累加 第18-21 行:comulants1去第1到40行 第27- 行: 计算了一下右线的开始于最终结束行,这里判断R_black是否为0,是和中线的提取中g

taiyuezyh的博客 3823

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

android studio 登录 跳转,Android Studio实现QQ的注册登录和好友列表跳转

一、项目概述本次项目主要包含了注册、登录和好友列表三个界面以及之间相互跳转。其中好友列表界面设计的很详细,有好友头像和消息内容。用户先点击注册按钮进入注册界面,输入完账号和密码后,点击注册,跳转到登录界面,这时候账号和密码也被传了过来,点击登录按钮进入好友列表界面,这时候用户名也被传递过来。二、开发环境三、详细设计1、登录界面的搭建整体布局是相对布局RelativeLayout,上来ImageVi...

weixin_36128990的博客 2844

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

下一篇: Javaweb实现简易的留言板项目
八归少年
八归少年 新星创作者: 操作系统技术领域 新星创作者: 操作系统技术领域
博客等级 码龄9年 9011粉丝 63原创
评论 71
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

八归少年

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值