@ -0,0 +1,15 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
@ -0,0 +1 @@
|
|||||||
|
MindCard
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="11" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="GRADLE" />
|
||||||
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="Android Studio default JDK" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1 @@
|
|||||||
|
/build
|
@ -0,0 +1,50 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.android.application'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk 32
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.hbue"
|
||||||
|
minSdk 23
|
||||||
|
targetSdk 32
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
|
implementation 'com.google.android.material:material:1.3.0'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||||
|
implementation 'androidx.navigation:navigation-fragment:2.3.5'
|
||||||
|
implementation 'androidx.navigation:navigation-ui:2.3.5'
|
||||||
|
//implementation 'com.android.support:support-v7:28.0.0'
|
||||||
|
testImplementation 'junit:junit:4.+'
|
||||||
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||||
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||||
|
implementation 'org.litepal.guolindev:core:3.2.1'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
|
||||||
|
implementation 'com.google.code.gson:gson:2.8.5'
|
||||||
|
implementation 'com.squareup.okio:okio:1.13.0'
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.hbue",
|
||||||
|
"variantName": "release",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 1,
|
||||||
|
"versionName": "1.0",
|
||||||
|
"outputFile": "app-release.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File"
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.hbue;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
public void useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
|
assertEquals("com.hbue", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.hbue.activity">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name="org.litepal.LitePalApplication"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.MindCard">
|
||||||
|
<activity
|
||||||
|
android:name=".SyncActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".EditImformationActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".PracticeActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".FeedbackActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".RegisterActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".LoginActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".CollectActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".ReviewActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".ShowWordActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".HaveStudiedActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".GuideActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".TestActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".ReciteActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".SettingActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".MainPageActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity2"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/title_activity_main2" />
|
||||||
|
<activity
|
||||||
|
android:name=".Main_Activity"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/title_activity_main" />
|
||||||
|
<activity
|
||||||
|
android:name=".MainFragment"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/title_activity_bottom" />
|
||||||
|
<activity
|
||||||
|
android:name=".PlanActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".MenuActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<litepal>
|
||||||
|
<dbname value = "mindcard"></dbname>
|
||||||
|
<version value="8"></version>
|
||||||
|
<list>
|
||||||
|
<mapping class = "com.hbue.bean.StudyRecord"></mapping>
|
||||||
|
<mapping class = "com.hbue.bean.Word"></mapping>
|
||||||
|
<mapping class = "com.hbue.bean.WordBook"></mapping>
|
||||||
|
<mapping class = "com.hbue.bean.WordRecord"></mapping>
|
||||||
|
</list>
|
||||||
|
|
||||||
|
</litepal>
|
@ -0,0 +1,171 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hbue.entity.Result;
|
||||||
|
import com.hbue.entity.User;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改个人信息
|
||||||
|
*/
|
||||||
|
public class EditImformationActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);//取消标题栏
|
||||||
|
setContentView(R.layout.activity_edit_imformation);
|
||||||
|
//设置返回图标的功能
|
||||||
|
ImageView backsetting = (ImageView) findViewById(R.id.backSetting2);
|
||||||
|
backsetting.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//获取用户名
|
||||||
|
SharedPreferences preferences = getSharedPreferences("data", MODE_PRIVATE);
|
||||||
|
String username = preferences.getString("username", "");
|
||||||
|
//获取文本框对象
|
||||||
|
TextView usernameEdit = (TextView) findViewById(R.id.update_username);
|
||||||
|
EditText nameEdit = (EditText) findViewById(R.id.update_name);
|
||||||
|
EditText phoneEdit =(EditText) findViewById(R.id.update_phone);
|
||||||
|
EditText ageEdit = (EditText) findViewById(R.id.update_age);
|
||||||
|
EditText sexEdit =(EditText) findViewById(R.id.update_sex);
|
||||||
|
//发送请求到服务器,回显数据
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
OkHttpClient okHttpClient = new OkHttpClient();
|
||||||
|
Request request = new Request.Builder().
|
||||||
|
url("http://10.0.2.2:8080/mindcard/user/findByUsername?username=" + username)
|
||||||
|
.build();
|
||||||
|
Response response = okHttpClient.newCall(request).execute();
|
||||||
|
String json = response.body().string();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Result result = gson.fromJson(json, Result.class);
|
||||||
|
if (result.getCode()==0){
|
||||||
|
//如果成功
|
||||||
|
User user = gson.fromJson( result.getData().toString(),User.class);
|
||||||
|
System.out.println(user.toString());
|
||||||
|
Looper.prepare();//防止报错
|
||||||
|
usernameEdit.setText(username);
|
||||||
|
nameEdit.setText(user.getName());
|
||||||
|
phoneEdit.setText(user.getPhone());
|
||||||
|
ageEdit.setText(user.getAge()+"");
|
||||||
|
sexEdit.setText(user.getSex()+"");
|
||||||
|
Looper.loop();//防止报错
|
||||||
|
}else{
|
||||||
|
//失败则弹出提示
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(EditImformationActivity.this, "回显数据失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(EditImformationActivity.this, "回显数据失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
//设置提交按钮的功能
|
||||||
|
Button updateButton = (Button) findViewById(R.id.updateButton);
|
||||||
|
updateButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
//1.获取各组件的属性
|
||||||
|
String name = nameEdit.getText().toString();
|
||||||
|
String phone = phoneEdit.getText().toString();
|
||||||
|
String sex = sexEdit.getText().toString();
|
||||||
|
String age = ageEdit.getText().toString();
|
||||||
|
if (sex.equals("男") || sex.equals("女")){
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
//向服务器发送信息
|
||||||
|
OkHttpClient okHttpClient = new OkHttpClient();
|
||||||
|
FormBody.Builder builder = new FormBody.Builder();
|
||||||
|
builder.add("username",username);
|
||||||
|
builder.add("name",name);
|
||||||
|
builder.add("phone",phone);
|
||||||
|
builder.add("sex",sex);
|
||||||
|
builder.add("age",age);
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/edit")
|
||||||
|
.post(builder.build())
|
||||||
|
.build();
|
||||||
|
Response response = okHttpClient.newCall(request).execute();
|
||||||
|
String json = response.body().string();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Result result = gson.fromJson(json, Result.class);
|
||||||
|
if (result.getCode()==0){
|
||||||
|
SharedPreferences.Editor editor = getSharedPreferences("data", MODE_PRIVATE).edit();
|
||||||
|
editor.putString("name", name);
|
||||||
|
editor.apply();
|
||||||
|
Intent intent = new Intent(EditImformationActivity.this, SettingActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(EditImformationActivity.this, "修改成功", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(EditImformationActivity.this, "修改失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(EditImformationActivity.this,"好像出问题了",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}else{
|
||||||
|
Toast.makeText(EditImformationActivity.this, "性别只能填男或女", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hbue.entity.Result;
|
||||||
|
|
||||||
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意见反馈页面
|
||||||
|
*/
|
||||||
|
public class FeedbackActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);//取消标题栏
|
||||||
|
setContentView(R.layout.activity_feedback);
|
||||||
|
|
||||||
|
View back = findViewById(R.id.feedback_back);
|
||||||
|
back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
// Intent intent = new Intent(FeedbackActivity.this, SettingActivity.class);
|
||||||
|
// startActivity(intent);
|
||||||
|
FeedbackActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//获取提交按钮
|
||||||
|
View submit = findViewById(R.id.submit_feedback);
|
||||||
|
submit.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
//获取编辑框内容
|
||||||
|
EditText feedback_content = (EditText) findViewById(R.id.feedback_content);
|
||||||
|
String content = feedback_content.getText().toString();
|
||||||
|
//如果内容不为空则提交
|
||||||
|
if (content.length() != 0) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
FormBody.Builder builder = new FormBody.Builder();
|
||||||
|
//从本地获取用户名
|
||||||
|
SharedPreferences preferences = getSharedPreferences("data", MODE_PRIVATE);
|
||||||
|
String username = preferences.getString("username", "");
|
||||||
|
builder.add("username", username);
|
||||||
|
builder.add("content", content);
|
||||||
|
//发送post请求
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/feedback")
|
||||||
|
.post(builder.build())
|
||||||
|
.build();
|
||||||
|
Response response = client.newCall(request).execute();
|
||||||
|
String json = response.body().string();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Result result = gson.fromJson(json, Result.class);
|
||||||
|
//跳转页面
|
||||||
|
Intent intent = new Intent(FeedbackActivity.this, SettingActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(FeedbackActivity.this,result.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(FeedbackActivity.this,"好像出错了",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(FeedbackActivity.this, "内容为空无法提交", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,166 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.viewpager.widget.PagerAdapter;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 需求变更-引导页
|
||||||
|
*/
|
||||||
|
public class GuideActivity extends AppCompatActivity implements View.OnClickListener {
|
||||||
|
|
||||||
|
private ViewPager mViewPager;
|
||||||
|
//容器
|
||||||
|
private List<View> mList = new ArrayList<>();
|
||||||
|
private View view1, view2, view3, view4;
|
||||||
|
//小圆点
|
||||||
|
private ImageView point1, point2, point3, point4;
|
||||||
|
//跳过
|
||||||
|
private Button btn_back;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消界面的标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_guide);
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始化View
|
||||||
|
private void initView() {
|
||||||
|
|
||||||
|
point1 = (ImageView) findViewById(R.id.point1);
|
||||||
|
point2 = (ImageView) findViewById(R.id.point2);
|
||||||
|
point3 = (ImageView) findViewById(R.id.point3);
|
||||||
|
point4 = (ImageView) findViewById(R.id.point4);
|
||||||
|
|
||||||
|
btn_back = (Button) findViewById(R.id.btn_back);
|
||||||
|
btn_back.setOnClickListener(this);
|
||||||
|
//设置默认图片
|
||||||
|
setPointImg(true, false, false, false);
|
||||||
|
mViewPager = (ViewPager) findViewById(R.id.mViewPager);
|
||||||
|
view1 = View.inflate(this, R.layout.pager_item_one, null);
|
||||||
|
view2 = View.inflate(this, R.layout.pager_item_two, null);
|
||||||
|
view3 = View.inflate(this, R.layout.pager_item_three, null);
|
||||||
|
view4 = View.inflate(this, R.layout.pager_item_four, null);
|
||||||
|
view4.findViewById(R.id.btn_start).setOnClickListener(this);
|
||||||
|
|
||||||
|
mList.add(view1);
|
||||||
|
mList.add(view2);
|
||||||
|
mList.add(view3);
|
||||||
|
mList.add(view4);
|
||||||
|
|
||||||
|
//设置适配器
|
||||||
|
mViewPager.setAdapter(new GuideAdapter());
|
||||||
|
|
||||||
|
//监听ViewPager滑动
|
||||||
|
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//pager切换
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
switch (position) {
|
||||||
|
case 0:
|
||||||
|
setPointImg(true, false, false, false);
|
||||||
|
btn_back.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
setPointImg(false, true, false, false);
|
||||||
|
btn_back.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
setPointImg(false, false, true, false);
|
||||||
|
btn_back.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
setPointImg(false, false, false, true);
|
||||||
|
btn_back.setVisibility(View.GONE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.btn_start:
|
||||||
|
case R.id.btn_back:
|
||||||
|
startActivity(new Intent(this, MenuActivity.class));
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GuideAdapter extends PagerAdapter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isViewFromObject(View view, Object object) {
|
||||||
|
return view == object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object instantiateItem(ViewGroup container, int position) {
|
||||||
|
((ViewPager) container).addView(mList.get(position));
|
||||||
|
return mList.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||||
|
((ViewPager) container).removeView(mList.get(position));
|
||||||
|
//super.destroyItem(container, position, object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置小圆点的选中效果
|
||||||
|
private void setPointImg(boolean isCheck1, boolean isCheck2, boolean isCheck3, boolean isCheck4) {
|
||||||
|
if (isCheck1) {
|
||||||
|
point1.setBackgroundResource(R.drawable.point_on);
|
||||||
|
} else {
|
||||||
|
point1.setBackgroundResource(R.drawable.point_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isCheck2) {
|
||||||
|
point2.setBackgroundResource(R.drawable.point_on);
|
||||||
|
} else {
|
||||||
|
point2.setBackgroundResource(R.drawable.point_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isCheck3) {
|
||||||
|
point3.setBackgroundResource(R.drawable.point_on);
|
||||||
|
} else {
|
||||||
|
point3.setBackgroundResource(R.drawable.point_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isCheck4) {
|
||||||
|
point4.setBackgroundResource(R.drawable.point_on);
|
||||||
|
} else {
|
||||||
|
point4.setBackgroundResource(R.drawable.point_off);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,155 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.hbue.entity.Result;
|
||||||
|
|
||||||
|
import org.litepal.LitePal;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消界面的标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
|
//获取登录按钮对象
|
||||||
|
Button loginButton = (Button) findViewById(R.id.LoginButton);
|
||||||
|
loginButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
//获取文本框中的账号密码
|
||||||
|
EditText usernameEdit = (EditText) findViewById(R.id.UserNameEdit);
|
||||||
|
EditText passWordEdit = (EditText) findViewById(R.id.PassWordEdit);
|
||||||
|
String username = usernameEdit.getText().toString();
|
||||||
|
String password = passWordEdit.getText().toString();
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
FormBody.Builder parms = new FormBody.Builder();
|
||||||
|
parms.add("username", username);
|
||||||
|
parms.add("password", password);
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/login")
|
||||||
|
.post(parms.build())
|
||||||
|
.build();
|
||||||
|
Response response = client.newCall(request).execute();
|
||||||
|
//使用gson将数据转换为result对象
|
||||||
|
String data = response.body().string();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Result result = gson.fromJson(data, Result.class);
|
||||||
|
if (result.getCode() == 0) {
|
||||||
|
//如果响应码为0,代表登录成功
|
||||||
|
Intent intent = new Intent(LoginActivity.this, GuideActivity.class);
|
||||||
|
//将登录状态改为true
|
||||||
|
SharedPreferences.Editor editor = getSharedPreferences("data", MODE_PRIVATE).edit();
|
||||||
|
editor.putBoolean("isLogin", true);
|
||||||
|
editor.putString("username", username);
|
||||||
|
editor.apply();
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
//从服务器端同步收藏
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
OkHttpClient okHttpClient = new OkHttpClient();
|
||||||
|
Request request1 = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/getCollected?username=" + username)
|
||||||
|
.build();
|
||||||
|
Response response1 = okHttpClient.newCall(request1).execute();
|
||||||
|
String json = response1.body().string();
|
||||||
|
Gson gson1 = new Gson();
|
||||||
|
Result result1 = gson1.fromJson(json, Result.class);
|
||||||
|
//List<HashMap<String,String>> data1 = (List<HashMap<String, String>>) result1.getData();
|
||||||
|
//System.out.println(data1);
|
||||||
|
Object obj = result1.getData();
|
||||||
|
List<Map<String, String>> list = gson1.fromJson(obj.toString(), new TypeToken<List<Map<String, String>>>(){}.getType());
|
||||||
|
System.out.println(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
|
||||||
|
//从服务器端同步学习记录
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
OkHttpClient okHttpClient = new OkHttpClient();
|
||||||
|
Request request1 = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/getStudied?username=" + username)
|
||||||
|
.build();
|
||||||
|
Response response1 = okHttpClient.newCall(request1).execute();
|
||||||
|
String json = response1.body().string();
|
||||||
|
Gson gson1 = new Gson();
|
||||||
|
Result result1 = gson1.fromJson(json, Result.class);
|
||||||
|
Object obj = result1.getData();
|
||||||
|
List<Map<String, String>> list = gson1.fromJson(obj.toString(), new TypeToken<List<Map<String, String>>>(){}.getType());
|
||||||
|
System.out.println(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} else {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(LoginActivity.this, "账号或密码错误!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
e.printStackTrace();
|
||||||
|
Toast.makeText(LoginActivity.this, "服务器未响应", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//设置注册按钮的功能
|
||||||
|
Button signup = (Button) findViewById(R.id.SignUpButton);
|
||||||
|
signup.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第一页
|
||||||
|
* 首页
|
||||||
|
*/
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消界面的标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
//设置点击开始按钮进行跳转
|
||||||
|
Button startbutton = (Button) findViewById(R.id.start);
|
||||||
|
startbutton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
SharedPreferences pref = getSharedPreferences("data", MODE_PRIVATE);
|
||||||
|
boolean isFirstUse = pref.getBoolean("isFirstUse", true);
|
||||||
|
//如果是第一次使用
|
||||||
|
if (isFirstUse) {
|
||||||
|
//跳转至登录页面
|
||||||
|
Intent intent1 = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent1);
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
//不是第一次使用,先判断是否登录
|
||||||
|
boolean isLogin = pref.getBoolean("isLogin", false);
|
||||||
|
if (isLogin) {
|
||||||
|
// Intent intent1 = new Intent(MainActivity.this, MainPageActivity.class);
|
||||||
|
// startActivity(intent1);
|
||||||
|
finish();
|
||||||
|
}else{
|
||||||
|
//跳转至登录页面
|
||||||
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.navigation.ui.AppBarConfiguration;
|
||||||
|
import androidx.navigation.ui.NavigationUI;
|
||||||
|
|
||||||
|
import com.hbue.activity.databinding.ActivityBottomBinding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无用暂留
|
||||||
|
*/
|
||||||
|
public class MainFragment extends Fragment {
|
||||||
|
|
||||||
|
//rivate ActivityBottomBinding binding;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.activity_main2, container, false);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
// super.onCreate(savedInstanceState);
|
||||||
|
//
|
||||||
|
// binding = ActivityBottomBinding.inflate(getLayoutInflater());
|
||||||
|
// setContentView(binding.getRoot());
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// BottomNavigationView navView = findViewById(R.id.nav_view);
|
||||||
|
// // Passing each menu ID as a set of Ids because each
|
||||||
|
// // menu should be considered as top level destinations.
|
||||||
|
// AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
||||||
|
// R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
|
||||||
|
// .build();
|
||||||
|
// NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_bottom);
|
||||||
|
// NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
|
||||||
|
// NavigationUI.setupWithNavController(binding.navView, navController);
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择词汇本
|
||||||
|
*/
|
||||||
|
public class MenuActivity extends AppCompatActivity {
|
||||||
|
private TextView select_cet4;
|
||||||
|
private TextView select_cet6;
|
||||||
|
private TextView select_ky;
|
||||||
|
private TextView select_dbname;
|
||||||
|
private SharedPreferences.Editor editor;
|
||||||
|
private SharedPreferences pref;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_select_data_base);
|
||||||
|
//获取选择按钮的对象
|
||||||
|
select_cet4 = (TextView) findViewById(R.id.select_cet4);
|
||||||
|
select_cet6 = (TextView) findViewById(R.id.select_cet6);
|
||||||
|
select_ky = (TextView) findViewById(R.id.select_ky);
|
||||||
|
select_dbname = (TextView) findViewById(R.id.selected_dbname);
|
||||||
|
editor = getSharedPreferences("data", MODE_PRIVATE).edit();
|
||||||
|
/**
|
||||||
|
* 为词汇本设置事件
|
||||||
|
*/
|
||||||
|
select_cet4.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
select_cet6.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
select_ky.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击继续按钮后的功能
|
||||||
|
*/
|
||||||
|
Button button_select = (Button) findViewById(R.id.button_select);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,127 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hbue.entity.Result;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
/*
|
||||||
|
注册页面
|
||||||
|
*/
|
||||||
|
public class RegisterActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消界面的标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_register);
|
||||||
|
//设置返回登录按钮的功能
|
||||||
|
Button backLoginButton = (Button) findViewById(R.id.BackLoginButton);
|
||||||
|
backLoginButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//设置注册按钮的功能
|
||||||
|
Button signUpButton = (Button) findViewById(R.id.SignUpButton);
|
||||||
|
signUpButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
//获取文本框中的数据并进行校验
|
||||||
|
EditText userNameEdit = (EditText) findViewById(R.id.UserNameEdit);
|
||||||
|
EditText passWordEdit = (EditText) findViewById(R.id.PassWordEdit);
|
||||||
|
EditText passWordAgainEdit = (EditText) findViewById(R.id.PassWordAgainEdit);
|
||||||
|
EditText phoneEdit = (EditText) findViewById(R.id.phoneEdit);
|
||||||
|
EditText nameEdit = (EditText) findViewById(R.id.nameEdit);
|
||||||
|
//获取内容
|
||||||
|
String username = userNameEdit.getText().toString();
|
||||||
|
String password = passWordEdit.getText().toString();
|
||||||
|
String passwordAgain = passWordAgainEdit.getText().toString();
|
||||||
|
String phone = phoneEdit.getText().toString();
|
||||||
|
String name = nameEdit.getText().toString();
|
||||||
|
|
||||||
|
if (username.equals("") && password.equals("") && passwordAgain.equals("") && phone.equals("") && name.equals("")) {
|
||||||
|
Toast.makeText(RegisterActivity.this, "文本框不能为空!", Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
//判断两次密码输入是否相同
|
||||||
|
if (!password.equals(passwordAgain)) {
|
||||||
|
Toast.makeText(RegisterActivity.this, "两次密码输入不相同!", Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
//向服务器发送请求
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
OkHttpClient okHttpClient = new OkHttpClient();
|
||||||
|
FormBody.Builder builder = new FormBody.Builder();
|
||||||
|
builder.add("username", username);
|
||||||
|
builder.add("password", password);
|
||||||
|
builder.add("name", name);
|
||||||
|
builder.add("phone", phone);
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
.url("http://10.0.2.2:8080/mindcard/user/register")
|
||||||
|
.post(builder.build())
|
||||||
|
.build();
|
||||||
|
Response response = okHttpClient.newCall(request).execute();
|
||||||
|
String json = response.body().string();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Result result = gson.fromJson(json, Result.class);
|
||||||
|
if (result.getCode()==1){
|
||||||
|
//如果失败
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(RegisterActivity.this,result.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
//注册成功
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
//跳转至登录页
|
||||||
|
Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
Toast.makeText(RegisterActivity.this,"注册成功",Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(RegisterActivity.this, "服务器未响应", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.hbue.adapter.SettingAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他功能的活动
|
||||||
|
*/
|
||||||
|
public class SettingActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private static List<String> list = new ArrayList<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
list.add("修改个人信息");
|
||||||
|
list.add("反馈问题");
|
||||||
|
list.add("同步数据");
|
||||||
|
list.add("退出登录");
|
||||||
|
}
|
||||||
|
|
||||||
|
// private String[] settings = {
|
||||||
|
// "更换单词本","已学习","收藏","待复习","学习历程"
|
||||||
|
// };
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消界面的标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_setting);
|
||||||
|
SettingAdapter settingAdapter = new SettingAdapter(SettingActivity.this, R.layout.settinglist_item, list);
|
||||||
|
ListView listView = (ListView) findViewById(R.id.setting_list);
|
||||||
|
listView.setAdapter(settingAdapter);
|
||||||
|
//设置当前正在使用的用户姓名
|
||||||
|
TextView name = (TextView) findViewById(R.id.name);
|
||||||
|
SharedPreferences preferences = getSharedPreferences("data", MODE_PRIVATE);
|
||||||
|
String s = preferences.getString("name", "未登录");
|
||||||
|
name.setText(s);
|
||||||
|
|
||||||
|
ImageView backhome = (ImageView) findViewById(R.id.backhome);
|
||||||
|
backhome.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
SettingActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//设置listItem的各选项的单击功能
|
||||||
|
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
|
String s = list.get(i);
|
||||||
|
switch (s) {
|
||||||
|
case "反馈问题":
|
||||||
|
Intent intent4 = new Intent(SettingActivity.this, FeedbackActivity.class);
|
||||||
|
startActivity(intent4);//跳转到反馈页面
|
||||||
|
break;
|
||||||
|
case "同步数据":
|
||||||
|
Intent intent7 = new Intent(SettingActivity.this, SyncActivity.class);
|
||||||
|
startActivity(intent7);
|
||||||
|
break;
|
||||||
|
case "修改个人信息":
|
||||||
|
Intent intent6 = new Intent(SettingActivity.this, EditImformationActivity.class);
|
||||||
|
startActivity(intent6);
|
||||||
|
break;
|
||||||
|
case "退出登录":
|
||||||
|
//退出登录
|
||||||
|
SharedPreferences.Editor editor = getSharedPreferences("data", MODE_PRIVATE).edit();
|
||||||
|
editor.putBoolean("isLogin", false);
|
||||||
|
editor.putString("username", "");
|
||||||
|
editor.putString("name", "未登录");
|
||||||
|
editor.apply();
|
||||||
|
//跳转会登录页
|
||||||
|
Intent intent5 = new Intent(SettingActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent5);
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Toast.makeText(SettingActivity.this, "好像出问题啦!", Toast.LENGTH_SHORT).show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.hbue.activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hbue.entity.Result;
|
||||||
|
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
import org.litepal.LitePal;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步数据功能
|
||||||
|
*/
|
||||||
|
public class SyncActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
//取消标题栏
|
||||||
|
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
setContentView(R.layout.activity_sync);
|
||||||
|
//设置返回图标的功能
|
||||||
|
ImageView backsetting = (ImageView) findViewById(R.id.backSetting3);
|
||||||
|
backsetting.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//将学习记录和收藏信息同步到服务器
|
||||||
|
SharedPreferences pref = getSharedPreferences("data", MODE_PRIVATE);
|
||||||
|
String username = pref.getString("username", "");//用户名
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.hbue.activity.ui.dashboard;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.Observer;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.hbue.activity.R;
|
||||||
|
import com.hbue.activity.databinding.FragmentDashboardBinding;
|
||||||
|
|
||||||
|
public class DashboardFragment extends Fragment {
|
||||||
|
|
||||||
|
private DashboardViewModel dashboardViewModel;
|
||||||
|
private FragmentDashboardBinding binding;
|
||||||
|
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
dashboardViewModel =
|
||||||
|
new ViewModelProvider(this).get(DashboardViewModel.class);
|
||||||
|
|
||||||
|
binding = FragmentDashboardBinding.inflate(inflater, container, false);
|
||||||
|
View root = binding.getRoot();
|
||||||
|
|
||||||
|
final TextView textView = binding.textDashboard;
|
||||||
|
dashboardViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(@Nullable String s) {
|
||||||
|
textView.setText(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
binding = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.hbue.activity.ui.dashboard;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
|
public class DashboardViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private MutableLiveData<String> mText;
|
||||||
|
|
||||||
|
public DashboardViewModel() {
|
||||||
|
mText = new MutableLiveData<>();
|
||||||
|
mText.setValue("This is dashboard fragment");
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveData<String> getText() {
|
||||||
|
return mText;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.hbue.activity.ui.home;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.Observer;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.hbue.activity.R;
|
||||||
|
import com.hbue.activity.databinding.FragmentHomeBinding;
|
||||||
|
|
||||||
|
public class HomeFragment extends Fragment {
|
||||||
|
|
||||||
|
private HomeViewModel homeViewModel;
|
||||||
|
private FragmentHomeBinding binding;
|
||||||
|
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
homeViewModel =
|
||||||
|
new ViewModelProvider(this).get(HomeViewModel.class);
|
||||||
|
|
||||||
|
binding = FragmentHomeBinding.inflate(inflater, container, false);
|
||||||
|
View root = binding.getRoot();
|
||||||
|
|
||||||
|
final TextView textView = binding.textHome;
|
||||||
|
homeViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(@Nullable String s) {
|
||||||
|
textView.setText(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
binding = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.hbue.activity.ui.home;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
|
public class HomeViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private MutableLiveData<String> mText;
|
||||||
|
|
||||||
|
public HomeViewModel() {
|
||||||
|
mText = new MutableLiveData<>();
|
||||||
|
mText.setValue("This is home fragment");
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveData<String> getText() {
|
||||||
|
return mText;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.hbue.activity.ui.notifications;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.Observer;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.hbue.activity.R;
|
||||||
|
import com.hbue.activity.databinding.FragmentNotificationsBinding;
|
||||||
|
|
||||||
|
public class NotificationsFragment extends Fragment {
|
||||||
|
|
||||||
|
private NotificationsViewModel notificationsViewModel;
|
||||||
|
private FragmentNotificationsBinding binding;
|
||||||
|
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
notificationsViewModel =
|
||||||
|
new ViewModelProvider(this).get(NotificationsViewModel.class);
|
||||||
|
|
||||||
|
binding = FragmentNotificationsBinding.inflate(inflater, container, false);
|
||||||
|
View root = binding.getRoot();
|
||||||
|
|
||||||
|
final TextView textView = binding.textNotifications;
|
||||||
|
notificationsViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(@Nullable String s) {
|
||||||
|
textView.setText(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
binding = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.hbue.activity.ui.notifications;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
|
public class NotificationsViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private MutableLiveData<String> mText;
|
||||||
|
|
||||||
|
public NotificationsViewModel() {
|
||||||
|
mText = new MutableLiveData<>();
|
||||||
|
mText.setValue("This is notifications fragment");
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveData<String> getText() {
|
||||||
|
return mText;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.hbue.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.hbue.activity.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置项适配器
|
||||||
|
*/
|
||||||
|
public class SettingAdapter extends ArrayAdapter<String> {
|
||||||
|
private int resourceId;
|
||||||
|
|
||||||
|
public SettingAdapter(@NonNull Context context, int resource, @NonNull List<String> objects) {
|
||||||
|
super(context, resource, objects);
|
||||||
|
resourceId = resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||||
|
String item = getItem(position);
|
||||||
|
View view = LayoutInflater.from(getContext()).inflate(resourceId, parent, false);
|
||||||
|
TextView settingName = (TextView) view.findViewById(R.id.setting_name);
|
||||||
|
settingName.setText(item);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.hbue.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果封装类
|
||||||
|
*/
|
||||||
|
public class Result {
|
||||||
|
private String msg; //结果
|
||||||
|
private int code; //结果码,0为成功,1为失败
|
||||||
|
private Object data; //返回的具体数据
|
||||||
|
|
||||||
|
public Result(String msg, int code) {
|
||||||
|
this.msg = msg;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Result(String msg, int code, Object data) {
|
||||||
|
this.msg = msg;
|
||||||
|
this.code = code;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(Object data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.hbue.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类
|
||||||
|
*/
|
||||||
|
public class User {
|
||||||
|
private String username;
|
||||||
|
private String password;
|
||||||
|
private String name;
|
||||||
|
private String sex;
|
||||||
|
private Integer age;
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
public User(String username, String password, String name, String sex, Integer age, String phone) {
|
||||||
|
this.username = username;
|
||||||
|
this.password = password;
|
||||||
|
this.name = name;
|
||||||
|
this.sex = sex;
|
||||||
|
this.age = age;
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(String sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAge() {
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(Integer age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "User{" +
|
||||||
|
"username='" + username + '\'' +
|
||||||
|
", password='" + password + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", sex='" + sex + '\'' +
|
||||||
|
", age=" + age +
|
||||||
|
", phone='" + phone + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.2 KiB |
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:state_pressed="false">
|
||||||
|
<shape>
|
||||||
|
<!--<solid android:color="#ce3d3a" />-->
|
||||||
|
<stroke android:width="1dp" android:color="@android:color/darker_gray" />
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item android:state_pressed="true">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#039BE5" />
|
||||||
|
<stroke android:width="1dp" android:color="@android:color/darker_gray" />
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</selector>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<solid android:color="#2196F3" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||||
|
<!-- 设置内边距 -->
|
||||||
|
<padding
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="7dp"
|
||||||
|
android:bottom="7dp" />
|
||||||
|
<!-- 设置圆角矩形 -->
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<!-- 输入框背景颜色 -->
|
||||||
|
<solid android:color="@color/white" ></solid>
|
||||||
|
<!-- 外边框线的粗细及其颜色 -->
|
||||||
|
<stroke
|
||||||
|
android:width="2px"
|
||||||
|
android:color="@android:color/darker_gray" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||||
|
<!-- 设置内边距 -->
|
||||||
|
<padding
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="7dp"
|
||||||
|
android:bottom="7dp" />
|
||||||
|
<!-- 设置圆角矩形 -->
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<!-- 输入框背景颜色 -->
|
||||||
|
<solid android:color="#1E88E5" ></solid>
|
||||||
|
<!-- 外边框线的粗细及其颜色 -->
|
||||||
|
<stroke
|
||||||
|
android:width="2px"
|
||||||
|
android:color="#64B5F6" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||||
|
<!-- 设置内边距 -->
|
||||||
|
<padding
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="7dp"
|
||||||
|
android:bottom="7dp" />
|
||||||
|
<!-- 设置圆角矩形 -->
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<!-- 输入框背景颜色 -->
|
||||||
|
<solid android:color="#D81B60" ></solid>
|
||||||
|
<!-- 外边框线的粗细及其颜色 -->
|
||||||
|
<stroke
|
||||||
|
android:width="2px"
|
||||||
|
android:color="#64B5F6" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||||
|
<!-- 设置内边距 -->
|
||||||
|
<padding
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="7dp"
|
||||||
|
android:bottom="7dp" />
|
||||||
|
<!-- 设置圆角矩形 -->
|
||||||
|
<corners android:radius="16dp" />
|
||||||
|
<!-- 输入框背景颜色 -->
|
||||||
|
<solid android:color="#FFB300" ></solid>
|
||||||
|
<!-- 外边框线的粗细及其颜色 -->
|
||||||
|
<stroke
|
||||||
|
android:width="2px"
|
||||||
|
android:color="#64B5F6" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
</shape>
|
||||||
|
|
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 96 KiB |
@ -0,0 +1,11 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<!-- android:fillColor="#FF000000"-->
|
||||||
|
<path
|
||||||
|
|
||||||
|
android:fillColor="#90CAF9"
|
||||||
|
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
|
||||||
|
</vector>
|
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#90CAF9"
|
||||||
|
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
|
||||||
|
<!-- android:fillColor="#FF000000"-->
|
||||||
|
</vector>
|
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
|
||||||
|
</vector>
|
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 5.5 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#1E88E5" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#1E88E5" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/white" />
|
||||||
|
<corners
|
||||||
|
android:bottomLeftRadius="25dip"
|
||||||
|
android:bottomRightRadius="25dp"
|
||||||
|
android:topLeftRadius="25dip"
|
||||||
|
android:topRightRadius="25dip" />
|
||||||
|
|
||||||
|
</shape>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#4682B4" />
|
||||||
|
<stroke android:width="1dip" android:color="#fefefe" />
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<padding android:bottom="10dp"
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="10dp"/>
|
||||||
|
</shape>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#DCDCDC" />
|
||||||
|
<stroke android:width="1dip" android:color="#fefefe" />
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<padding android:bottom="10dp"
|
||||||
|
android:left="10dp"
|
||||||
|
android:right="10dp"
|
||||||
|
android:top="10dp"/>
|
||||||
|
</shape>
|
After Width: | Height: | Size: 5.7 KiB |
@ -0,0 +1,33 @@
|
|||||||
|
<?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"
|
||||||
|
android:id="@+id/container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="?attr/actionBarSize">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
android:id="@+id/nav_view"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="?android:attr/windowBackground"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:menu="@menu/bottom_nav_menu" />
|
||||||
|
|
||||||
|
<!-- <fragment-->
|
||||||
|
<!-- android:id="@+id/nav_host_fragment_activity_bottom"-->
|
||||||
|
<!-- android:name="com.hbue.activity.MainFragment"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- app:defaultNavHost="true"-->
|
||||||
|
<!-- app:layout_constraintBottom_toTopOf="@id/nav_view"-->
|
||||||
|
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||||
|
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
|
<!-- app:navGraph="@navigation/mobile_navigation" />-->
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,33 @@
|
|||||||
|
<?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"
|
||||||
|
android:id="@+id/container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="?attr/actionBarSize">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
android:id="@+id/nav_view"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="?android:attr/windowBackground"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:menu="@menu/bottom_nav_menu" />
|
||||||
|
|
||||||
|
<!-- <fragment-->
|
||||||
|
<!-- android:id="@+id/nav_host_fragment_activity_bottom"-->
|
||||||
|
<!-- android:name="com.hbue.activity.MainFragment"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- app:defaultNavHost="true"-->
|
||||||
|
<!-- app:layout_constraintBottom_toTopOf="@id/nav_view"-->
|
||||||
|
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||||
|
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
|
<!-- app:navGraph="@navigation/mobile_navigation" />-->
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backSetting"
|
||||||
|
android:layout_width="46dp"
|
||||||
|
android:layout_height="46dp"
|
||||||
|
android:src="@drawable/backlast">
|
||||||
|
</ImageView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="收藏列表"
|
||||||
|
android:textSize="38dp"
|
||||||
|
android:gravity="center">
|
||||||
|
</TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/studiedList2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
</ListView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,136 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backSetting2"
|
||||||
|
android:layout_width="38dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:src="@drawable/backlast"></ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal|center_vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="修改信息"
|
||||||
|
android:textSize="28dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="用户名:"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/update_username"
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="36dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="姓名:"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/update_name"
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:background="@drawable/et_sharp"></EditText>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="电话:"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/update_phone"
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:background="@drawable/et_sharp"></EditText>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="性别:"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/update_sex"
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:background="@drawable/et_sharp"></EditText>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="年龄:"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/update_age"
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:background="@drawable/et_sharp"></EditText>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/updateButton"
|
||||||
|
android:layout_width="380dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:text="确认修改"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="36dp"></Button>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/feedback_back"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@drawable/backlast"
|
||||||
|
android:layout_gravity="left"></ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="反馈问题"
|
||||||
|
android:textSize="32dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/black"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/feedback_content"
|
||||||
|
android:layout_width="380dp"
|
||||||
|
android:layout_height="380dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/et_sharp"></EditText>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/submit_feedback"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="提交"
|
||||||
|
android:textSize="42dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/button_select_db"></Button>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/mViewPager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/point1"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/point2"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/point3"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_marginEnd="10dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/point4"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:layout_marginEnd="25dp"
|
||||||
|
android:background="@drawable/et_sharp"
|
||||||
|
android:text="跳过"
|
||||||
|
android:textColor="@android:color/background_dark"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backSetting"
|
||||||
|
android:layout_width="46dp"
|
||||||
|
android:layout_height="46dp"
|
||||||
|
android:src="@drawable/backlast">
|
||||||
|
</ImageView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="已学习"
|
||||||
|
android:textSize="38dp"
|
||||||
|
android:gravity="center">
|
||||||
|
</TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/studiedList"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
</ListView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<!--使用线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="#F5F5F5">
|
||||||
|
|
||||||
|
<!--标题-->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/TitleText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="25dp"
|
||||||
|
android:text="登录"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="italic"
|
||||||
|
android:textColor="#808080"
|
||||||
|
android:textSize="30dp" />
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/UserNameLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<!--用户名输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/UserNameEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入用户名"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/PassWordLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<!--密码输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/PassWordEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入用户密码"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/LayoutButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--登录按钮-->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/LoginButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/translucent_button"
|
||||||
|
android:text="登 录"
|
||||||
|
android:textSize="24dp" />
|
||||||
|
|
||||||
|
<!--注册按钮-->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/SignUpButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/translucent_button"
|
||||||
|
android:text="注 册"
|
||||||
|
android:textSize="24dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,33 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--软件名-->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="431dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:text="食谱"
|
||||||
|
android:textColor="#F44336"
|
||||||
|
android:textSize="52sp"
|
||||||
|
android:typeface="serif"></TextView>
|
||||||
|
|
||||||
|
<!--开始按钮-->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/start"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/startbutton"
|
||||||
|
android:text="开始"
|
||||||
|
android:textSize="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
app:strokeColor="@color/teal_200" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,220 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--软件首页-->
|
||||||
|
<RelativeLayout 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"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_marginLeft="30dp"
|
||||||
|
android:src="@drawable/book"></ImageView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="53dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="当前词汇本"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="28dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/select_book"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:textColor="#1E88E5"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/now_finish_progressbar"
|
||||||
|
style="@android:style/Widget.Material.ProgressBar.Horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:max="100"
|
||||||
|
android:progress="0"
|
||||||
|
android:progressBackgroundTint="?attr/colorPrimary"
|
||||||
|
tools:targetApi="lollipop"></ProgressBar>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text="当前进度:"
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/now_all_word"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="总共单词数:"
|
||||||
|
android:textSize="14dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/now_have_finish_word"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="已背单词数:"
|
||||||
|
android:textSize="14dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:elevation="3dp"
|
||||||
|
app:cardCornerRadius="3dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="114dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="30dp">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="60dp"
|
||||||
|
android:text="还需新学"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="60dp"
|
||||||
|
android:text="还需复习"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/new_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="70dp"
|
||||||
|
android:layout_marginTop="55dp"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginLeft="120dp"
|
||||||
|
android:layout_marginTop="65dp"
|
||||||
|
android:text="词"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/review_mastered"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="55dp"
|
||||||
|
android:layout_marginRight="85dp"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="65dp"
|
||||||
|
android:layout_marginRight="65dp"
|
||||||
|
android:text="词"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/startstudyword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:background="#64B5F6"
|
||||||
|
android:elevation="3dp"
|
||||||
|
android:text="开始背单词吧!"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="25dp"
|
||||||
|
android:textStyle="bold"></Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/startstudyword2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:background="#64B5F6"
|
||||||
|
android:elevation="3dp"
|
||||||
|
android:text="进行回顾"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:textStyle="bold"></Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/startstudyword3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:background="#64B5F6"
|
||||||
|
android:elevation="3dp"
|
||||||
|
android:text="进行练习"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:textStyle="bold"></Button>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<include layout="@layout/activity_bottom"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,87 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:text="制定学习计划"
|
||||||
|
android:textSize="30dp"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:layout_gravity="center_horizontal"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/now_book"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="当前单词本:"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="319dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="110dp"
|
||||||
|
android:layout_height="139dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginLeft="0dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="每日计划:"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/study_num"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="49dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:layout_marginTop="67dp"
|
||||||
|
android:background="@drawable/et_sharp"
|
||||||
|
android:hint="请输入整数(个)"></EditText>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="114dp"
|
||||||
|
android:layout_height="182dp"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="完成天数:"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/study_day"
|
||||||
|
android:layout_width="114dp"
|
||||||
|
android:layout_height="182dp"
|
||||||
|
android:layout_marginLeft="120dp"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/plan_but"
|
||||||
|
android:layout_width="360dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="#64B5F6"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="确定计划"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="28dp"
|
||||||
|
>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--测试界面-->
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backHome"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/backlast"></ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="单词测试"
|
||||||
|
android:textSize="30dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/practice_image"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:src="@drawable/fail"></ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/practice_sentence"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="例句"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="28dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/testSentence"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="请填写空白处的单词"
|
||||||
|
android:textSize="20dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="240dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/anwser"
|
||||||
|
android:layout_width="320dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:hint="请输入答案"
|
||||||
|
android:background="@drawable/et_sharp"
|
||||||
|
android:layout_marginTop="40dp"></EditText>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/submit_answer"
|
||||||
|
android:layout_width="360dp"
|
||||||
|
android:layout_height="58dp"
|
||||||
|
android:text="确认"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="32dp"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:layout_marginTop="30dp"></Button>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/answer_result"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:layout_marginTop="20dp"></TextView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/nextPracticeWord"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="下一个"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:textSize="32dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="#039BE5"></Button>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,155 @@
|
|||||||
|
<?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 xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="180dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/wordImage"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@drawable/book"></ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/word"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="英语单词"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="36dp"></TextView>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/collect"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/collect"></ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/phone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="音标"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/sound"
|
||||||
|
android:layout_width="22dp"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:src="@drawable/trumpet"></ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/means"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="英语意思"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<!--例句-->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="例句"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="21dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sentence"
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="例句"
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<!--同义词-->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="同义词"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="21dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sameWord"
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="同义词"
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<!--词组-->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="词组"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="21dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordGroup"
|
||||||
|
android:layout_width="350dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="词组"
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="0dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/nextWord"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:text="下一个"
|
||||||
|
android:background="#81D4FA"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
></Button>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,202 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!--使用线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="#F5F5F5">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--标题-->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/TitleText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:text="注册"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="italic"
|
||||||
|
android:textColor="#808080"
|
||||||
|
android:textSize="30dp" />
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/UserNameLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--用户名输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/UserNameEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入用户名"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/PassWordLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--密码输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/PassWordEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入密码"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/PasswordAgainLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--二次密码输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/PassWordAgainEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="再次输入密码"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/phoneLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--联系方式输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/phoneEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入联系方式"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/nameLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--姓名输入-->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/nameEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/translucent_edit"
|
||||||
|
android:hint="输入用户名称"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--嵌套线性布局-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ButtonLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!--立即注册按钮-->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/SignUpButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/translucent_button"
|
||||||
|
android:text="立即注册"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="24dp" />
|
||||||
|
|
||||||
|
<!--返回登录按钮-->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/BackLoginButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/translucent_button"
|
||||||
|
android:text="返回登录"
|
||||||
|
android:textSize="24dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backSetting"
|
||||||
|
android:layout_width="46dp"
|
||||||
|
android:layout_height="46dp"
|
||||||
|
android:src="@drawable/backlast">
|
||||||
|
</ImageView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="待复习"
|
||||||
|
android:textSize="38dp"
|
||||||
|
android:gravity="center">
|
||||||
|
</TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/studiedList1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
</ListView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,189 @@
|
|||||||
|
<?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"
|
||||||
|
android:id="@+id/linearLayout4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/topView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:gravity="center|center_vertical"
|
||||||
|
android:text="选择词汇本"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30sp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:text="当前单词库"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<!-- app:srcCompat="@android:drawable/btn_star_big_on"-->
|
||||||
|
<ImageView
|
||||||
|
android:src="@drawable/book"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/selected_dbname"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="英语四级单词"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--用作分割线-->
|
||||||
|
<View
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#ddd" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:text="全部单词库"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:src="@drawable/book"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="英语四级单词"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/select_cet4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:text="选择"
|
||||||
|
android:textColor="#fff" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#ddd" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:src="@drawable/book"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="英语六级单词"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/select_cet6"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:text="选择"
|
||||||
|
android:textColor="#fff" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#ddd" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:src="@drawable/book"
|
||||||
|
android:layout_width="28dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="考研英语单词"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/select_ky"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:text="选择"
|
||||||
|
android:textColor="#fff" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#ddd" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_select"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="继续"
|
||||||
|
android:textSize="24dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="#64B5F6">
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -0,0 +1,66 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backhome"
|
||||||
|
android:layout_width="38dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:src="@drawable/backlast"
|
||||||
|
android:layout_gravity="left">
|
||||||
|
</ImageView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="其他功能"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center_horizontal|center_vertical"></TextView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="90dp"
|
||||||
|
android:layout_height="90dp"
|
||||||
|
android:src="@drawable/peaple"
|
||||||
|
android:layout_gravity="center"></ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="当前用户:"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:gravity="center_vertical"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="未登录"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:gravity="center_vertical"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/setting_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backStudied"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/backlast">
|
||||||
|
</ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="180dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/word2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="单词"
|
||||||
|
android:textSize="48dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="center"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/phone2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="音标"
|
||||||
|
android:textSize="32dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="中文意思"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="left"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cword1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="例句"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="left"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sentence1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="同义词"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="left"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sameWord1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="词组"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="left"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordgroup1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="18dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backSetting3"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/backlast"></ImageView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="数据同步"
|
||||||
|
android:textSize="30dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/collected_sync"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:text="同步收藏信息"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="50dp"></Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/studied_sync"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:text="同步学习记录"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/button_select_db"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="50dp"></Button>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,162 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--测试界面-->
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backHome"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/backlast"></ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="单词回顾"
|
||||||
|
android:textSize="30dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordIstesting"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:text="单词"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="46dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sentence"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="例句"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="24dp"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/testSentence"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="请回忆中文意思"
|
||||||
|
android:textSize="20dp"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
<!--单词意思显示区域-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordmean"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="单词意思"
|
||||||
|
android:textSize="28dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_gravity="center">
|
||||||
|
</TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sameWordTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="同义词:"
|
||||||
|
android:textSize="22dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_gravity="left">
|
||||||
|
</TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sameWord"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="同义词:"
|
||||||
|
android:textSize="22dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_gravity="left"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordGroupId"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="词组:"
|
||||||
|
android:textSize="22dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_gravity="left">
|
||||||
|
</TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/wordGroup"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="词组:"
|
||||||
|
android:textSize="22dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_gravity="left">
|
||||||
|
</TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/forget"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="忘记"
|
||||||
|
android:textSize="26dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/et_sharp3">
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/remember"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="认识"
|
||||||
|
android:textSize="26dp"
|
||||||
|
android:layout_marginLeft="50dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:background="@drawable/et_sharp2">
|
||||||
|
</Button>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/nextTestWord"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:text="下一个"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:textSize="32dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="#039BE5"></Button>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.dashboard.DashboardFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_dashboard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.home.HomeFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_home"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.notifications.NotificationsFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_notifications"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/guide04">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_start"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginBottom="38dp"
|
||||||
|
android:background="@drawable/button_bg"
|
||||||
|
android:paddingStart="25dp"
|
||||||
|
android:paddingEnd="25dp"
|
||||||
|
android:text="立即体验"
|
||||||
|
android:textColor="#039BE5" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/guide01"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/guide03">
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|