diff --git a/BankApp/.idea/.gitignore b/BankApp/.idea/.gitignore new file mode 100644 index 000000000..5c98b4288 --- /dev/null +++ b/BankApp/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/BankApp/.idea/.name b/BankApp/.idea/.name new file mode 100644 index 000000000..12cd6dc87 --- /dev/null +++ b/BankApp/.idea/.name @@ -0,0 +1 @@ +Bank App \ No newline at end of file diff --git a/BankApp/.idea/assetWizardSettings.xml b/BankApp/.idea/assetWizardSettings.xml new file mode 100644 index 000000000..37c417a7e --- /dev/null +++ b/BankApp/.idea/assetWizardSettings.xml @@ -0,0 +1,326 @@ + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/caches/build_file_checksums.ser b/BankApp/.idea/caches/build_file_checksums.ser new file mode 100644 index 000000000..fe88c82f1 Binary files /dev/null and b/BankApp/.idea/caches/build_file_checksums.ser differ diff --git a/BankApp/.idea/codeStyles/Project.xml b/BankApp/.idea/codeStyles/Project.xml new file mode 100644 index 000000000..3cc336b93 --- /dev/null +++ b/BankApp/.idea/codeStyles/Project.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + +
+ + + + 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/BankApp/.idea/codeStyles/codeStyleConfig.xml b/BankApp/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000..79ee123c2 --- /dev/null +++ b/BankApp/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/BankApp/.idea/compiler.xml b/BankApp/.idea/compiler.xml new file mode 100644 index 000000000..ca954db43 --- /dev/null +++ b/BankApp/.idea/compiler.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/gradle.xml b/BankApp/.idea/gradle.xml new file mode 100644 index 000000000..caca2f309 --- /dev/null +++ b/BankApp/.idea/gradle.xml @@ -0,0 +1,24 @@ + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/jarRepositories.xml b/BankApp/.idea/jarRepositories.xml new file mode 100644 index 000000000..a5f05cd8c --- /dev/null +++ b/BankApp/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml new file mode 100644 index 000000000..19981c548 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml b/BankApp/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml new file mode 100644 index 000000000..b2158ac95 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml new file mode 100644 index 000000000..553024c87 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml new file mode 100644 index 000000000..0aac26e87 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml new file mode 100644 index 000000000..220841523 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml new file mode 100644 index 000000000..62babfe75 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml new file mode 100644 index 000000000..648375606 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml new file mode 100644 index 000000000..914d233f6 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml b/BankApp/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml new file mode 100644 index 000000000..eafc05e94 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml new file mode 100644 index 000000000..9b9c75bb3 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3.xml b/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3.xml new file mode 100644 index 000000000..e040f45de --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml new file mode 100644 index 000000000..793edd40f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_core_core_1_3_2_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_core_core_1_3_2_aar.xml new file mode 100644 index 000000000..c157cb7a8 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_core_core_1_3_2_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_core_core_ktx_1_3_2_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_core_core_ktx_1_3_2_aar.xml new file mode 100644 index 000000000..deeefd94b --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_core_core_ktx_1_3_2_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml new file mode 100644 index 000000000..1fb37b399 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml new file mode 100644 index 000000000..83525ff97 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml new file mode 100644 index 000000000..015936f19 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml new file mode 100644 index 000000000..0c3c74cc0 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml new file mode 100644 index 000000000..cf7fe7edf --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml new file mode 100644 index 000000000..9354d4462 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_2_0.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_2_0.xml new file mode 100644 index 000000000..f7d64790e --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_2_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml new file mode 100644 index 000000000..6ab311e64 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_2_0_aar.xml new file mode 100644 index 000000000..bf4df0746 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml new file mode 100644 index 000000000..9df72daa6 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_2_0_aar.xml new file mode 100644 index 000000000..b34dd2c2f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_ktx_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_ktx_2_2_0_aar.xml new file mode 100644 index 000000000..07627154a --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_ktx_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_ktx_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_ktx_2_2_0_aar.xml new file mode 100644 index 000000000..54d1bea6a --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_ktx_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml new file mode 100644 index 000000000..dff2b83f6 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml new file mode 100644 index 000000000..53732c0d3 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_2_0_aar.xml new file mode 100644 index 000000000..fbadb59d8 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_2_0_aar.xml new file mode 100644 index 000000000..5a9173288 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml new file mode 100644 index 000000000..2d539e5a7 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml new file mode 100644 index 000000000..fab8f5cf5 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml new file mode 100644 index 000000000..476d06c2d --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml new file mode 100644 index 000000000..597b5a297 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_core_1_3_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_core_1_3_0_aar.xml new file mode 100644 index 000000000..ffccc5d66 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_core_1_3_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml new file mode 100644 index 000000000..81b3e0d7a --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_3_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_3_0_aar.xml new file mode 100644 index 000000000..07ba31924 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_3_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml new file mode 100644 index 000000000..61a5c5bbb --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_3_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_3_0_aar.xml new file mode 100644 index 000000000..dd9d1baab --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_3_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml new file mode 100644 index 000000000..4f3f8d195 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_2_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_2_aar.xml new file mode 100644 index 000000000..723de081b --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_2_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml new file mode 100644 index 000000000..0b4b08a24 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_3_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_3_0_aar.xml new file mode 100644 index 000000000..44a965a77 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_monitor_1_3_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml new file mode 100644 index 000000000..a39577ede --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_3_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_3_0_aar.xml new file mode 100644 index 000000000..514293e32 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_test_runner_1_3_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml new file mode 100644 index 000000000..7d668b059 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml new file mode 100644 index 000000000..0b2a6102c --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml new file mode 100644 index 000000000..37bfc64a0 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml new file mode 100644 index 000000000..95c45cb6f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml new file mode 100644 index 000000000..81f44194c --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml b/BankApp/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml new file mode 100644 index 000000000..b866755d4 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_google_android_material_material_1_1_0_aar.xml b/BankApp/.idea/libraries/Gradle__com_google_android_material_material_1_1_0_aar.xml new file mode 100644 index 000000000..16f5543df --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_google_android_material_material_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1.xml b/BankApp/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1.xml new file mode 100644 index 000000000..2b834ea2f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_6.xml b/BankApp/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_6.xml new file mode 100644 index 000000000..45500a27e --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml b/BankApp/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml new file mode 100644 index 000000000..662b001e8 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_logging_interceptor_4_8_0.xml b/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_logging_interceptor_4_8_0.xml new file mode 100644 index 000000000..87938c91d --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_logging_interceptor_4_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_8_0.xml b/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_8_0.xml new file mode 100644 index 000000000..0e146bce8 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_okio_okio_2_7_0.xml b/BankApp/.idea/libraries/Gradle__com_squareup_okio_okio_2_7_0.xml new file mode 100644 index 000000000..751ae6b1d --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_okio_okio_2_7_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_converter_gson_2_6_0.xml b/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_converter_gson_2_6_0.xml new file mode 100644 index 000000000..93d9e0ca9 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_converter_gson_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_retrofit_2_6_0.xml b/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_retrofit_2_6_0.xml new file mode 100644 index 000000000..35c1a30db --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__com_squareup_retrofit2_retrofit_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__io_mockk_mockk_1_10_0.xml b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_1_10_0.xml new file mode 100644 index 000000000..5e3864770 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_1_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__io_mockk_mockk_android_1_10_0_aar.xml b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_android_1_10_0_aar.xml new file mode 100644 index 000000000..727ac4603 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_android_1_10_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__io_mockk_mockk_common_1_10_0.xml b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_common_1_10_0.xml new file mode 100644 index 000000000..8b30ae603 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_common_1_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_1_10_0.xml b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_1_10_0.xml new file mode 100644 index 000000000..3ab49226f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_1_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_jvm_1_10_0.xml b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_jvm_1_10_0.xml new file mode 100644 index 000000000..b34aa9e8e --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__io_mockk_mockk_dsl_jvm_1_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml b/BankApp/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml new file mode 100644 index 000000000..62012eaf8 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__junit_junit_4_12.xml b/BankApp/.idea/libraries/Gradle__junit_junit_4_12.xml new file mode 100644 index 000000000..6c078d62b --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__junit_junit_4_13.xml b/BankApp/.idea/libraries/Gradle__junit_junit_4_13.xml new file mode 100644 index 000000000..6d52cfa43 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__junit_junit_4_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0.xml b/BankApp/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0.xml new file mode 100644 index 000000000..fbe96970d --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 000000000..09cf23d1b --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml new file mode 100644 index 000000000..1a77dd835 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 000000000..3d45e8e99 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml new file mode 100644 index 000000000..4f32fdef2 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_72.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_72.xml new file mode 100644 index 000000000..7929d635f --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_72.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_72.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_72.xml new file mode 100644 index 000000000..682479859 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_72.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_72.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_72.xml new file mode 100644 index 000000000..be1749dd1 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_72.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_72.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_72.xml new file mode 100644 index 000000000..45e02cd79 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_72.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_0.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_0.xml new file mode 100644 index 000000000..d2fd50f70 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_6.xml b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_6.xml new file mode 100644 index 000000000..f9c7f370c --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_koin_koin_android_2_0_1_aar.xml b/BankApp/.idea/libraries/Gradle__org_koin_koin_android_2_0_1_aar.xml new file mode 100644 index 000000000..a90f5589d --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_koin_koin_android_2_0_1_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_scope_2_0_1_aar.xml b/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_scope_2_0_1_aar.xml new file mode 100644 index 000000000..3b01fe506 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_scope_2_0_1_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_viewmodel_2_0_1_aar.xml b/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_viewmodel_2_0_1_aar.xml new file mode 100644 index 000000000..43edadc85 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_koin_koin_androidx_viewmodel_2_0_1_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/libraries/Gradle__org_koin_koin_core_2_0_1.xml b/BankApp/.idea/libraries/Gradle__org_koin_koin_core_2_0_1.xml new file mode 100644 index 000000000..b10538d14 --- /dev/null +++ b/BankApp/.idea/libraries/Gradle__org_koin_koin_core_2_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/misc.xml b/BankApp/.idea/misc.xml new file mode 100644 index 000000000..892046b8c --- /dev/null +++ b/BankApp/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/modules.xml b/BankApp/.idea/modules.xml new file mode 100644 index 000000000..c096babc7 --- /dev/null +++ b/BankApp/.idea/modules.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/modules/Bank_App.iml b/BankApp/.idea/modules/Bank_App.iml new file mode 100644 index 000000000..5a9a88b45 --- /dev/null +++ b/BankApp/.idea/modules/Bank_App.iml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/modules/app/Bank_App.app.iml b/BankApp/.idea/modules/app/Bank_App.app.iml new file mode 100644 index 000000000..ab3fa0e47 --- /dev/null +++ b/BankApp/.idea/modules/app/Bank_App.app.iml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/modules/data/Bank_App.data.iml b/BankApp/.idea/modules/data/Bank_App.data.iml new file mode 100644 index 000000000..58a40b6b0 --- /dev/null +++ b/BankApp/.idea/modules/data/Bank_App.data.iml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/modules/domain/Bank_App.domain.iml b/BankApp/.idea/modules/domain/Bank_App.domain.iml new file mode 100644 index 000000000..b72e9d6fa --- /dev/null +++ b/BankApp/.idea/modules/domain/Bank_App.domain.iml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/runConfigurations.xml b/BankApp/.idea/runConfigurations.xml new file mode 100644 index 000000000..7f68460d8 --- /dev/null +++ b/BankApp/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/BankApp/.idea/vcs.xml b/BankApp/.idea/vcs.xml new file mode 100644 index 000000000..6c0b86358 --- /dev/null +++ b/BankApp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/BankApp/app/build.gradle b/BankApp/app/build.gradle new file mode 100644 index 000000000..473e6805c --- /dev/null +++ b/BankApp/app/build.gradle @@ -0,0 +1,47 @@ +apply plugin: 'com.android.application' + +apply plugin: 'kotlin-android' + +apply plugin: 'kotlin-android-extensions' + +android { + compileSdkVersion 29 + buildToolsVersion "29.0.2" + defaultConfig { + applicationId "com.example.bankapp" + minSdkVersion 19 + targetSdkVersion 29 + 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 project(path: ':domain') + implementation project(path: ':data') + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation "org.koin:koin-androidx-scope:$koin_version" + implementation "org.koin:koin-androidx-viewmodel:$koin_version" + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3' + implementation 'com.google.android.material:material:1.1.0' + implementation 'androidx.core:core-ktx:1.2.0' + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" + + implementation 'androidx.cardview:cardview:1.0.0' + testImplementation 'junit:junit:4.13' + testImplementation "io.mockk:mockk:1.10.0" + androidTestImplementation "io.mockk:mockk-android:1.10.0" + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' +} diff --git a/BankApp/app/build/generated/source/buildConfig/debug/com/example/bankapp/BuildConfig.java b/BankApp/app/build/generated/source/buildConfig/debug/com/example/bankapp/BuildConfig.java new file mode 100644 index 000000000..b3364519a --- /dev/null +++ b/BankApp/app/build/generated/source/buildConfig/debug/com/example/bankapp/BuildConfig.java @@ -0,0 +1,12 @@ +/** + * Automatically generated file. DO NOT MODIFY + */ +package com.example.bankapp; + +public final class BuildConfig { + public static final boolean DEBUG = Boolean.parseBoolean("true"); + public static final String APPLICATION_ID = "com.example.bankapp"; + public static final String BUILD_TYPE = "debug"; + public static final int VERSION_CODE = 1; + public static final String VERSION_NAME = "1.0"; +} diff --git a/BankApp/app/proguard-rules.pro b/BankApp/app/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/BankApp/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/BankApp/app/src/main/AndroidManifest.xml b/BankApp/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..c7b518270 --- /dev/null +++ b/BankApp/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/ic_launcher-playstore.png b/BankApp/app/src/main/ic_launcher-playstore.png new file mode 100644 index 000000000..e5e2d2a5a Binary files /dev/null and b/BankApp/app/src/main/ic_launcher-playstore.png differ diff --git a/BankApp/app/src/main/ic_logo-playstore.png b/BankApp/app/src/main/ic_logo-playstore.png new file mode 100644 index 000000000..0da188ea1 Binary files /dev/null and b/BankApp/app/src/main/ic_logo-playstore.png differ diff --git a/BankApp/app/src/main/ic_logout-playstore.png b/BankApp/app/src/main/ic_logout-playstore.png new file mode 100644 index 000000000..e603e7c33 Binary files /dev/null and b/BankApp/app/src/main/ic_logout-playstore.png differ diff --git a/BankApp/app/src/main/java/com/example/bankapp/BankApp.kt b/BankApp/app/src/main/java/com/example/bankapp/BankApp.kt new file mode 100644 index 000000000..99c080d32 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/BankApp.kt @@ -0,0 +1,25 @@ +package com.example.bankapp + +import android.app.Application +import com.example.bankapp.di.AppModules +import org.koin.android.ext.koin.androidContext +import org.koin.core.context.startKoin + +class BankApp : Application() { + + override fun onCreate() { + + super.onCreate() + setupKoin() + + } + + private fun setupKoin() { + startKoin { + androidContext(this@BankApp) + modules( + AppModules.getModules() + ) + } + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/di/AppModules.kt b/BankApp/app/src/main/java/com/example/bankapp/di/AppModules.kt new file mode 100644 index 000000000..bc560dd6d --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/di/AppModules.kt @@ -0,0 +1,13 @@ +package com.example.bankapp.di + +import com.example.bankapp.di.modules.* +import org.koin.core.module.Module + +object AppModules { + fun getModules() : List = listOf( + UiModules, + NetworkingModules, + DomainModules, + UtilModules + ) +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/di/modules/DomainModules.kt b/BankApp/app/src/main/java/com/example/bankapp/di/modules/DomainModules.kt new file mode 100644 index 000000000..02c1a85fe --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/di/modules/DomainModules.kt @@ -0,0 +1,10 @@ +package com.example.bankapp.di.modules + +import com.example.domain.usecases.ListStatementsUseCase +import com.example.domain.usecases.PerformLoginUseCase +import org.koin.dsl.module + +internal val DomainModules = module { + factory { ListStatementsUseCase(repository = get()) } + factory { PerformLoginUseCase(repository = get()) } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/di/modules/NetworkingModules.kt b/BankApp/app/src/main/java/com/example/bankapp/di/modules/NetworkingModules.kt new file mode 100644 index 000000000..f0769d543 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/di/modules/NetworkingModules.kt @@ -0,0 +1,13 @@ +package com.example.bankapp.di.modules + +import com.example.data.networking.BankApi +import com.example.data.networking.base.ApiClient +import com.example.data.repositories.BankRepository +import com.example.domain.repositories.IBankRepository +import org.koin.dsl.bind +import org.koin.dsl.module + +internal val NetworkingModules = module { + single { ApiClient.createService(BankApi::class.java) } + factory { BankRepository(get()) } bind IBankRepository::class +} diff --git a/BankApp/app/src/main/java/com/example/bankapp/di/modules/UiModules.kt b/BankApp/app/src/main/java/com/example/bankapp/di/modules/UiModules.kt new file mode 100644 index 000000000..b7d8148a1 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/di/modules/UiModules.kt @@ -0,0 +1,11 @@ +package com.example.bankapp.di.modules + +import com.example.bankapp.ui.login.LoginViewModel +import com.example.bankapp.ui.statements.MainViewModel +import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.dsl.module + +val UiModules = module { + viewModel { LoginViewModel(get(), get()) } + viewModel { MainViewModel(get(), get()) } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/di/modules/UtilModules.kt b/BankApp/app/src/main/java/com/example/bankapp/di/modules/UtilModules.kt new file mode 100644 index 000000000..0a47b4f1a --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/di/modules/UtilModules.kt @@ -0,0 +1,10 @@ +package com.example.bankapp.di.modules + +import com.example.bankapp.util.SessionManager +import org.koin.dsl.module + +internal val UtilModules = module { + single { + SessionManager(get()) + } +} diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/BaseActivity.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/BaseActivity.kt new file mode 100644 index 000000000..13d203708 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/BaseActivity.kt @@ -0,0 +1,109 @@ +package com.example.bankapp.ui + +import android.content.res.Resources +import android.view.View +import android.view.WindowManager +import androidx.appcompat.app.AppCompatActivity +import com.example.bankapp.R +import com.example.bankapp.ui.dialogs.DialogBuilder +import com.example.domain.base.ExceptionTag +import com.example.domain.excecoes.UseCaseException +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch +import java.util.concurrent.TimeoutException + +abstract class BaseActivity : AppCompatActivity() { + open var viewProgressBar: View? = null + + private fun showLoading() { + window?.setFlags( + WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, + WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE + ) + viewProgressBar?.visibility = View.VISIBLE + } + + private fun hideLoading() { + window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) + viewProgressBar?.visibility = View.GONE + } + + protected open fun exibirDialogErroPadrao( + mensagem: String? = null, + excecao: Exception? = null, + acaoBotao: (() -> Unit)? = null + ) { + val mensagemDialog = obterMensagemDialogErro(mensagem, excecao) + + DialogBuilder(this).exibirDialogPadrao( + getString(R.string.erro), + mensagemDialog, + acaoBotao + ) + } + + private fun obterMensagemDialogErro( + mensagem: String?, + excecao: Exception? + ): String { + return if (mensagem.isNullOrBlank()) { + if (excecao != null) { + obterMensagemDialogErroPorExcecao(excecao) + } else { + getString(R.string.erro_nao_identificado) + } + } else { + mensagem + } + } + + private fun obterMensagemDialogErroPorExcecao( + excecao: Exception + ): String { + return when { + excecao::class.java == Resources.NotFoundException::class.java -> + getString(R.string.erro_not_found) + excecao::class.java == TimeoutException::class.java -> + getString(R.string.erro_timeout) + excecao::class.java == UseCaseException::class.java -> { + val executor = excecao as UseCaseException + when { + + executor.exceptionTag == ExceptionTag.REALIZAR_LOGIN -> + getString(R.string.erro_realizar_login) + executor.exceptionTag == ExceptionTag.LISTAR_STATEMENTS_POR_USUARIO -> + getString(R.string.erro_empresa_id) + else -> getString(R.string.erro_nao_identificado) + } + } + else -> getString(R.string.erro_nao_identificado) + } + } + + protected fun doAsyncWork( + work: suspend () -> Unit, + acaoBotaoDialogErro: (() -> Unit)? = null, + mostrarLoading: Boolean = true + ) { + GlobalScope.launch { + try { + if (mostrarLoading) { + runOnUiThread { + showLoading() + } + } + work() + } catch (e: java.lang.Exception) { + runOnUiThread { + exibirDialogErroPadrao(excecao = e, acaoBotao = acaoBotaoDialogErro) + } + } finally { + if (mostrarLoading) { + runOnUiThread { + hideLoading() + } + } + } + } + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/adapters/StatementsAdapter.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/adapters/StatementsAdapter.kt new file mode 100644 index 000000000..6dc0ef6b1 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/adapters/StatementsAdapter.kt @@ -0,0 +1,51 @@ +package com.example.bankapp.ui.adapters + +import android.content.Context +import android.graphics.Color +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView +import com.example.bankapp.R +import com.example.bankapp.util.Converters +import com.example.domain.entities.Statement +import kotlinx.android.synthetic.main.statement_item.view.* +import kotlin.math.absoluteValue + +class StatementsAdapter(private val statements: List, private val context: Context) : + RecyclerView.Adapter() { + override fun onCreateViewHolder( + parent: ViewGroup, + viewType: Int + ): StatementsAdapter.ViewHolder { + val view = LayoutInflater.from(context).inflate(R.layout.statement_item, parent, false) + return ViewHolder(view) + } + + override fun getItemCount(): Int { + return statements.size + } + + override fun onBindViewHolder(holder: StatementsAdapter.ViewHolder, position: Int) { + val statement = statements[position] + + holder.let { + holder.dataEmissaoTextView.text = Converters().converterDataddMMyyyy(statement.data!!) + holder.tituloTextView.apply { + text = statement.titulo + if (statement.valor!! < 0) this.setTextColor(Color.parseColor("#ff4d4d")) + else this.setTextColor(Color.parseColor("#32ff7e")) + } + holder.descricaoTextView.text = statement.descricao + holder.valorTextView.text = + Converters().convertToCurrency(statement.valor!!.absoluteValue) + } + } + + class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + val dataEmissaoTextView = itemView.textview_dataEmissao + val descricaoTextView = itemView.textview_descricao + val tituloTextView = itemView.textview_titulo + val valorTextView = itemView.textview_valor + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/DialogBuilder.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/DialogBuilder.kt new file mode 100644 index 000000000..a328b8cff --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/DialogBuilder.kt @@ -0,0 +1,41 @@ +package com.example.bankapp.ui.dialogs + +import android.content.Context +import com.example.bankapp.R + +class DialogBuilder(val context: Context) { + + fun exibirDialogPadrao( + titulo: String?, + mensagem: String, + acaoBotaoOk: (() -> Unit)? = null + ) { + OneButtonDialog( + context, + titulo, + formatarMensagem(mensagem), + context.getString(R.string.ok) + ) {acaoBotaoOk?.invoke()}.show() + } + + fun exibirDialogUmBotao( + titulo: String?, + mensagem: String, + titleOkCall: String, + okCall: () -> Unit + ) { + OneButtonDialog( + context, + titulo, + formatarMensagem(mensagem), + titleOkCall + ) { okCall() }.show() + } + + + + + private fun formatarMensagem(mensagem: String): String { + return mensagem.replace("\\\\n", "\n") + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/OneButtonDialog.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/OneButtonDialog.kt new file mode 100644 index 000000000..fbf024213 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/dialogs/OneButtonDialog.kt @@ -0,0 +1,40 @@ +package com.example.bankapp.ui.dialogs + +import android.app.Dialog +import android.content.Context +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.view.ViewGroup +import android.view.WindowManager +import com.example.bankapp.R +import kotlinx.android.synthetic.main.base_dialog_um_botao.* + +class OneButtonDialog( + context: Context, + titulo: String?, + mensagem: String, + textoBotaoPositivo: String, + val acaoBotaoPositivo: () -> Unit +) : Dialog(context) { + + init { + setContentView(R.layout.base_dialog_um_botao) + setCancelable(false) + + window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) + + val lp = WindowManager.LayoutParams() + lp.copyFrom(window!!.attributes) + lp.width = ViewGroup.LayoutParams.MATCH_PARENT + window?.attributes = lp + + textoTitulo.text = titulo ?: "" + textoMensagem.text = mensagem + + botaoPositivo.text = textoBotaoPositivo + botaoPositivo.setOnClickListener { + dismiss() + acaoBotaoPositivo() + } + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginActivity.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginActivity.kt new file mode 100644 index 000000000..130dc1726 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginActivity.kt @@ -0,0 +1,154 @@ +package com.example.bankapp.ui.login + +import android.content.Intent +import android.os.Bundle +import android.os.SystemClock +import android.text.Editable +import android.text.TextWatcher +import androidx.lifecycle.Observer +import com.example.bankapp.R +import com.example.bankapp.ui.BaseActivity +import com.example.bankapp.ui.dialogs.DialogBuilder +import com.example.bankapp.ui.statements.MainActivity +import com.example.bankapp.util.SessionManager +import kotlinx.android.synthetic.main.activity_login.* +import org.koin.android.ext.android.get +import org.koin.androidx.viewmodel.ext.android.viewModel + +class LoginActivity : BaseActivity() { + private var mUltimoClickBotaoLogin = 0L + private val loginViewModel: LoginViewModel by viewModel() + private val sessionManager: SessionManager = get() + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_login) + setupObservers() + setupListeners() + } + + private fun setupObservers() { + configurarObserverLoginResposta() + } + + private fun configurarObserverLoginResposta() { + loginViewModel.loginResposta.observe(this, Observer { + it?.let { resposta -> + if (resposta.contaUsuario?.id != null) { + sessionManager.salvarInformacoesUsuario( + id = resposta.contaUsuario!!.id, + agencia = resposta.contaUsuario!!.agencia, + conta = resposta.contaUsuario!!.conta, + nome = resposta.contaUsuario!!.nome, + saldo = resposta.contaUsuario!!.saldo + ) + + val statementsIntent = Intent(this, MainActivity::class.java) + startActivity(statementsIntent) + finish() + } else { + exibirMensagemErroLogin(mensagem = resposta.error?.mensagem!!) + } + } + }) + } + + private fun setupListeners() { + configurarEditTexts() + configurarProgressBar() + botao_efetuar_login.setOnClickListener { + if (SystemClock.elapsedRealtime() - mUltimoClickBotaoLogin > 1000) { + mUltimoClickBotaoLogin = SystemClock.elapsedRealtime() + if (loginViewModel.usuarioValido(loginViewModel.usuario.value) && loginViewModel.senhaValida( + loginViewModel.senha.value + ) + ) { + resetErrors() + efetuarLogin( + usuario = loginViewModel.usuario.value!!, + senha = loginViewModel.senha.value!! + ) + } else { + configurarErrosSenha(loginViewModel.senha.value) + configurarErrosUsuario(loginViewModel.usuario.value) + } + } + + } + } + + private fun configurarEditTexts() { + input_usuario.addTextChangedListener(object : TextWatcher { + override fun afterTextChanged(editavel: Editable?) { + } + + override fun beforeTextChanged(valor: CharSequence?, p1: Int, p2: Int, p3: Int) { + } + + override fun onTextChanged(valor: CharSequence?, p1: Int, p2: Int, p3: Int) { + valor?.let { + when (valor.isBlank()) { + false -> loginViewModel.usuario.postValue(valor.toString()) + else -> { + } + } + } + } + }) + input_senha.addTextChangedListener(object : TextWatcher { + override fun afterTextChanged(editavel: Editable?) {} + + override fun beforeTextChanged(valor: CharSequence?, p1: Int, p2: Int, p3: Int) {} + + override fun onTextChanged(valor: CharSequence?, p1: Int, p2: Int, p3: Int) { + valor?.let { + when (valor.isBlank()) { + false -> loginViewModel.senha.postValue(valor.toString()) + else -> Unit + } + } + } + }) + } + + fun efetuarLogin(usuario: String, senha: String) { + doAsyncWork(work = { + loginViewModel.realizarLogin( + usuario = usuario, + senha = senha + ) + }) + } + + private fun configurarProgressBar() { + viewProgressBar = progressBar + } + + private fun exibirMensagemErroLogin(mensagem: String) { + DialogBuilder(this).exibirDialogUmBotao( + getString(R.string.erro), + mensagem, + getString(R.string.ok) + ) { } + } + + private fun configurarErrosUsuario(valor: String?) { + input_usuario.error = when (valor.isNullOrBlank()) { + true -> "Campo de usuário não pode estar em branco." + false -> if (!loginViewModel.usuarioValido(valor)) "O usuário deve conter um email ou CPF válido." + else "" + } + } + + private fun configurarErrosSenha(valor: String?) { + input_senha.error = when (valor.isNullOrBlank()) { + true -> "Senha não pode estar em branco." + false -> if (!loginViewModel.senhaValida(valor)) "A senha deve conter pelo menos uma letra maiúscula." + else "" + } + } + + private fun resetErrors() { + input_usuario.error = null + input_senha.error = null + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginViewModel.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginViewModel.kt new file mode 100644 index 000000000..f03907018 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/login/LoginViewModel.kt @@ -0,0 +1,47 @@ +package com.example.bankapp.ui.login + +import android.app.Application +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel +import com.example.domain.entities.LoginRequisicao +import com.example.domain.entities.LoginResposta +import com.example.domain.usecases.PerformLoginUseCase + +class LoginViewModel(private val loginUseCase: PerformLoginUseCase, val app: Application) : + ViewModel() { + val usuario = MutableLiveData() + val senha = MutableLiveData() + val loginResposta: MutableLiveData by lazy { + MutableLiveData() + } + + suspend fun realizarLogin(usuario: String, senha: String) { + val params = + PerformLoginUseCase.Parametros(LoginRequisicao(usuario = usuario, senha = senha)) + val resposta = loginUseCase.execute(params) + + loginResposta.postValue(resposta) + } + + + fun usuarioValido(valor : String?): Boolean { + return when(valor.isNullOrBlank()){ + false -> { + when (valor.matches("-?\\d+(\\.\\d+)?".toRegex())) { + true -> valor.length == 11 + false -> valor!!.contains("@") && valor.contains(".com") + } + } + true -> false + } + } + + fun senhaValida(valor: String?): Boolean { + if(valor.isNullOrBlank()) return false + + for (character in valor!!) { + if (character.isUpperCase()) return true + } + return false + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainActivity.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainActivity.kt new file mode 100644 index 000000000..599312834 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainActivity.kt @@ -0,0 +1,96 @@ +package com.example.bankapp.ui.statements + +import android.content.Intent +import android.os.Bundle +import android.view.View +import androidx.lifecycle.Observer +import androidx.recyclerview.widget.LinearLayoutManager +import com.example.bankapp.R +import com.example.bankapp.ui.BaseActivity +import com.example.bankapp.ui.adapters.StatementsAdapter +import com.example.bankapp.ui.login.LoginActivity +import com.example.bankapp.util.Constants +import com.example.bankapp.util.Converters +import com.example.bankapp.util.Mask +import com.example.bankapp.util.SessionManager +import com.example.domain.entities.Statement +import kotlinx.android.synthetic.main.activity_main.* +import org.koin.android.ext.android.get +import org.koin.androidx.viewmodel.ext.android.viewModel + +class MainActivity : BaseActivity() { + private val sessionManager: SessionManager = get() + private val mainViewModel: MainViewModel by viewModel() + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + when (sessionManager.retornarUsuario()!!.id != Constants.Parametros.CODIGO_ID_VAZIO) { + true -> { + setContentView(R.layout.activity_main) + setUserInformation() + setupObservers() + setupListeners() + } + else -> { + val loginIntent = Intent(this, LoginActivity::class.java) + startActivity(loginIntent) + finish() + } + } + } + + private fun setUserInformation() { + mainViewModel.contaUsuario.value = sessionManager.retornarUsuario() + } + + private fun setupObservers() { + mainViewModel.listaStatements.observe(this, Observer { + it?.let { + if (it.listaStatements!!.isNotEmpty()) configurarStatementsRecyclerView(it.listaStatements) + else setupEmptyList() + } + }) + + mainViewModel.contaUsuario.observe(this, Observer { contaUsuario -> + textview_nome.text = contaUsuario?.nome + textview_conta.text = + "${contaUsuario?.conta} / ${Mask().addMask(contaUsuario?.agencia!!, "##.######-#")}" + textview_saldo.text = Converters().convertToCurrency(contaUsuario?.saldo!!) + + listStatements(idUsuario = contaUsuario!!.id!!) + }) + } + + fun setupListeners() { + viewProgressBar = progressBar + logout_button.setOnClickListener { + realizarLogout() + } + + } + + private fun configurarStatementsRecyclerView(listaStatements: List?) { + val statementsRecyclerView = recyclerview_statements + statementsRecyclerView.visibility = View.VISIBLE + statementsRecyclerView.adapter = StatementsAdapter(listaStatements!!, application) + val layoutManager = LinearLayoutManager(application) + statementsRecyclerView.layoutManager = layoutManager + } + + private fun setupEmptyList() { + + recyclerview_statements.visibility = View.GONE + textview_semResultados.visibility = View.VISIBLE + } + + private fun listStatements(idUsuario: Int) { + doAsyncWork(work = { mainViewModel.listarStatements(idUsuario = idUsuario) }) + } + + fun realizarLogout() { + sessionManager.limparDados() + val loginIntent = Intent(this, LoginActivity::class.java) + startActivity(loginIntent) + finish() + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainViewModel.kt b/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainViewModel.kt new file mode 100644 index 000000000..79e2a6a31 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/ui/statements/MainViewModel.kt @@ -0,0 +1,25 @@ +package com.example.bankapp.ui.statements + +import android.app.Application +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel +import com.example.domain.entities.ContaUsuario +import com.example.domain.entities.ListaStatements +import com.example.domain.usecases.ListStatementsUseCase + +class MainViewModel( + private val listStatementsUseCase: ListStatementsUseCase, + val app: Application +) : ViewModel() { + val contaUsuario = MutableLiveData() + val listaStatements: MutableLiveData by lazy { + MutableLiveData() + } + + suspend fun listarStatements(idUsuario: Int?) { + val params = ListStatementsUseCase.Parametros(id = idUsuario!!) + val resposta = listStatementsUseCase.execute(params) + + listaStatements.postValue(resposta) + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/util/Constants.kt b/BankApp/app/src/main/java/com/example/bankapp/util/Constants.kt new file mode 100644 index 000000000..6399cbdc0 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/util/Constants.kt @@ -0,0 +1,12 @@ +package com.example.bankapp.util + +object Constants { + object Parametros{ + const val ID : String = "ID" + const val BANK_ACCOUNT : String = "BANK_ACCOUNT" + const val NAME : String = "NAME" + const val AGENCY : String = "AGENCY" + const val BALANCE : String = "BALANCE" + const val CODIGO_ID_VAZIO : Int = -1 + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/util/Converters.kt b/BankApp/app/src/main/java/com/example/bankapp/util/Converters.kt new file mode 100644 index 000000000..9e4df2720 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/util/Converters.kt @@ -0,0 +1,23 @@ +package com.example.bankapp.util + +import java.text.NumberFormat +import java.text.SimpleDateFormat +import java.util.* + +class Converters { + fun converterDataddMMyyyy(data: String): String { + + val parser = SimpleDateFormat("yyyy-MM-dd") + val formatter = SimpleDateFormat("dd/MM/yyyy") + + return formatter.format(parser.parse(data)) + } + + fun convertToCurrency(valor: Double): String { + val formatter = NumberFormat.getCurrencyInstance() + formatter.maximumFractionDigits = 2 + formatter.currency = Currency.getInstance(Locale("pt", "BR")) + + return formatter.format(valor) + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/util/Mask.kt b/BankApp/app/src/main/java/com/example/bankapp/util/Mask.kt new file mode 100644 index 000000000..9a6ad2524 --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/util/Mask.kt @@ -0,0 +1,21 @@ +package com.example.bankapp.util + +class Mask { + fun addMask(textoAFormatar: String, mask: String): String? { + var formatado: String? = "" + var i = 0 + for (m in mask.toCharArray()) { + if (m != '#') { + formatado += m + continue + } + formatado += try { + textoAFormatar[i] + } catch (e: Exception) { + break + } + i++ + } + return formatado + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/java/com/example/bankapp/util/SessionManager.kt b/BankApp/app/src/main/java/com/example/bankapp/util/SessionManager.kt new file mode 100644 index 000000000..c73c221ee --- /dev/null +++ b/BankApp/app/src/main/java/com/example/bankapp/util/SessionManager.kt @@ -0,0 +1,52 @@ +package com.example.bankapp.util + +import android.app.Application +import android.content.SharedPreferences +import com.example.domain.entities.ContaUsuario + +class SessionManager(val app: Application) { + val sharedPreferences: String = "shared_preferences" + + fun limparDados() { + val sharedPrefs: SharedPreferences = app.getSharedPreferences(sharedPreferences, 0) + + val editor: SharedPreferences.Editor = sharedPrefs.edit() + + editor.clear() + editor.apply() + } + + fun salvarInformacoesUsuario( + id: Int?, + nome: String?, + conta: String?, + agencia: String?, + saldo: Double? + ) { + val sharedPrefs: SharedPreferences = app.getSharedPreferences(sharedPreferences, 0) + val editor = sharedPrefs.edit() + editor.putString(Constants.Parametros.NAME, nome) + editor.putString(Constants.Parametros.BANK_ACCOUNT, conta) + editor.putString(Constants.Parametros.AGENCY, agencia) + editor.putFloat(Constants.Parametros.BALANCE, saldo!!.toFloat()) + editor.putInt(Constants.Parametros.ID, id!!) + editor.apply() + } + + fun retornarUsuario(): ContaUsuario? { + val sharedPrefs: SharedPreferences = app.getSharedPreferences(sharedPreferences, 0) + val idUsuario = sharedPrefs.getInt(Constants.Parametros.ID, -1) + val conta = sharedPrefs.getString(Constants.Parametros.BANK_ACCOUNT, "") + val agencia = sharedPrefs.getString(Constants.Parametros.AGENCY, "") + val nome = sharedPrefs.getString(Constants.Parametros.NAME, "") + val saldo = sharedPrefs.getFloat(Constants.Parametros.BALANCE, 0.0f) + + return ContaUsuario( + id = idUsuario, + conta = conta, + agencia = agencia, + nome = nome, + saldo = saldo.toDouble() + ) + } +} \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/botao_formulario.xml b/BankApp/app/src/main/res/drawable/botao_formulario.xml new file mode 100644 index 000000000..a685e156e --- /dev/null +++ b/BankApp/app/src/main/res/drawable/botao_formulario.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/botao_formulario_desabilitado.xml b/BankApp/app/src/main/res/drawable/botao_formulario_desabilitado.xml new file mode 100644 index 000000000..3bf40cfab --- /dev/null +++ b/BankApp/app/src/main/res/drawable/botao_formulario_desabilitado.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/botao_formulario_habilitado.xml b/BankApp/app/src/main/res/drawable/botao_formulario_habilitado.xml new file mode 100644 index 000000000..fb06dc630 --- /dev/null +++ b/BankApp/app/src/main/res/drawable/botao_formulario_habilitado.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/dialog_background.xml b/BankApp/app/src/main/res/drawable/dialog_background.xml new file mode 100644 index 000000000..294a18e6f --- /dev/null +++ b/BankApp/app/src/main/res/drawable/dialog_background.xml @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/edit_text_background.xml b/BankApp/app/src/main/res/drawable/edit_text_background.xml new file mode 100644 index 000000000..b537fc073 --- /dev/null +++ b/BankApp/app/src/main/res/drawable/edit_text_background.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/ic_launcher_foreground.xml b/BankApp/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 000000000..a3d60f79e --- /dev/null +++ b/BankApp/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/BankApp/app/src/main/res/drawable/ic_logo_background.xml b/BankApp/app/src/main/res/drawable/ic_logo_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/BankApp/app/src/main/res/drawable/ic_logo_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BankApp/app/src/main/res/drawable/ic_logout_background.xml b/BankApp/app/src/main/res/drawable/ic_logout_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/BankApp/app/src/main/res/drawable/ic_logout_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BankApp/app/src/main/res/font/roboto_light.xml b/BankApp/app/src/main/res/font/roboto_light.xml new file mode 100644 index 000000000..28fbc0d77 --- /dev/null +++ b/BankApp/app/src/main/res/font/roboto_light.xml @@ -0,0 +1,7 @@ + + + diff --git a/BankApp/app/src/main/res/font/roboto_medium.xml b/BankApp/app/src/main/res/font/roboto_medium.xml new file mode 100644 index 000000000..59df90bc8 --- /dev/null +++ b/BankApp/app/src/main/res/font/roboto_medium.xml @@ -0,0 +1,7 @@ + + + diff --git a/BankApp/app/src/main/res/layout/activity_login.xml b/BankApp/app/src/main/res/layout/activity_login.xml new file mode 100644 index 000000000..a2ef6a4d2 --- /dev/null +++ b/BankApp/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + +