Compare commits
11 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1dda9db3f3 | 3 years ago |
|
|
03fcb23a68 | 3 years ago |
|
|
df0e701f90 | 3 years ago |
|
|
e411d14bef | 3 years ago |
|
|
230b82f838 | 3 years ago |
|
|
06088d3f02 | 3 years ago |
|
|
2ada7a0594 | 3 years ago |
|
|
d21dfc8aa4 | 3 years ago |
|
|
237f9097a8 | 3 years ago |
|
|
7dfb0df511 | 3 years ago |
|
|
dd61b11964 | 3 years ago |
@ -0,0 +1,2 @@
|
||||
https://pewxn3zi7:1928374655shigo@bdgit.educoder.net
|
||||
https://pewxn3zi7:1928374655shigo@bdgit.educoder.net
|
||||
|
After Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 121 KiB |
@ -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 @@
|
||||
/build
|
||||
@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.example.cauc_route_assistant'
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.cauc_route_assistant"
|
||||
minSdk 28
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.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,26 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
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.example.cauc_route_assistant", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.CAUC_Route_Assistant"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".CompanionActivity2"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".CompanionActivity1"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RemindActivity2"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RemindActivity1"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".SQLiteHelperActivity"
|
||||
android:exported="true">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RouteActivity4"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RouteActivity3"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RouteActivity2"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RouteActivity1"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".LoginActivity"
|
||||
android:exported="true">
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<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>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,84 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class CompanionActivity1 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_seven;
|
||||
private ImageButton btn_nvg_eight;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_companion1);
|
||||
|
||||
Intent intent1 = new Intent(this, CompanionActivity1.class);
|
||||
Intent intent2 = new Intent(this, CompanionActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent4 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent5 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
|
||||
btn_nvg_seven = findViewById(R.id.btn_nvg_seven);
|
||||
btn_nvg_eight = findViewById(R.id.btn_nvg_eight);
|
||||
|
||||
|
||||
btn_nvg_seven.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_eight.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class CompanionActivity2 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_seven;
|
||||
private ImageButton btn_nvg_eight;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_companion2);
|
||||
|
||||
Intent intent1 = new Intent(this, CompanionActivity1.class);
|
||||
Intent intent2 = new Intent(this, CompanionActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent4 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent5 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
|
||||
btn_nvg_seven = findViewById(R.id.btn_nvg_seven);
|
||||
btn_nvg_eight = findViewById(R.id.btn_nvg_eight);
|
||||
|
||||
|
||||
btn_nvg_seven.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_eight.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.example.cauc_route_assistant.DataBase;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.example.cauc_route_assistant.bean.UserInfo;
|
||||
|
||||
public class SQLLiteDBHelper extends SQLiteOpenHelper {
|
||||
|
||||
private static final String DB_NAME = "user.db";
|
||||
private static final String TABLE_NAME = "USER_INFO";
|
||||
private static final int DB_VERSION = 1;
|
||||
private static SQLLiteDBHelper mHelper = null;
|
||||
private SQLiteDatabase mRDB = null;
|
||||
private SQLiteDatabase mWDB = null;
|
||||
|
||||
private SQLLiteDBHelper(@Nullable Context context) {
|
||||
super(context, DB_NAME, null, DB_VERSION);
|
||||
}
|
||||
|
||||
public static SQLLiteDBHelper getInstance(Context context) {
|
||||
if (mHelper == null) {
|
||||
mHelper = new SQLLiteDBHelper(context);
|
||||
}
|
||||
return mHelper;
|
||||
}
|
||||
|
||||
public SQLiteDatabase openReadLink() {
|
||||
if (mRDB == null || !mRDB.isOpen()) {
|
||||
mRDB = mHelper.getReadableDatabase();
|
||||
}
|
||||
return mRDB;
|
||||
}
|
||||
|
||||
public SQLiteDatabase openWriteLink() {
|
||||
if (mWDB == null || !mWDB.isOpen()) {
|
||||
mWDB = mHelper.getWritableDatabase();
|
||||
}
|
||||
return mWDB;
|
||||
}
|
||||
|
||||
public void closeLink() {
|
||||
if (mRDB != null && mRDB.isOpen()) {
|
||||
mRDB.close();
|
||||
mRDB = null;
|
||||
}
|
||||
if (mWDB != null && mWDB.isOpen()) {
|
||||
mWDB.close();
|
||||
mWDB = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase sqLiteDatabase) {
|
||||
String sql = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (" +
|
||||
"number INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," +
|
||||
"password VARCHAR NOT NULL," +
|
||||
"isRememberNumber INTEGER NOT NULL," +
|
||||
"isRememberPassword INTEGER NOT NULL);";
|
||||
sqLiteDatabase.execSQL(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
|
||||
|
||||
}
|
||||
|
||||
public long insert(UserInfo userInfo) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("number", userInfo.number);
|
||||
values.put("password", userInfo.password);
|
||||
values.put("isRememberNumber", userInfo.isRememberNumber);
|
||||
values.put("isRememberPassword", userInfo.isRememberPassword);
|
||||
return mWDB.insert(TABLE_NAME, null, values);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class RemindActivity1 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_five;
|
||||
private ImageButton btn_nvg_six;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_remind1);
|
||||
|
||||
Intent intent1 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent2 = new Intent(this, RemindActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent4 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent5 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
|
||||
btn_nvg_five = findViewById(R.id.btn_nvg_five);
|
||||
btn_nvg_six = findViewById(R.id.btn_nvg_six);
|
||||
|
||||
|
||||
btn_nvg_five.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_six.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class RemindActivity2 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_five;
|
||||
private ImageButton btn_nvg_six;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_remind2);
|
||||
|
||||
Intent intent1 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent2 = new Intent(this, RemindActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent4 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent5 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
|
||||
btn_nvg_five = findViewById(R.id.btn_nvg_five);
|
||||
btn_nvg_six = findViewById(R.id.btn_nvg_six);
|
||||
|
||||
|
||||
btn_nvg_five.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_six.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,220 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ListView;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.cauc_route_assistant.adapter.RouteBaseAdapter;
|
||||
import com.example.cauc_route_assistant.bean.Route;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class RouteActivity1 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_one;
|
||||
private ImageButton btn_nvg_two;
|
||||
private ImageButton btn_nvg_three;
|
||||
private ImageButton btn_nvg_four;
|
||||
private Button btn_sort;
|
||||
private Button btn_clear;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
private long mExitTime;
|
||||
|
||||
private SharedPreferences route;
|
||||
private SharedPreferences.Editor routeEditor;
|
||||
|
||||
public static List<Route> routeList = new ArrayList<Route>();
|
||||
|
||||
List<Time> array = new ArrayList<Time>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_route1);
|
||||
|
||||
Intent intent1 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent2 = new Intent(this, RouteActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity3.class);
|
||||
Intent intent4 = new Intent(this, RouteActivity4.class);
|
||||
Intent intent5 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent6 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent7 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
btn_nvg_one = findViewById(R.id.btn_nvg_one);
|
||||
btn_nvg_two = findViewById(R.id.btn_nvg_two);
|
||||
btn_nvg_three = findViewById(R.id.btn_nvg_three);
|
||||
btn_nvg_four = findViewById(R.id.btn_nvg_four);
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
|
||||
route = getSharedPreferences("route", Context.MODE_PRIVATE);
|
||||
routeEditor = route.edit();
|
||||
|
||||
btn_nvg_one.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_two.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_three.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_four.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
ListView lv_route = findViewById(R.id.lv_route);
|
||||
// routeList.add(new Route("早八", new Time(8, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(10, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
// routeList.add(new Route("早八", new Time(8, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(23, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
// routeList.add(new Route("早八", new Time(8, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(10, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
// routeList.add(new Route("早八", new Time(8, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(2, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
// routeList.add(new Route("早八", new Time(8, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(4, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
// routeList.add(new Route("早八", new Time(9, 0, 0), new Time(9, 35, 0), "南四"));
|
||||
// routeList.add(new Route("34", new Time(10, 05, 0), new Time(11, 40, 0), "南四"));
|
||||
|
||||
//routeEditor.putStringSet()
|
||||
|
||||
RouteBaseAdapter adapter = new RouteBaseAdapter(this, routeList);
|
||||
lv_route.setAdapter(adapter);
|
||||
|
||||
lv_route.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.anime_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
System.out.println("修改");
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
System.out.println("删除");
|
||||
routeList.remove(i);
|
||||
lv_route.setAdapter(adapter);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
}
|
||||
});
|
||||
|
||||
btn_sort = findViewById(R.id.btn_sort);
|
||||
|
||||
btn_sort.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
routeList.sort(new Comparator<Route>() {
|
||||
@Override
|
||||
public int compare(Route route, Route t1) {
|
||||
int hour1 = route.beginTime.getHours();
|
||||
int hour2 = t1.beginTime.getHours();
|
||||
int min1 = route.beginTime.getMinutes();
|
||||
int min2 = t1.beginTime.getMinutes();
|
||||
if (hour1 < hour2) {
|
||||
return -1;
|
||||
}
|
||||
if (hour1 > hour2) {
|
||||
return 1;
|
||||
}
|
||||
if (hour1 == hour2) {
|
||||
if (min1 < min2) {
|
||||
return -1;
|
||||
}
|
||||
if (min1 > min2) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
lv_route.setAdapter(adapter);
|
||||
}
|
||||
});
|
||||
|
||||
btn_clear = findViewById(R.id.btn_clearAll);
|
||||
|
||||
btn_clear.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
routeList.removeAll(routeList);
|
||||
lv_route.setAdapter(adapter);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent6);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent7);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class RouteActivity2 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_one;
|
||||
private ImageButton btn_nvg_two;
|
||||
private ImageButton btn_nvg_three;
|
||||
private ImageButton btn_nvg_four;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_route2);
|
||||
|
||||
Intent intent1 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent2 = new Intent(this, RouteActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity3.class);
|
||||
Intent intent4 = new Intent(this, RouteActivity4.class);
|
||||
Intent intent5 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent6 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent7 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
btn_nvg_one = findViewById(R.id.btn_nvg_one);
|
||||
btn_nvg_two = findViewById(R.id.btn_nvg_two);
|
||||
btn_nvg_three = findViewById(R.id.btn_nvg_three);
|
||||
btn_nvg_four = findViewById(R.id.btn_nvg_four);
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
|
||||
btn_nvg_one.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_two.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_three.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_four.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent6);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent7);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,209 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.Intent;
|
||||
import android.icu.util.Calendar;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TimePicker;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.cauc_route_assistant.bean.Route;
|
||||
|
||||
import java.sql.Time;
|
||||
|
||||
public class RouteActivity3 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_one;
|
||||
private ImageButton btn_nvg_two;
|
||||
private ImageButton btn_nvg_three;
|
||||
private ImageButton btn_nvg_four;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
private Button btn_addCourse;
|
||||
private Button btn_addBeginTime;
|
||||
private Button btn_addEndTime;
|
||||
|
||||
private TextView tv_beginTime;
|
||||
private TextView tv_endTime;
|
||||
private EditText et_course;
|
||||
private EditText et_location;
|
||||
|
||||
private int bhour;
|
||||
private int bminute;
|
||||
private int ehour;
|
||||
private int eminute;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_route3);
|
||||
|
||||
Intent intent1 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent2 = new Intent(this, RouteActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity3.class);
|
||||
Intent intent4 = new Intent(this, RouteActivity4.class);
|
||||
Intent intent5 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent6 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent7 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
btn_nvg_one = findViewById(R.id.btn_nvg_one);
|
||||
btn_nvg_two = findViewById(R.id.btn_nvg_two);
|
||||
btn_nvg_three = findViewById(R.id.btn_nvg_three);
|
||||
btn_nvg_four = findViewById(R.id.btn_nvg_four);
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
|
||||
btn_nvg_one.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_two.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_three.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_four.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_addCourse = findViewById(R.id.btn_addCourse);
|
||||
btn_addBeginTime = findViewById(R.id.btn_addBeginTime);
|
||||
btn_addEndTime = findViewById(R.id.btn_addEndTime);
|
||||
|
||||
tv_beginTime = findViewById(R.id.tv_beginTime);
|
||||
tv_endTime = findViewById(R.id.tv_endTime);
|
||||
et_course = findViewById(R.id.et_course);
|
||||
et_location = findViewById(R.id.et_location);
|
||||
|
||||
btn_addCourse.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String name = et_course.getText().toString();
|
||||
Time bt = new Time(bhour, bminute, 0);
|
||||
Time et = new Time(ehour, eminute, 0);
|
||||
String location = et_location.getText().toString();
|
||||
RouteActivity1.routeList.add(new Route(name, bt, et, location));
|
||||
Toast.makeText(RouteActivity3.this,"课程添加成功!",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
btn_addBeginTime.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
testTimePickerDialog(1);
|
||||
}
|
||||
});
|
||||
|
||||
btn_addEndTime.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
testTimePickerDialog(2);
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent6);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent7);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private void testTimePickerDialog(int flag) {
|
||||
int mHourOfDay, mMinute;
|
||||
Calendar c = Calendar.getInstance();
|
||||
mHourOfDay = c.get(Calendar.HOUR_OF_DAY);
|
||||
mMinute = c.get(Calendar.MINUTE);
|
||||
new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {
|
||||
|
||||
@Override
|
||||
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
||||
Time time = new Time(hourOfDay, minute, 0);
|
||||
//switch (flag) {
|
||||
// case 1:
|
||||
// tv_beginTime.setText(time.toString());
|
||||
// break;
|
||||
// case 2:
|
||||
// tv_endTime.setText(time.toString());
|
||||
//}
|
||||
switch (flag) {
|
||||
case 1:
|
||||
tv_beginTime.setText(time.toString());
|
||||
bhour = hourOfDay;
|
||||
bminute = minute;
|
||||
break;
|
||||
case 2:
|
||||
tv_endTime.setText(time.toString());
|
||||
ehour = hourOfDay;
|
||||
eminute = minute;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, mHourOfDay, mMinute, true).show();
|
||||
|
||||
}
|
||||
|
||||
private int getHour(String str) {
|
||||
int ret = 0;
|
||||
ret += (int)str.toCharArray()[0] * 10;
|
||||
ret += (int)str.toCharArray()[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
private int getMinute(String str) {
|
||||
int ret = 0;
|
||||
ret += (int)str.toCharArray()[3] * 10;
|
||||
ret += (int)str.toCharArray()[4];
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.cauc_route_assistant.bean.Route;
|
||||
|
||||
import java.sql.Time;
|
||||
|
||||
public class RouteActivity4 extends AppCompatActivity {
|
||||
|
||||
private ImageButton btn_nvg_one;
|
||||
private ImageButton btn_nvg_two;
|
||||
private ImageButton btn_nvg_three;
|
||||
private ImageButton btn_nvg_four;
|
||||
private ImageButton btn_function_menu;
|
||||
|
||||
private CheckBox cb_kuaidi;
|
||||
private CheckBox cb_chuanggao;
|
||||
private CheckBox cb_xizao;
|
||||
|
||||
private Button btn_addToRoute;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_route4);
|
||||
|
||||
Intent intent1 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent2 = new Intent(this, RouteActivity2.class);
|
||||
Intent intent3 = new Intent(this, RouteActivity3.class);
|
||||
Intent intent4 = new Intent(this, RouteActivity4.class);
|
||||
Intent intent5 = new Intent(this, RouteActivity1.class);
|
||||
Intent intent6 = new Intent(this, RemindActivity1.class);
|
||||
Intent intent7 = new Intent(this, CompanionActivity1.class);
|
||||
|
||||
btn_nvg_one = findViewById(R.id.btn_nvg_one);
|
||||
btn_nvg_two = findViewById(R.id.btn_nvg_two);
|
||||
btn_nvg_three = findViewById(R.id.btn_nvg_three);
|
||||
btn_nvg_four = findViewById(R.id.btn_nvg_four);
|
||||
btn_function_menu = findViewById(R.id.btn_function_menu);
|
||||
|
||||
cb_kuaidi = findViewById(R.id.cb_kuaidi);
|
||||
cb_chuanggao = findViewById(R.id.cb_chuanggao);
|
||||
cb_xizao = findViewById(R.id.cb_xizao);
|
||||
|
||||
btn_addToRoute = findViewById(R.id.btn_addToRoute);
|
||||
|
||||
btn_nvg_one.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent1);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_two.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent2);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_three.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent3);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
btn_nvg_four.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(intent4);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
btn_addToRoute.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Time empty = new Time(0, 0, 0);
|
||||
boolean flag = false;
|
||||
if (cb_kuaidi.isChecked()) {
|
||||
RouteActivity1.routeList.add(new Route("取快递", empty, empty, "驿站"));
|
||||
flag = true;
|
||||
}
|
||||
if (cb_chuanggao.isChecked()) {
|
||||
RouteActivity1.routeList.add(new Route("创高", empty, empty, "操场"));
|
||||
flag = true;
|
||||
}
|
||||
if (cb_xizao.isChecked()) {
|
||||
RouteActivity1.routeList.add(new Route("洗浴", empty, empty, "浴室"));
|
||||
flag = true;
|
||||
}
|
||||
if (flag) {
|
||||
Toast.makeText(RouteActivity4.this, "已添加至日程", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
btn_function_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
View popView = getLayoutInflater().inflate(R.layout.menu_pop,null);
|
||||
|
||||
PopupWindow popupWindow = new PopupWindow(popView ,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
true );
|
||||
//popupWindow.setBackgroundDrawable(getResources().getDrawable(R.mipmap.pic));
|
||||
Button button1 = popView.findViewById(R.id.button1);
|
||||
Button button2 = popView.findViewById(R.id.button2);
|
||||
Button button3 = popView.findViewById(R.id.button3);
|
||||
button1.setOnClickListener(view1 -> {
|
||||
startActivity(intent5);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button2.setOnClickListener(view1 -> {
|
||||
startActivity(intent6);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
button3.setOnClickListener(view1 -> {
|
||||
startActivity(intent7);
|
||||
overridePendingTransition(0, 0);
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
popupWindow.showAsDropDown(view);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.example.cauc_route_assistant;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.cauc_route_assistant.DataBase.SQLLiteDBHelper;
|
||||
import com.example.cauc_route_assistant.bean.UserInfo;
|
||||
|
||||
public class SQLiteHelperActivity extends AppCompatActivity {
|
||||
|
||||
private EditText et_number;
|
||||
private EditText et_password;
|
||||
private Button btn_admit;
|
||||
private Button btn_delete;
|
||||
|
||||
SQLLiteDBHelper mHelper;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_sqlite_helper);
|
||||
|
||||
et_number = findViewById(R.id.et_dbNumberEditor);
|
||||
et_password = findViewById(R.id.et_dbPasswordEditor);
|
||||
btn_admit = findViewById(R.id.btn_dbAdmit);
|
||||
btn_delete = findViewById(R.id.btn_dbDelete);
|
||||
|
||||
btn_admit.setOnClickListener(new View.OnClickListener() {
|
||||
String number = et_number.getText().toString();
|
||||
String password = et_password.getText().toString();
|
||||
UserInfo user = null;
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
user = new UserInfo(number, password, false, false);
|
||||
if (mHelper.insert(user) > 0) {
|
||||
Toast.makeText(SQLiteHelperActivity.this, "添加成功", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else {
|
||||
Toast.makeText(SQLiteHelperActivity.this, "此学号已存在", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
btn_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
mHelper = SQLLiteDBHelper.getInstance(this);
|
||||
mHelper.openWriteLink();
|
||||
mHelper.openReadLink();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mHelper.closeLink();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.example.cauc_route_assistant.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.cauc_route_assistant.R;
|
||||
import com.example.cauc_route_assistant.bean.Route;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RouteBaseAdapter extends BaseAdapter {
|
||||
|
||||
private Context mContext;
|
||||
private List<Route> mRouteList;
|
||||
|
||||
public RouteBaseAdapter(Context mContext, List<Route> mRouteList) {
|
||||
this.mContext = mContext;
|
||||
this.mRouteList = mRouteList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mRouteList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return mRouteList.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View convertView, ViewGroup parent) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.item_route, null);
|
||||
TextView tv_name = view.findViewById(R.id.tv_routeName);
|
||||
TextView tv_time = view.findViewById(R.id.tv_routeTime);
|
||||
TextView tv_location = view.findViewById(R.id.tv_routeLocation);
|
||||
|
||||
Route route = mRouteList.get(i);
|
||||
tv_name.setText(route.getName());
|
||||
tv_time.setText(route.getTime());
|
||||
tv_location.setText(route.getLocation());
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.example.cauc_route_assistant.bean;
|
||||
|
||||
import java.sql.Time;
|
||||
|
||||
public class Route {
|
||||
|
||||
private String name;
|
||||
public Time beginTime;
|
||||
public Time endTime;
|
||||
private String location;
|
||||
|
||||
public Route(String n, String loc) {
|
||||
this.name = n;
|
||||
this.location = loc;
|
||||
}
|
||||
|
||||
public Route(String n, Time bt, Time et, String loc) {
|
||||
this.beginTime = bt;
|
||||
this.endTime = et;
|
||||
this.name = n;
|
||||
this.location = loc;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return beginTime.toString() + "~" + endTime.toString();
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.example.cauc_route_assistant.bean;
|
||||
|
||||
public class UserInfo {
|
||||
|
||||
public String number;
|
||||
public String password;
|
||||
public boolean isRememberNumber;
|
||||
public boolean isRememberPassword;
|
||||
|
||||
public UserInfo(){}
|
||||
|
||||
public UserInfo(String number, String password, boolean isRememberNumber, boolean isRememberPassword) {
|
||||
this.number = number;
|
||||
this.password = password;
|
||||
this.isRememberNumber = isRememberNumber;
|
||||
this.isRememberPassword = isRememberPassword;
|
||||
}
|
||||
|
||||
public String toNumberString() {
|
||||
return "UserInfo{" +
|
||||
"number=" + number +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String toPasswordString() {
|
||||
return "UserInfo{" +
|
||||
"password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.example.cauc_route_assistant.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.cauc_route_assistant.R;
|
||||
|
||||
public class DataBaseActivity extends AppCompatActivity {
|
||||
|
||||
private static String mDataBaseName = "";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_data_base);
|
||||
|
||||
mDataBaseName = getFilesDir() + "/mDataBase.db";
|
||||
SQLiteDatabase db = openOrCreateDatabase(mDataBaseName, Context.MODE_PRIVATE, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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: 1.1 KiB |
|
After Width: | Height: | Size: 770 B |
|
After Width: | Height: | Size: 991 B |
|
After Width: | Height: | Size: 710 B |
|
After Width: | Height: | Size: 885 B |
|
After Width: | Height: | Size: 614 B |
|
After Width: | Height: | Size: 953 B |
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 865 B |
|
After Width: | Height: | Size: 892 B |
|
After Width: | Height: | Size: 646 B |
|
After Width: | Height: | Size: 965 B |
|
After Width: | Height: | Size: 703 B |
|
After Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 140 B |
@ -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>
|
||||
|
After Width: | Height: | Size: 856 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 719 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,185 @@
|
||||
<?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"
|
||||
tools:context=".CompanionActivity1">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/function_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/user_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_seven"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_seven_on"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_eight"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_eight_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="40dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="50dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="上课"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="驿站"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="用餐"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="创高"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="购物"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="20dp"
|
||||
android:text="洗浴"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_home1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="128dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="单项"
|
||||
android:textColor="@color/design_default_color_on_secondary"
|
||||
android:textSize="20dp"
|
||||
android:translationY="65dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_home2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="132dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="单项"
|
||||
android:textColor="@color/design_default_color_on_secondary"
|
||||
android:textSize="20dp"
|
||||
android:translationY="112dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_home3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="132dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="单项"
|
||||
android:textColor="@color/design_default_color_on_secondary"
|
||||
android:textSize="20dp"
|
||||
android:translationY="159dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,80 @@
|
||||
<?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"
|
||||
tools:context=".CompanionActivity1">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/function_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/user_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_seven"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_seven_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_eight"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_eight_on"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/TextView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="邀请1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="50dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="邀请2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="90dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".util.DataBaseActivity">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_dbNumberEditor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="学号"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_dbPasswordEditor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="密码"></EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_dbAdmit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="生成/覆盖"></Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_dbDelete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="删除"></Button>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".LoginActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#505050"
|
||||
android:text="登录到航大行程助手"
|
||||
android:textSize="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="100dp"
|
||||
android:textStyle="bold"></TextView>
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/input"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:hint="学号"
|
||||
android:paddingLeft="7dp"></EditText>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="21dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/input"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:hint="初始密码为学号"
|
||||
android:paddingLeft="7dp"></EditText>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/invisible"
|
||||
android:background="#FFFFFF"
|
||||
android:layout_toRightOf="@+id/et_password"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="19dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="56dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="5dp">
|
||||
<CheckBox
|
||||
android:id="@+id/cb_rememberAccount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="记住学号"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_rememberPassword"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="记住密码"
|
||||
android:textColor="#505050"></CheckBox>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/next"
|
||||
android:background="#FFFFFF"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:translationY="200dp"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,18 @@
|
||||
<?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=".MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
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,80 @@
|
||||
<?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"
|
||||
tools:context=".RemindActivity1">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/function_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/user_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_five"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_five_on"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_six"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_six_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/TextView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="提醒1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="50dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="提醒2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="90dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,90 @@
|
||||
<?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"
|
||||
tools:context=".RemindActivity1">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/function_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/user_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_five"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_five_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_six"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_six_on"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/TextView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="账户"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="50dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="隐私"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="90dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/multiAutoCompleteTextView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="返回登陆界面"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dp"
|
||||
android:translationY="130dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,108 @@
|
||||
<?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"
|
||||
tools:context=".RouteActivity1">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv_route"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="50dp"></ListView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/function_menu"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/user_menu"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btm_nvg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_one"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_one_on"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_two"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_two_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_three"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_three_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_four"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_four_off"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sort"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:text="生成最优顺序"></Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_clearAll"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:text="清除所有日程"></Button>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,84 @@
|
||||
<?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"
|
||||
tools:context=".RouteActivity2">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/function_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/user_menu"
|
||||
android:background="#353535"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="222222222222"></TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_one"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_one_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_two"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_two_on"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_three"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_three_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_four"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/bottom_nvg_four_off"
|
||||
android:background="#FFFFFF"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,166 @@
|
||||
<?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"
|
||||
tools:context=".RouteActivity3">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/function_menu"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/user_menu"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_course"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/input"
|
||||
android:hint="课程"
|
||||
android:paddingLeft="7dp"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/input"
|
||||
android:hint="地点"
|
||||
android:paddingLeft="7dp"></EditText>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_beginTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/input"
|
||||
android:text="开始时间"
|
||||
android:textSize="18dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="7dp"></TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_endTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/input"
|
||||
android:text="结束时间"
|
||||
android:textSize="18dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="7dp"></TextView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_addBeginTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="80dp"
|
||||
android:background="#505050"
|
||||
android:text="开始时间"></Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_addEndTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="80dp"
|
||||
android:background="#505050"
|
||||
android:text="结束时间"></Button>
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_addCourse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="#505050"
|
||||
android:text="添加课程"></Button>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_one"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_one_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_two"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_two_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_three"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_three_on"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_four"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_four_off"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,119 @@
|
||||
<?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"
|
||||
tools:context=".RouteActivity4">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="#353535"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_function_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/function_menu"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_user_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="#353535"
|
||||
android:src="@drawable/user_menu"></ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="200dp"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_kuaidi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="快递"
|
||||
android:textSize="20dp"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_chuanggao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="创高"
|
||||
android:textSize="20dp"></CheckBox>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_xizao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="洗浴"
|
||||
android:textSize="20dp"></CheckBox>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_addToRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="150dp"
|
||||
android:text="添加到行程"></Button>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_one"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_one_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_two"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_two_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_three"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_three_off"></ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_nvg_four"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF"
|
||||
android:src="@drawable/bottom_nvg_four_on"></ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".util.DataBaseActivity">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_dbNumberEditor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="学号"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_dbPasswordEditor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="密码"></EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_dbAdmit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="生成/覆盖"></Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_dbDelete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="删除"></Button>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,19 @@
|
||||
<?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"
|
||||
android:background="#FFFFFF"
|
||||
android:padding="5dp">
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="修改"/>
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="删除"/>
|
||||
|
||||
</LinearLayout>
|
||||