diff --git a/doc/老人手机辅助--需求构思及描述-0.1.docx b/doc/老人手机辅助--需求构思及描述-0.1.docx deleted file mode 100644 index 8384a7d..0000000 Binary files a/doc/老人手机辅助--需求构思及描述-0.1.docx and /dev/null differ diff --git a/doc/老人手机辅助-软件需求规格说明书-1.0.docx b/doc/老人手机辅助-软件需求规格说明书-1.0.docx deleted file mode 100644 index 2464244..0000000 Binary files a/doc/老人手机辅助-软件需求规格说明书-1.0.docx and /dev/null differ diff --git a/doc/老人手机辅助-软件需求规格说明书-1.3.docx b/doc/老人手机辅助-软件需求规格说明书-1.3.docx new file mode 100644 index 0000000..b992f81 Binary files /dev/null and b/doc/老人手机辅助-软件需求规格说明书-1.3.docx differ diff --git a/doc/老人手机辅助-需求构思及描述.-1.3.docx b/doc/老人手机辅助-需求构思及描述.-1.3.docx new file mode 100644 index 0000000..b9d3257 Binary files /dev/null and b/doc/老人手机辅助-需求构思及描述.-1.3.docx differ diff --git a/model/老人手机辅助--软件需求模型-1.0.vsdx b/model/老人手机辅助--软件需求模型-1.0.vsdx deleted file mode 100644 index d3b7af6..0000000 Binary files a/model/老人手机辅助--软件需求模型-1.0.vsdx and /dev/null differ diff --git a/model/老人手机辅助-软件需求模型-1.3.vsdx b/model/老人手机辅助-软件需求模型-1.3.vsdx new file mode 100644 index 0000000..41481b9 Binary files /dev/null and b/model/老人手机辅助-软件需求模型-1.3.vsdx differ diff --git a/src/Start2/.gitignore b/src/Start2/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/src/Start2/.gitignore @@ -0,0 +1,14 @@ +*.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 diff --git a/src/Start2/.idea/codeStyles/Project.xml b/src/Start2/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/src/Start2/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/src/Start2/.idea/gradle.xml b/src/Start2/.idea/gradle.xml new file mode 100644 index 0000000..ac6b0ae --- /dev/null +++ b/src/Start2/.idea/gradle.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/src/Start2/.idea/jarRepositories.xml b/src/Start2/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/src/Start2/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Start2/.idea/misc.xml b/src/Start2/.idea/misc.xml new file mode 100644 index 0000000..37a7509 --- /dev/null +++ b/src/Start2/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Start2/.idea/runConfigurations.xml b/src/Start2/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/src/Start2/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/Start2/app/.gitignore b/src/Start2/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/src/Start2/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/src/Start2/app/build.gradle b/src/Start2/app/build.gradle new file mode 100644 index 0000000..7abe8cd --- /dev/null +++ b/src/Start2/app/build.gradle @@ -0,0 +1,36 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + applicationId "com.example.start2" + minSdkVersion 24 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.1' + implementation 'androidx.navigation:navigation-fragment:2.1.0' + implementation 'androidx.navigation:navigation-ui:2.1.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + +} \ No newline at end of file diff --git a/src/Start2/app/proguard-rules.pro b/src/Start2/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/src/Start2/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/src/Start2/app/src/androidTest/java/com/example/start2/ExampleInstrumentedTest.java b/src/Start2/app/src/androidTest/java/com/example/start2/ExampleInstrumentedTest.java new file mode 100644 index 0000000..d6113d5 --- /dev/null +++ b/src/Start2/app/src/androidTest/java/com/example/start2/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.start2; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.start2", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/src/Start2/app/src/main/AndroidManifest.xml b/src/Start2/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3cb839d --- /dev/null +++ b/src/Start2/app/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Start2/app/src/main/java/com/example/start2/FirstFragment.java b/src/Start2/app/src/main/java/com/example/start2/FirstFragment.java new file mode 100644 index 0000000..728d198 --- /dev/null +++ b/src/Start2/app/src/main/java/com/example/start2/FirstFragment.java @@ -0,0 +1,34 @@ +package com.example.start2; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; + +public class FirstFragment extends Fragment { + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_first, container, false); + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + view.findViewById(R.id.button_first).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(FirstFragment.this) + .navigate(R.id.action_FirstFragment_to_SecondFragment); + } + }); + } +} \ No newline at end of file diff --git a/src/Start2/app/src/main/java/com/example/start2/MainActivity.java b/src/Start2/app/src/main/java/com/example/start2/MainActivity.java new file mode 100644 index 0000000..7a017fc --- /dev/null +++ b/src/Start2/app/src/main/java/com/example/start2/MainActivity.java @@ -0,0 +1,81 @@ +package com.example.start2; + +import android.annotation.SuppressLint; +import android.content.DialogInterface; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; + +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import android.view.View; + +import android.view.Menu; +import android.view.MenuItem; +import android.widget.EditText; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + Toolbar toolbar = findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + FloatingActionButton fab = findViewById(R.id.fab); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(Intent.ACTION_DIAL); + Uri data = Uri.parse("tel:" + "15130867646"); + intent.setData(data); + startActivity(intent); + } + }); + + + + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + public void showDialog(View view) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle("录入号码"); + builder.setMessage("录入成功"); + builder.setPositiveButton("我知道了", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + } + }); + AlertDialog dialog = builder.create(); + dialog.show(); + } + + +} \ No newline at end of file diff --git a/src/Start2/app/src/main/java/com/example/start2/SecondFragment.java b/src/Start2/app/src/main/java/com/example/start2/SecondFragment.java new file mode 100644 index 0000000..3e0a50b --- /dev/null +++ b/src/Start2/app/src/main/java/com/example/start2/SecondFragment.java @@ -0,0 +1,34 @@ +package com.example.start2; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; + +public class SecondFragment extends Fragment { + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_second, container, false); + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + view.findViewById(R.id.button_second).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(SecondFragment.this) + .navigate(R.id.action_SecondFragment_to_FirstFragment); + } + }); + } +} \ No newline at end of file diff --git a/src/Start2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/Start2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/src/Start2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Start2/app/src/main/res/drawable/ic_launcher_background.xml b/src/Start2/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/src/Start2/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Start2/app/src/main/res/layout/activity_main.xml b/src/Start2/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..85ab523 --- /dev/null +++ b/src/Start2/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + +