Initial commit
This commit is contained in:
parent
bc7e3d6b7c
commit
e0051b64e5
@ -11,6 +11,9 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".RegisterActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SplashActivity"
|
||||
android:exported="true">
|
||||
@ -22,7 +25,7 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="false"></activity>
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,16 @@
|
||||
package com.youxuegu.activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.youxuegu.R;
|
||||
|
||||
public class RegisterActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_register);
|
||||
}
|
||||
}
|
6
app/src/main/res/drawable/register_selector.xml
Normal file
6
app/src/main/res/drawable/register_selector.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/register_icon_selected"
|
||||
android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/register_icon_normal"/>
|
||||
</selector>
|
43
app/src/main/res/layout/activity_register.xml
Normal file
43
app/src/main/res/layout/activity_register.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:background="@drawable/register_bg"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.RegisterActivity">
|
||||
<include layout="@layout/main_title_bar" />
|
||||
<ImageView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:src="@drawable/default_icon" />
|
||||
<EditText
|
||||
android:id="@+id/et_user_name"
|
||||
style="@style/etRegisterStyle"
|
||||
android:layout_marginTop="35dp"
|
||||
android:background="@drawable/register_user_name_bg"
|
||||
android:drawableLeft="@drawable/user_name_icon"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入用户名" />
|
||||
<EditText
|
||||
android:id="@+id/et_psw"
|
||||
style="@style/etRegisterStyle"
|
||||
android:background="@drawable/register_psw_bg"
|
||||
android:drawableLeft="@drawable/psw_icon"
|
||||
android:hint="请输入密码"
|
||||
android:inputType="textPassword" />
|
||||
<EditText
|
||||
android:id="@+id/et_psw_again"
|
||||
style="@style/etRegisterStyle"
|
||||
android:background="@drawable/register_psw_again_bg"
|
||||
android:drawableLeft="@drawable/psw_icon"
|
||||
android:hint="请再次输入密码"
|
||||
android:inputType="textPassword" />
|
||||
<Button
|
||||
android:id="@+id/btn_register"
|
||||
style="@style/btnRegisterStyle"
|
||||
android:text="注 册" />
|
||||
</LinearLayout>
|
@ -13,4 +13,30 @@
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="etRegisterStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
<item name="android:layout_marginLeft">35dp</item>
|
||||
<item name="android:layout_marginRight">35dp</item>
|
||||
<item name="android:drawablePadding">10dp</item>
|
||||
<item name="android:paddingLeft">8dp</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textColor">#000000</item>
|
||||
<item name="android:textColorHint">#a3a3a3</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="btnRegisterStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">40dp</item>
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
<item name="android:layout_marginTop">15dp</item>
|
||||
<item name="android:layout_marginLeft">35dp</item>
|
||||
<item name="android:layout_marginRight">35dp</item>
|
||||
<item name="android:background">@drawable/register_selector</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user