国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

這篇具有很好參考價值的文章主要介紹了Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

目錄

1.功能要求

2.功能實現(xiàn)流程圖

3.功能演示

4.界面與功能

?4.1登錄界面

4.1.1界面展示

4.1.2登錄界面功能簡介

4.1.3界面代碼

4.1.4登錄按鈕點擊事件

4.1.5退出按鈕點擊事件

?4.1.6背景音樂點擊事件

4.1.7記住密碼

5.Java源碼


1.功能要求

(1)三個界面布局,體現(xiàn)文本框、編輯框、單選按鈕、復選框按鈕、按鈕、listview控件,其它控件可自選。

(2)實現(xiàn)從第一個界面分別能跳轉(zhuǎn)到另兩個界面,其它兩個界面也可返回第一個界面,將一個界面的數(shù)據(jù)通過Activity的數(shù)據(jù)傳遞傳送到另一個界面。

(3)獲取某個界面的數(shù)據(jù),將數(shù)據(jù)存儲到外部文件,數(shù)據(jù)存儲方式可自選。

(4)根據(jù)各自項目的需求在某個界面中通過自定義廣播、Toast提示實現(xiàn)一條廣播的發(fā)送。

(5)在第一個界面當點擊按鈕時利用服務、MediaPlayer實現(xiàn)播放、停止播放背景音樂的功能。

2.功能實現(xiàn)流程圖

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

3.功能演示

功能演示

4.界面與功能

?4.1登錄界面

4.1.1界面展示

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

4.1.2登錄界面功能簡介

在登錄界面可以實現(xiàn)5個功能:

(1)登錄界面的跳轉(zhuǎn)(2)注冊界面的跳轉(zhuǎn)(3)退出功能

(4)記住密碼功能(5)背景音樂播放和停止功能

界面跳轉(zhuǎn)功能我使用的是intent實現(xiàn)activity與activity之間的跳轉(zhuǎn),可以直接按返回鍵返回到前一頁,不需要自己添加按鍵監(jiān)聽代碼實現(xiàn),但需要在manifest注冊activity。

4.1.3界面代碼

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:id="@+id/relativeLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bj1"
    tools:context=".MainActivity">

    <EditText
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="75dp"
        android:layout_marginEnd="32dp"
        android:hint="請輸入用戶名"
        app:layout_constraintBottom_toTopOf="@+id/pwd"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        android:maxLines="1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.972" />

    <EditText
        android:id="@+id/pwd"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="75dp"
        android:layout_marginEnd="32dp"
        android:hint="請輸入密碼"
        android:inputType="textPassword"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        android:maxLines="1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.546" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="16dp"
        android:text="用戶登錄"
        android:textSize="28sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toTopOf="@+id/name"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.89" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="用戶:"
        android:textSize="20sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toTopOf="@+id/pwd"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/name"
        app:layout_constraintVertical_bias="0.37" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="密碼:"
        android:textSize="20sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toBottomOf="@+id/pwd"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView2"
        app:layout_constraintVertical_bias="0.718" />

    <Button
        android:id="@+id/login"
        style="@style/AlertDialog.AppCompat.Light"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="32dp"
        android:layout_marginRight="30dp"
        android:backgroundTint="@android:color/holo_blue_dark"
        android:text="登錄"
        app:layout_constraintEnd_toStartOf="@+id/quit"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/pwd" />

    <Button
        android:id="@+id/reg"
        style="@style/AlertDialog.AppCompat.Light"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="76dp"
        android:layout_marginRight="30dp"
        android:backgroundTint="@android:color/holo_blue_dark"
        android:text="注冊"
        app:layout_constraintEnd_toStartOf="@+id/quit"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/pwd" />

    <Button
        android:id="@+id/quit"
        style="@style/AlertDialog.AppCompat.Light"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginStart="30dp"
        android:layout_marginTop="120dp"
        android:layout_marginEnd="30dp"
        android:backgroundTint="@android:color/darker_gray"
        android:text="退出"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/pwd" />

    <CheckBox
        android:id="@+id/checkBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="5dp"
        android:text="記住密碼"
        app:layout_constraintStart_toStartOf="@+id/login"
        app:layout_constraintTop_toBottomOf="@+id/pwd" />

    <ImageButton
        android:id="@+id/imagbutton"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:background="#00FF0000"
        android:onClick="onclickPlay"
        android:scaleType="centerInside"
        android:src="@drawable/bf" />

</androidx.constraintlayout.widget.ConstraintLayout>

4.1.4登錄按鈕點擊事件

實現(xiàn)按鈕的點擊事件,在java代碼中使用的是匿名內(nèi)部類,給Button綁定一個監(jiān)聽事件,并監(jiān)聽一個點擊事件,在setOnClickListener方法中直接傳入一個OnClickListener對象,并實現(xiàn)OnClick方法。
點擊登錄按鈕,如果用戶編輯框的數(shù)據(jù)跟密碼編輯框的數(shù)據(jù)相對應,就會跳轉(zhuǎn)到歡迎界面;如果數(shù)據(jù)不對應,將會有toast彈窗提示“密碼錯誤或用戶不存在!”,如下圖。

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

java代碼實現(xiàn)

//登錄事件
btnlogin.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        String username = name.getText().toString();
        String password = pwd.getText().toString();       //獲取用戶輸入的用戶名和密碼
        //查詢用戶名和密碼相同的數(shù)據(jù)
        Cursor cursor = db.query("logins",new String[]{"usname","uspwd"}," usname=? and uspwd=?",new String[]{username,password},null,null,null);

        int flag = cursor.getCount();                   //查詢出來的記錄項的條數(shù),若沒有該用戶則為0條
        if(flag!=0){                                    //若查詢出的記錄不為0,則進行跳轉(zhuǎn)操作
            Intent intent = new Intent();
            intent.setClass(MainActivity.this,Welcome.class);            //設置頁面跳轉(zhuǎn)
            SharedPreferences.Editor editor = sp2.edit();
            cursor.moveToFirst();                                   //將光標移動到position為0的位置,默認位置為-1
            String loginname = cursor.getString(0);
            editor.putString("Loginname",loginname);
            editor.commit();                                        //將用戶名存到SharedPreferences中
            startActivity(intent);
        }
        else{
            Toast.makeText(MainActivity.this,"密碼錯誤或用戶不存在!",Toast.LENGTH_LONG).show();             //提示用戶信息錯誤或沒有賬號
        }

    }
});

4.1.5退出按鈕點擊事件

退出事件可由兩種方式實現(xiàn):

  1. 點擊退出按鈕退出,會有彈框彈出來提示用戶是否退出程序。
  2. 返回鍵退出,在兩秒內(nèi)點擊返回鍵實現(xiàn)退出程序。

如下圖

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

?java代碼實現(xiàn)

//退出事件
    back.setOnClickListener(new View.OnClickListener() {     //為退出按鈕添加監(jiān)聽事件實現(xiàn)退出(用到彈框提示確認退出)
        @Override
        public void onClick(View v) {
            //創(chuàng)建彈框?qū)ο?顯示在當前頁面
            AlertDialog.Builder ab = new AlertDialog.Builder(MainActivity.this);
            //編輯彈框樣式
            ab.setTitle("提示");                   //創(chuàng)建標題
            ab.setIcon(R.mipmap.ic_launcher_round);   //設置圖標
            ab.setMessage("您是否確定退出?");         //設置內(nèi)容
            //設置按鈕
            ab.setPositiveButton("取消",null);
            ab.setNeutralButton("確定", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    // 實現(xiàn)程序的退出,結(jié)束當前
                    MainActivity.this.finish();
                }
            });
            //創(chuàng)建彈框
            ab.create();
            //顯示彈框
            ab.show();
        }
    });
}

//2秒內(nèi)點擊兩次返回鍵退出
long exittime;    //設定退出時間間隔
public boolean onKeyDown(int keyCode, KeyEvent event){   //參數(shù):按的鍵;按鍵事件
    //判斷事件觸發(fā)
    if (keyCode == KeyEvent.KEYCODE_BACK){
        //判斷兩次點擊間隔時間
        if((System.currentTimeMillis()-exittime)>2000){
            Toast.makeText(MainActivity.this,"再次返回程序退出!",Toast.LENGTH_SHORT).show();
            exittime = System.currentTimeMillis();    //設置第一次點擊時間
        }else{
            finish();
            System.exit(0);
        }
        return true;
    }
    return super.onKeyDown(keyCode,event);

?4.1.6背景音樂點擊事件

背景音樂的播放和暫停功能,這里使用的是soundpool實現(xiàn)背景音樂播放功能,soundpool類可用于管理和播放應用中的音頻資源,這些音頻資源可以放在存儲文件中也可以包含在程序中,但實現(xiàn)播放的時間比較短。在這兒之前還需在res路徑下新建一個raw的文件夾,并將提前準備好的mp3存放在此,如下圖。

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

?java代碼實現(xiàn)

//背景音樂
public void playSound(int sound, int loop) {    //獲取AudioManager引用
    AudioManager am = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
    //獲取當前音量
    float streamVolumeCurrent = am.getStreamVolume(AudioManager.STREAM_MUSIC);
    //獲取系統(tǒng)最大音量
    float streamVolumeMax = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
    //計算得到播放音量
    float volume = streamVolumeCurrent / streamVolumeMax;
    //調(diào)用SoundPool的play方法來播放聲音文件
    currStaeamId = ms.play(music.get(sound), volume, volume, 1, loop, 1.0f);
}

public void initSoundPool() {//初始化聲音池
    ms = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);  //創(chuàng)建SoundPool對象
    music = new HashMap<Integer, Integer>();   //創(chuàng)建HashMap對象
    //加載聲音文件,并且設置為1號聲音放入hm中
    music.put(1, ms.load(this, R.raw.bjmusic, 1));
}

public void onclickPlay(View view){
    //點擊按鈕播放音樂,再次點擊停止播放
    if(cnt==0){
        cnt = 1;
    }
    else {
        cnt = 0;
    }
    if(cnt==1) {
        playSound(1,0);    //播放1號聲音資源,且播放一次
        //提示播放
        Toast.makeText(MainActivity.this, "播放音效", Toast.LENGTH_SHORT).show();
    }
    else {
        ms.stop(currStaeamId);     //停止正在播放的聲音
        //提示停止播放
        Toast.makeText(MainActivity.this, "停止播放音效", Toast.LENGTH_SHORT).show();
    }
}

4.1.7記住密碼

使用sharedPreferencers方法實現(xiàn)記住密碼功能,在登錄界面輸入內(nèi)容后,勾選記住密碼復選框,然后再點擊登錄,登錄成功后將軟件關掉,再重新打開,就會看到賬號和密碼就已經(jīng)輸入在框內(nèi)了,記住的密碼將會保存在Device File Explorer視圖下的data/data/com.example.test06/shared_prefs文件中,如下圖。

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)

?java代碼實現(xiàn)

//從SharedPreferences中獲取是否記住密碼的參數(shù)
final SharedPreferences preference = PreferenceManager.getDefaultSharedPreferences(this);
boolean isRemember = preference.getBoolean("remember_pwd", false);
//設置賬號與密碼到文本框,并勾選記住密碼
if (isRemember) {
    name.setText(preference.getString("name", ""));
    pwd.setText(preference.getString("password", ""));
    remember_pwd.setChecked(true);
}

5.Java源碼

package com.example.test06;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;
import java.util.HashMap;

public class MainActivity extends AppCompatActivity {
    EditText name,pwd;
    Button btnlogin,btnreg,back;
    CheckBox remember_pwd,show,editText;
    Mysql mysql;
    SQLiteDatabase db;
    SharedPreferences sp1,sp2;
    ImageButton btn_play;
    public static int cnt = 0;
    SoundPool ms;        //聲明SoundPool的引用
    HashMap<Integer, Integer> music;      //聲明HashMap來存放聲音文件
    int currStaeamId;          //當前正播放的streamId

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        name = this.findViewById(R.id.name);            //用戶名輸入框
        pwd = this.findViewById(R.id.pwd);              //密碼輸入框
        btnlogin = this.findViewById(R.id.login);         //登錄按鈕
        btnreg = this.findViewById(R.id.reg);            //注冊按鈕
        back = this.findViewById(R.id.quit);             //退出按鈕
        btn_play = this.findViewById(R.id.imagbutton);    //背景音樂按鈕
        remember_pwd = this.findViewById(R.id.checkBox);    //復選按鈕
        sp1 =  this.getSharedPreferences("useinfo",this.MODE_PRIVATE);
        sp2 = this.getSharedPreferences("username",this.MODE_PRIVATE);
        initSoundPool();//初始化聲音池的方法

        name.setText(sp1.getString("usname",null));
        pwd.setText(sp1.getString("uspwd",null));
        mysql = new Mysql(this,"Userinfo",null,1);      //建立數(shù)據(jù)庫
        db = mysql.getReadableDatabase();

        //從SharedPreferences中獲取是否記住密碼的參數(shù)
        final SharedPreferences preference = PreferenceManager.getDefaultSharedPreferences(this);
        boolean isRemember = preference.getBoolean("remember_pwd", false);
        //設置賬號與密碼到文本框,并勾選記住密碼
        if (isRemember) {
            name.setText(preference.getString("name", ""));
            pwd.setText(preference.getString("password", ""));
            remember_pwd.setChecked(true);
        }

        //登錄事件
        btnlogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String username = name.getText().toString();
                String password = pwd.getText().toString();          //獲取用戶輸入的用戶名和密碼
                //查詢用戶名和密碼相同的數(shù)據(jù)
                Cursor cursor = db.query("logins",new String[]{"usname","uspwd"}," usname=? and uspwd=?",new String[]{username,password},null,null,null);

                int flag = cursor.getCount();                   //查詢出來的記錄項的條數(shù),若沒有該用戶則為0條
                if(flag!=0){                                    //若查詢出的記錄不為0,則進行跳轉(zhuǎn)操作
                    Intent intent = new Intent();
                    intent.setClass(MainActivity.this,Welcome.class);            //設置頁面跳轉(zhuǎn)
                    SharedPreferences.Editor editor = sp2.edit();
                    cursor.moveToFirst();                            //將光標移動到position為0的位置,默認位置為-1
                    String loginname = cursor.getString(0);
                    editor.putString("Loginname",loginname);
                    editor.commit();                                //將用戶名存到SharedPreferences中
                    startActivity(intent);
                }
                else{
                    Toast.makeText(MainActivity.this,"密碼錯誤或用戶不存在!",Toast.LENGTH_LONG).show();             //提示用戶信息錯誤或沒有賬號
                }

            }
        });

        //注冊事件
        btnreg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MainActivity.this,Register.class);      //跳轉(zhuǎn)到注冊頁面
                startActivity(intent);
                Toast.makeText(MainActivity.this,"前往注冊!",Toast.LENGTH_SHORT).show();
            }
        });

        //退出事件
        back.setOnClickListener(new View.OnClickListener() {     //為退出按鈕添加監(jiān)聽事件實現(xiàn)退出(用到彈框提示確認退出)
            @Override
            public void onClick(View v) {
                //創(chuàng)建彈框?qū)ο?顯示在當前頁面
                AlertDialog.Builder ab = new AlertDialog.Builder(MainActivity.this);
                //編輯彈框樣式
                ab.setTitle("提示");                   //創(chuàng)建標題
                ab.setIcon(R.mipmap.ic_launcher_round);   //設置圖標
                ab.setMessage("您是否確定退出?");         //設置內(nèi)容
                //設置按鈕
                ab.setPositiveButton("取消",null);
                ab.setNeutralButton("確定", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        // 實現(xiàn)程序的退出,結(jié)束當前
                        MainActivity.this.finish();
                    }
                });
                //創(chuàng)建彈框
                ab.create();
                //顯示彈框
                ab.show();
            }
        });
    }

    //2秒內(nèi)點擊兩次返回鍵退出
    long exittime;    //設定退出時間間隔
    public boolean onKeyDown(int keyCode, KeyEvent event){   //參數(shù):按的鍵;按鍵事件
        //判斷事件觸發(fā)
        if (keyCode == KeyEvent.KEYCODE_BACK){
            //判斷兩次點擊間隔時間
            if((System.currentTimeMillis()-exittime)>2000){
                Toast.makeText(MainActivity.this,"再次返回程序退出!",Toast.LENGTH_SHORT).show();
                exittime = System.currentTimeMillis();    //設置第一次點擊時間
            }else{
                finish();
                System.exit(0);
            }
            return true;
        }
        return super.onKeyDown(keyCode,event);
    }

        //背景音樂
        public void playSound(int sound, int loop) {    //獲取AudioManager引用
            AudioManager am = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
            //獲取當前音量
            float streamVolumeCurrent = am.getStreamVolume(AudioManager.STREAM_MUSIC);
            //獲取系統(tǒng)最大音量
            float streamVolumeMax = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
            //計算得到播放音量
            float volume = streamVolumeCurrent / streamVolumeMax;
            //調(diào)用SoundPool的play方法來播放聲音文件
            currStaeamId = ms.play(music.get(sound), volume, volume, 1, loop, 1.0f);
        }

        public void initSoundPool() {//初始化聲音池
            ms = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);  //創(chuàng)建SoundPool對象
            music = new HashMap<Integer, Integer>();   //創(chuàng)建HashMap對象
            //加載聲音文件,并且設置為1號聲音放入hm中
            music.put(1, ms.load(this, R.raw.bjmusic, 1));
        }

        public void onclickPlay(View view){
            //點擊按鈕播放音樂,再次點擊停止播放
            if(cnt==0){
                cnt = 1;
            }
            else {
                cnt = 0;
            }
            if(cnt==1) {
                playSound(1,0);    //播放1號聲音資源,且播放一次
                //提示播放
                Toast.makeText(MainActivity.this, "播放音效", Toast.LENGTH_SHORT).show();
            }
            else {
                ms.stop(currStaeamId);     //停止正在播放的聲音
                //提示停止播放
                Toast.makeText(MainActivity.this, "停止播放音效", Toast.LENGTH_SHORT).show();
            }
        }
}

未完待續(xù)文章來源地址http://www.zghlxwxcb.cn/news/detail-448241.html

到了這里,關于Android學習(一)--用戶登錄注冊界面(界面跳轉(zhuǎn)+背景音樂)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • 基于Java的界面開發(fā)【用戶注冊登錄】

    基于Java的界面開發(fā)【用戶注冊登錄】

    首先要清楚一個界面由哪些部分組成: ????????1、可視化部分:? 窗體、標簽、菜單、選項卡、按鈕...... ????????2、元素規(guī)則部分:? 顏色、尺寸、字體、布局 ????????3、內(nèi)容部分:? 文字、圖片 其次是所需代碼庫(java類庫):?? java.awt(元素規(guī)則類比較多)

    2024年02月06日
    瀏覽(25)
  • Android用戶注冊界面設計

    Android用戶注冊界面設計

    提示:文章寫完后,目錄可以自動生成,如何生成可參考右邊的幫助文檔 提示:以下是本篇文章正文內(nèi)容,下面案例可供參考 根據(jù)前面的學習內(nèi)容,設計如圖1所示的用戶注冊界面,要求如下: (1)將應用的名稱、姓名編輯框的輸入提示中的“張三”,改為自己的姓名; (

    2023年04月12日
    瀏覽(15)
  • Java--用戶登錄/注冊界面(連接Mysql數(shù)據(jù)庫)并可以通過驗證碼登錄

    Java--用戶登錄/注冊界面(連接Mysql數(shù)據(jù)庫)并可以通過驗證碼登錄

    1 效果展示 (1)登錄界面 (2)注冊界面 (3)動圖展示 2 內(nèi)容說明 (1)開發(fā)前,需引入一個連接Mysql 數(shù)據(jù)庫驅(qū)動mysql-connector-java-5.1.30-bin.jar包 提取碼:6666 (2)構(gòu)建路徑 (3)需要下載xampp軟件 xampp軟件下載 提取碼:2255 xampp軟件包含 Apache Web服務器、 Mysql Web服務器、Filezilla

    2024年02月09日
    瀏覽(95)
  • Android Studio 制作微信,登入界面,輸入密碼界面,跳轉(zhuǎn)手機登錄界面,以及聊天界面

    2.打開Android Studio。 3.選擇 \\\"Create New Project\\\"。 4.在 \\\"Create New Project\\\" 對話框中,輸入項目名稱、選擇存儲位置等信息。 5.選擇最低支持的Android版本,并選擇一個適合的活動模板(例如,Empty Activity)。 6.點擊 \\\"Finish\\\" 創(chuàng)建新的Android項目。 8.打開 \\\"activity_main.xml\\\" 文件,該文件用于定

    2024年02月07日
    瀏覽(18)
  • ElementUI之登陸+注冊->餓了嗎完成用戶登錄界面搭建,axios之get請求,axios之post請求,跨域,注冊界面

    ElementUI之登陸+注冊->餓了嗎完成用戶登錄界面搭建,axios之get請求,axios之post請求,跨域,注冊界面

    ?餓了嗎完成用戶注冊登錄界面搭建 axios之get請求 axios之post請求 跨域 注冊界面 1.餓了嗎完成用戶注冊登錄界面搭建 將端口號8080改為8081 導入依賴,在項目根目錄使用命令npm install element-ui -S,添加Element-UI模塊 -g:將依賴下載node_glodal全局依賴 -d(依賴放在static/[]package.json的

    2024年02月04日
    瀏覽(29)
  • Python 使用tkinter設計Windows網(wǎng)頁或應用的用戶注冊登錄界面

    Python 使用tkinter設計Windows網(wǎng)頁或應用的用戶注冊登錄界面

    上一篇:Python 自定義模塊和包設計英語生詞本(文件版)-CSDN博客 緊接上一篇博文,當我們熟練掌握自定義模塊和包、掌握文件的的讀取與寫入、掌握正則表達式內(nèi)置模塊\\\"re\\\"、掌握GUI(圖形界面)的部分組件后,接著我們將要以上的知識點結(jié)合起來,設計一個GUI(圖形界面

    2024年02月03日
    瀏覽(18)
  • Android實現(xiàn)qq登錄注冊和好友列表界面

    Android實現(xiàn)qq登錄注冊和好友列表界面

    學習Android已經(jīng)有一個多月了,老師留了實現(xiàn)qq登陸注冊和好友列表的作業(yè),要求: 設計登錄界面,注冊界面和好友列表界面。 在登錄界面輸入用戶名“ admin ”,密碼“ abc123 ”后,判斷用戶名和密碼是否正確。 若用戶名或密碼錯誤則給出相應提示:“用戶名或密碼輸入有誤

    2024年02月02日
    瀏覽(23)
  • 安卓studio 個人課設項目:“這個app“——實現(xiàn)注冊登錄,顯示用戶信息功能,并跳轉(zhuǎn)對應網(wǎng)頁

    安卓studio 個人課設項目:“這個app“——實現(xiàn)注冊登錄,顯示用戶信息功能,并跳轉(zhuǎn)對應網(wǎng)頁

    目錄 目錄 功能說明? 登錄頁面 注冊頁面 登錄后界面 點擊頭像出現(xiàn)側(cè)滑界面,并顯示用戶信息 點擊編輯按鈕進入信息編輯頁面 ?保存后返回 ?用戶名已更改 跳轉(zhuǎn)網(wǎng)頁 相關代碼 布局 登錄界面 ?注冊界面 ?信息顯示界面 ?主界面 實現(xiàn)側(cè)滑布局? 信息編輯界面 網(wǎng)頁顯示界面?

    2023年04月26日
    瀏覽(22)
  • IDEA Android用戶登錄頁面、登錄驗證、頁面跳轉(zhuǎn)演示示例全部源碼

    IDEA Android用戶登錄頁面、登錄驗證、頁面跳轉(zhuǎn)演示示例全部源碼

    開發(fā)工具: IDEA 2022.3.2,未連接數(shù)據(jù)庫。驗證用的用戶名和密碼為內(nèi)置硬編碼 演示程序運行效果: ? ? 設計器中的用戶登錄頁面布局: ?登錄驗證容錯提示如下: 1,用戶名不能為空: 2,密碼不能為空: ? ? 3,用戶名不存在: 4,用戶密碼錯誤 ? ?5,登錄驗證成功跳轉(zhuǎn)到用戶

    2024年02月11日
    瀏覽(21)
  • 使用javaweb實現(xiàn)登錄注冊頁面,并且對功能和業(yè)務進行分層 用戶登錄成功跳轉(zhuǎn)到主頁并展示數(shù)據(jù)庫的商品的信息

    使用javaweb實現(xiàn)登錄注冊頁面,并且對功能和業(yè)務進行分層 用戶登錄成功跳轉(zhuǎn)到主頁并展示數(shù)據(jù)庫的商品的信息

    一、Servlet+JSP+JavaBean開發(fā)模式(MVC)介紹 Servlet+JSP+JavaBean模式(MVC)適合開發(fā)復雜的web應用,在這種模式下,servlet負責處理用戶請求,jsp負責數(shù)據(jù)顯示,javabean負責封裝數(shù)據(jù)。 Servlet+JSP+JavaBean模式程序各個模塊之間層次清晰,web開發(fā)推薦采用此種模式。 這里以一個最常用的用戶登錄

    2024年02月03日
    瀏覽(109)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包