commit 83aafe2b4d26488bdead5d59deea8bf1ea00ff76 Author: zrz <2944229341@qq.com> Date: Mon Jun 16 18:50:38 2025 +0800 V1 diff --git a/doc/晋碧瑶_Android SQLite增删改查项目.docx b/doc/晋碧瑶_Android SQLite增删改查项目.docx new file mode 100644 index 0000000..f083cc9 Binary files /dev/null and b/doc/晋碧瑶_Android SQLite增删改查项目.docx differ diff --git a/doc/晋碧瑶_Android SQLite增删改查项目.pptx b/doc/晋碧瑶_Android SQLite增删改查项目.pptx new file mode 100644 index 0000000..dd867fe Binary files /dev/null and b/doc/晋碧瑶_Android SQLite增删改查项目.pptx differ diff --git a/src/page118/.gitignore b/src/page118/.gitignore new file mode 100644 index 0000000..ebdd23d --- /dev/null +++ b/src/page118/.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/page118/.idea/codeStyles/Project.xml b/src/page118/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..3279b6b --- /dev/null +++ b/src/page118/.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/page118/.idea/gradle.xml b/src/page118/.idea/gradle.xml new file mode 100644 index 0000000..2a80f60 --- /dev/null +++ b/src/page118/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/src/page118/.idea/misc.xml b/src/page118/.idea/misc.xml new file mode 100644 index 0000000..f797995 --- /dev/null +++ b/src/page118/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/src/page118/.idea/runConfigurations.xml b/src/page118/.idea/runConfigurations.xml new file mode 100644 index 0000000..9b770a6 --- /dev/null +++ b/src/page118/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/page118/app/.gitignore b/src/page118/app/.gitignore new file mode 100644 index 0000000..3543521 --- /dev/null +++ b/src/page118/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/src/page118/app/.idea/.name b/src/page118/app/.idea/.name new file mode 100644 index 0000000..6408a0b --- /dev/null +++ b/src/page118/app/.idea/.name @@ -0,0 +1 @@ +page118 \ No newline at end of file diff --git a/src/page118/app/.idea/caches/build_file_checksums.ser b/src/page118/app/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000..58c642f Binary files /dev/null and b/src/page118/app/.idea/caches/build_file_checksums.ser differ diff --git a/src/page118/app/.idea/caches/gradle_models.ser b/src/page118/app/.idea/caches/gradle_models.ser new file mode 100644 index 0000000..cdb7787 Binary files /dev/null and b/src/page118/app/.idea/caches/gradle_models.ser differ diff --git a/src/page118/app/.idea/codeStyles/Project.xml b/src/page118/app/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..3279b6b --- /dev/null +++ b/src/page118/app/.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/page118/app/.idea/gradle.xml b/src/page118/app/.idea/gradle.xml new file mode 100644 index 0000000..2a80f60 --- /dev/null +++ b/src/page118/app/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml new file mode 100644 index 0000000..e86ff80 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml new file mode 100644 index 0000000..efc1e0d --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml new file mode 100644 index 0000000..3071f5b --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml new file mode 100644 index 0000000..6cbb34f --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml new file mode 100644 index 0000000..d961d30 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml new file mode 100644 index 0000000..bb9901f --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml new file mode 100644 index 0000000..5f0d60f --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml new file mode 100644 index 0000000..f07df33 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml new file mode 100644 index 0000000..bfc9199 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_core_core_1_0_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_core_core_1_0_1_aar.xml new file mode 100644 index 0000000..ba9ca8b --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_core_core_1_0_1_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml new file mode 100644 index 0000000..4367da9 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml new file mode 100644 index 0000000..40068f7 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml new file mode 100644 index 0000000..ff92146 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml new file mode 100644 index 0000000..3033bd8 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml new file mode 100644 index 0000000..3726f91 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml new file mode 100644 index 0000000..e03f1fd --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml new file mode 100644 index 0000000..d1fdc54 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml new file mode 100644 index 0000000..d94f66e --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml new file mode 100644 index 0000000..d79e439 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml new file mode 100644 index 0000000..79eecee --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml new file mode 100644 index 0000000..d9168e2 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml new file mode 100644 index 0000000..0d21cbb --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml new file mode 100644 index 0000000..76974cf --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml new file mode 100644 index 0000000..cd1c4d7 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml new file mode 100644 index 0000000..f1ba4f8 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml new file mode 100644 index 0000000..9789e89 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml new file mode 100644 index 0000000..52ad004 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml new file mode 100644 index 0000000..41131cd --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_core_1_1_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_core_1_1_0_aar.xml new file mode 100644 index 0000000..8a81a32 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_core_1_1_0_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml new file mode 100644 index 0000000..46129e6 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml new file mode 100644 index 0000000..2963bcf --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_0_aar.xml new file mode 100644 index 0000000..7a6f914 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_0_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_monitor_1_1_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_monitor_1_1_1_aar.xml new file mode 100644 index 0000000..cffd241 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_monitor_1_1_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_test_runner_1_1_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_test_runner_1_1_1_aar.xml new file mode 100644 index 0000000..87c37c4 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_test_runner_1_1_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml new file mode 100644 index 0000000..c5882ae --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml new file mode 100644 index 0000000..0ad277a --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml new file mode 100644 index 0000000..25f5f36 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml b/src/page118/app/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml new file mode 100644 index 0000000..f1786f5 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml b/src/page118/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml new file mode 100644 index 0000000..c6f3dc3 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml b/src/page118/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml new file mode 100644 index 0000000..e83f82d --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml b/src/page118/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml new file mode 100644 index 0000000..3ab6a07 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml b/src/page118/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml new file mode 100644 index 0000000..60b9d3d --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml b/src/page118/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml new file mode 100644 index 0000000..8252163 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml new file mode 100644 index 0000000..074248f --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml new file mode 100644 index 0000000..400e5c1 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml new file mode 100644 index 0000000..1b43196 --- /dev/null +++ b/src/page118/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/misc.xml b/src/page118/app/.idea/misc.xml new file mode 100644 index 0000000..f797995 --- /dev/null +++ b/src/page118/app/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/modules.xml b/src/page118/app/.idea/modules.xml new file mode 100644 index 0000000..6abd8e2 --- /dev/null +++ b/src/page118/app/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/runConfigurations.xml b/src/page118/app/.idea/runConfigurations.xml new file mode 100644 index 0000000..9b770a6 --- /dev/null +++ b/src/page118/app/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/page118/app/.idea/workspace.xml b/src/page118/app/.idea/workspace.xml new file mode 100644 index 0000000..f84827a --- /dev/null +++ b/src/page118/app/.idea/workspace.xml @@ -0,0 +1,528 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1744123347919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/build.gradle b/src/page118/app/build.gradle new file mode 100644 index 0000000..9920a3b --- /dev/null +++ b/src/page118/app/build.gradle @@ -0,0 +1,29 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 33 + buildToolsVersion "36.0.0" + defaultConfig { + applicationId "com.example.page118" + minSdkVersion 15 + targetSdkVersion 33 + 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.0.2' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' +} diff --git a/src/page118/app/gradle/wrapper/gradle-wrapper.jar b/src/page118/app/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/src/page118/app/gradle/wrapper/gradle-wrapper.jar differ diff --git a/src/page118/app/gradle/wrapper/gradle-wrapper.properties b/src/page118/app/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..c9e409e --- /dev/null +++ b/src/page118/app/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Apr 08 22:42:30 CST 2025 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/src/page118/app/gradlew b/src/page118/app/gradlew new file mode 100644 index 0000000..cccdd3d --- /dev/null +++ b/src/page118/app/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/src/page118/app/gradlew.bat b/src/page118/app/gradlew.bat new file mode 100644 index 0000000..e95643d --- /dev/null +++ b/src/page118/app/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/page118/app/local.properties b/src/page118/app/local.properties new file mode 100644 index 0000000..75572e0 --- /dev/null +++ b/src/page118/app/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Tue Apr 08 22:42:27 CST 2025 +sdk.dir=E\:\\YDYY\\desk diff --git a/src/page118/app/proguard-rules.pro b/src/page118/app/proguard-rules.pro new file mode 100644 index 0000000..6e7ffa9 --- /dev/null +++ b/src/page118/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 diff --git a/src/page118/app/src/androidTest/java/com/example/page118/ExampleInstrumentedTest.java b/src/page118/app/src/androidTest/java/com/example/page118/ExampleInstrumentedTest.java new file mode 100644 index 0000000..422b0d1 --- /dev/null +++ b/src/page118/app/src/androidTest/java/com/example/page118/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.example.page118; + +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.page118", appContext.getPackageName()); + } +} diff --git a/src/page118/app/src/main/AndroidManifest.xml b/src/page118/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f7383d6 --- /dev/null +++ b/src/page118/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/activity/AddActivity.java b/src/page118/app/src/main/java/com/example/page118/activity/AddActivity.java new file mode 100644 index 0000000..022c7a0 --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/activity/AddActivity.java @@ -0,0 +1,81 @@ +package com.example.page118.activity; + + + + + +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Spinner; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import com.example.page118.R; +import com.example.page118.db.user_data; + +public class AddActivity extends AppCompatActivity { + + private EditText name_edit,paswd_edit,age_edit; + private Spinner spinner; + private Button save_btn; + private String select_sex ="男"; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.activity_add); + init(); + } + + public void init(){ + + name_edit=(EditText)findViewById(R.id.insert_name); + paswd_edit=(EditText)findViewById(R.id.insert_paswd); + spinner=(Spinner) findViewById(R.id.insert_sex); + + //为选择性别下拉列表框添加选择事件 + spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView adapterView, View view, int i, long l) { + + //获取选择的值 + select_sex = AddActivity.this.getResources().getStringArray(R.array.sex)[i]; + } + + @Override + public void onNothingSelected(AdapterView adapterView) { + + } + }); + age_edit = findViewById(R.id.insert_age); + save_btn = findViewById(R.id.save_usermes); + save_btn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + + + //获取用户输入的用户名、密码、年纪 + String name_str = name_edit.getText().toString(); + String paswd_str = paswd_edit.getText().toString(); + String age = age_edit.getText().toString(); +// int age = Integer.parseInt(age_edit.getText().toString()); + //调用数据库操作类的插入方法 + user_data us_db= new user_data(AddActivity.this); + SQLiteDatabase sqLiteDatabase = us_db.getWritableDatabase(); + us_db.adddata(sqLiteDatabase,name_str,paswd_str,select_sex,age); + Intent intent = new Intent(AddActivity.this,DeleteActivity.class); + startActivity(intent); + + } + }); + } +} \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/activity/DeleteActivity.java b/src/page118/app/src/main/java/com/example/page118/activity/DeleteActivity.java new file mode 100644 index 0000000..47452f0 --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/activity/DeleteActivity.java @@ -0,0 +1,96 @@ +package com.example.page118.activity; + + +import android.content.DialogInterface; +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.view.Window; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.Toast; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; + +import com.example.page118.R; +import com.example.page118.db.user_data; +import com.example.page118.entity.userInfo; + +import java.util.List; + + +public class DeleteActivity extends AppCompatActivity { + + public ListView user_list; + public List list; + private SQLiteDatabase sqLiteDatabase; + // + private String[] user_mes; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.activity_delete); + user_list = findViewById(R.id.mes); + user_data users = new user_data(DeleteActivity.this); + sqLiteDatabase = users.getReadableDatabase(); + //获取从数据库查询到的数据 + list = users.querydata(sqLiteDatabase); + //把获取到的信息添加到用户名数组中 + user_mes = new String[list.size()]; + for (int i = 0; i < list.size(); i++){ + user_mes[i] = list.get(i).getUsername() + "" + + list.get(i).getPwd() + "" + + list.get(i).getAge() + "" + + list.get(i).getSex(); + } + //把用户名显示在ListView上 +// finalArryAdapter adapter = + final ArrayAdapter adapter = new ArrayAdapter( + DeleteActivity.this, androidx.appcompat.R.layout.support_simple_spinner_dropdown_item,user_mes + ); + + user_list.setAdapter(adapter); + // + user_list.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView adapterView, View view, int i, long l) { + final int id = list.get(i).getId(); + //弹出一个对话框 + new AlertDialog.Builder(DeleteActivity.this).setTitle("系统提示") + //设置显示的内容 + .setMessage("确定删除该条数据嘛?") + //添加确定按钮 + .setPositiveButton("确定", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + //删除数据操作,首先获取到id + user_data user_data = new user_data(DeleteActivity.this); + SQLiteDatabase sqLiteDatabase = user_data.getWritableDatabase(); + user_data.delete(sqLiteDatabase,id); + refresh(); + Toast.makeText(DeleteActivity.this, "删除成功", Toast.LENGTH_SHORT).show(); + } + }).setNegativeButton("更新", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + Intent intent = new Intent(DeleteActivity.this, UpdateActivity.class); + intent.putExtra("id", id); + startActivity(intent); + } + }).show(); //在按键响应事件中显示此对话框 + } + }); + } + //刷新页面方法 + private void refresh(){ + finish(); + Intent intent = new Intent(DeleteActivity.this, DeleteActivity.class); + startActivity(intent); + } +} \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/activity/MainActivity.java b/src/page118/app/src/main/java/com/example/page118/activity/MainActivity.java new file mode 100644 index 0000000..df09227 --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/activity/MainActivity.java @@ -0,0 +1,74 @@ +package com.example.page118.activity; + + + +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.page118.R; +import com.example.page118.db.user_data; + +public class MainActivity extends AppCompatActivity implements View.OnClickListener{ + + public user_data user; + public SQLiteDatabase sql_read; + private Button search_del_btn,insert_btn,update_btn; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + user_data user = new user_data(MainActivity.this); + + /*只有调用getReadableDatabase()或者 getWriteableDatabase()函数后才能返回一个SOLiteDatabase对象*/ + sql_read = user.getReadableDatabase(); + init(); +// +// //调用添加 +// SQLiteDatabase sql_date = user.getWritableDatabase(); +// user.adddata(sql_date); + } + + public void init(){ + //组件初始化 + search_del_btn=(Button)findViewById(R.id.search_delete); + insert_btn=(Button)findViewById(R.id.add); + update_btn=(Button)findViewById(R.id.update); + + + //添加监听 + search_del_btn.setOnClickListener(this); + insert_btn.setOnClickListener(this); + update_btn.setOnClickListener(this); + + } + + @Override + public void onClick(View view) { + + + switch(view.getId()){ + + case R.id.search_delete: + Intent intent1 = new Intent(MainActivity.this,DeleteActivity.class); + startActivity(intent1); + break; + case R.id.add: + Intent intent2=new Intent(MainActivity.this,AddActivity.class); + startActivity(intent2); + break; + case R.id.update: + Intent intent3= new Intent(MainActivity.this,UpdateActivity.class); + startActivity(intent3); + break; + default: + break; + } + } +} \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/activity/UpdateActivity.java b/src/page118/app/src/main/java/com/example/page118/activity/UpdateActivity.java new file mode 100644 index 0000000..0de2271 --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/activity/UpdateActivity.java @@ -0,0 +1,65 @@ +package com.example.page118.activity; + + + +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import com.example.page118.R; +import com.example.page118.db.user_data; + +public class UpdateActivity extends AppCompatActivity { + + private EditText et_account; + private EditText et_password; + private EditText et_age; + private Button btn_login; + private Button btn_register; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_update); + init(); + + Intent getData = getIntent(); + final int id = (int) getData.getSerializableExtra("id"); + + btn_login.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + + + //获取用户输入的用户名、密码、年纪 + String name_str = et_account.getText().toString(); + String paswd_str = et_password.getText().toString(); + String age = et_age.getText().toString(); +// int age = Integer.parseInt(age_edit.getText().toString()); + //调用数据库操作类的插入方法 + user_data us_db= new user_data(UpdateActivity.this); + SQLiteDatabase sqLiteDatabase = us_db.getWritableDatabase(); + us_db.update(sqLiteDatabase,id,name_str,paswd_str,"男",age); + Toast.makeText(UpdateActivity.this, "删除成功", Toast.LENGTH_SHORT).show(); + Intent intent = new Intent(UpdateActivity.this,DeleteActivity.class); + startActivity(intent); + } + }); + } + + public void init(){ + //组件初始化 + et_account = findViewById(R.id.et_account); + et_password = findViewById(R.id.et_password); + et_age = findViewById(R.id.et_age); + btn_login = findViewById(R.id.btn_login); + btn_register = findViewById(R.id.btn_register); + } +} \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/db/user_data.java b/src/page118/app/src/main/java/com/example/page118/db/user_data.java new file mode 100644 index 0000000..d7dd81f --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/db/user_data.java @@ -0,0 +1,104 @@ +package com.example.page118.db; + + + +import android.annotation.SuppressLint; +import android.content.ContentValues; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; + +import com.example.page118.entity.userInfo; + +import java.util.ArrayList; +import java.util.List; + +public class user_data extends SQLiteOpenHelper { + public user_data( Context context){ + super(context,"user.db",null,1); + } + + //数据库第一次创建时调用该方法 + @Override + public void onCreate(SQLiteDatabase sqLiteDatabase) { + + //数据库执行语句 + String sql= "create table user(id integer primary key autoincrement," + + "username varchar(20),paswd varchar(20),sex varchar(20),age varchar(20))"; + sqLiteDatabase.execSQL(sql); + + } + + //数据库版本号更新时调用 + @Override + public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { + + } + + //添加数据 + public void adddata(SQLiteDatabase sqLiteDatabase, String username, String paswd, String sex, String age){ + + ContentValues values = new ContentValues(); + + values.put("paswd",paswd); + values.put("username",username); + values.put("sex",sex); + values.put("age",age); + + sqLiteDatabase.insert("user",null,values); + sqLiteDatabase.close(); + } + + //删除数据方法 + public void delete(SQLiteDatabase sqLiteDatabase, int id){ + + /*第一个参数:表名;第二个参数:需要删除的属性名,?代表占位符;第三个参数:属性名的属性值 */ + sqLiteDatabase.delete("user","id = ?",new String[]{id + ""}); + sqLiteDatabase.close(); + } + + //更新数据 + public void update(SQLiteDatabase sqLiteDatabase, int id, String username, String paswd, String sex, String age){ + + //创建一个ContentValues 对象 + ContentValues values = new ContentValues(); + + //以键值对的形式插入 + values.put("username",username); + values.put("paswd",paswd); + values.put("sex",sex); + values.put("age",age); + + //执行修改的方法(修改username= 张三的密码) + sqLiteDatabase.update("user",values,"id = ?",new String[]{id + ""}); + sqLiteDatabase.close(); + } + + //查询数据 + public List querydata(SQLiteDatabase sqLiteDatabase) { + Cursor cursor = sqLiteDatabase.query("user", null, null, null, null, null, "id ASC"); + List list = new ArrayList(); + while (cursor.moveToNext()){ + //有问题 +// System.out.println("查询数据"); + @SuppressLint("Range") int id = cursor.getInt(cursor.getColumnIndex("id")); + String username = cursor.getString(1); + String paswd = cursor.getString(2); + String sex = cursor.getString(3); +// int age = cursor.getInt(cursor.getColumnIndex("age")); + String age = cursor.getString(4); + list.add(new userInfo(id, username, paswd, sex, age)); + System.out.println(list.get(0)); + } + + cursor.close(); + sqLiteDatabase.close(); + return list; + } + + + + + +} \ No newline at end of file diff --git a/src/page118/app/src/main/java/com/example/page118/entity/userInfo.java b/src/page118/app/src/main/java/com/example/page118/entity/userInfo.java new file mode 100644 index 0000000..8416d01 --- /dev/null +++ b/src/page118/app/src/main/java/com/example/page118/entity/userInfo.java @@ -0,0 +1,67 @@ +package com.example.page118.entity; +public class userInfo { + private Integer id; + private String username; + private String pwd; + private String sex; + private String age; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPwd() { + return pwd; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + + @Override + public String toString() { + return "userInfo{" + + "id='" + id + '\'' + + ", username='" + username + '\'' + + ", pwd='" + pwd + '\'' + + ", sex='" + sex + '\'' + + ", age='" + age + '\'' + + '}'; + } + + public userInfo(Integer id, String username, String pwd, String sex, String age) { + this.id = id; + this.username = username; + this.pwd = pwd; + this.sex = sex; + this.age = age; + } +} \ No newline at end of file diff --git a/src/page118/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/page118/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..971add5 --- /dev/null +++ b/src/page118/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/src/page118/app/src/main/res/drawable/h1.jpg b/src/page118/app/src/main/res/drawable/h1.jpg new file mode 100644 index 0000000..8168537 Binary files /dev/null and b/src/page118/app/src/main/res/drawable/h1.jpg differ diff --git a/src/page118/app/src/main/res/drawable/h2.jpg b/src/page118/app/src/main/res/drawable/h2.jpg new file mode 100644 index 0000000..13e3b16 Binary files /dev/null and b/src/page118/app/src/main/res/drawable/h2.jpg differ diff --git a/src/page118/app/src/main/res/drawable/h4.jpg b/src/page118/app/src/main/res/drawable/h4.jpg new file mode 100644 index 0000000..4558c7f Binary files /dev/null and b/src/page118/app/src/main/res/drawable/h4.jpg differ diff --git a/src/page118/app/src/main/res/drawable/h5.jpg b/src/page118/app/src/main/res/drawable/h5.jpg new file mode 100644 index 0000000..fbf8182 Binary files /dev/null and b/src/page118/app/src/main/res/drawable/h5.jpg differ diff --git a/src/page118/app/src/main/res/drawable/ic_launcher_background.xml b/src/page118/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..eed7a42 --- /dev/null +++ b/src/page118/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/page118/app/src/main/res/layout/activity_add.xml b/src/page118/app/src/main/res/layout/activity_add.xml new file mode 100644 index 0000000..8f2e657 --- /dev/null +++ b/src/page118/app/src/main/res/layout/activity_add.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + +