From 598d24a257b80ac74a15b4f406bfa90c585d0745 Mon Sep 17 00:00:00 2001 From: maifeeulasad Date: Thu, 11 Feb 2021 18:46:16 +0600 Subject: [PATCH 1/7] setup for stable android studio + stable android libraries//wip --- .idea/compiler.xml | 2 +- .idea/gradle.xml | 1 + .idea/misc.xml | 2 +- .idea/runConfigurations.xml | 10 ---------- .../spikeysanju/expensetracker/model/Transaction.kt | 2 +- .../expensetracker/view/dashboard/DashboardFragment.kt | 2 +- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 8 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 .idea/runConfigurations.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..61a9130 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ac6b0ae..23a89bb 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -15,6 +15,7 @@ diff --git a/.idea/misc.xml b/.idea/misc.xml index 4700283..d5d35ec 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/java/dev/spikeysanju/expensetracker/model/Transaction.kt b/app/src/main/java/dev/spikeysanju/expensetracker/model/Transaction.kt index 51e824b..abed210 100644 --- a/app/src/main/java/dev/spikeysanju/expensetracker/model/Transaction.kt +++ b/app/src/main/java/dev/spikeysanju/expensetracker/model/Transaction.kt @@ -26,7 +26,7 @@ data class Transaction( System.currentTimeMillis(), @PrimaryKey(autoGenerate = true) @ColumnInfo(name = "id") - var id: Int = 0, + var id: Int = 0 ) : Serializable { val createdAtDateFormat: String get() = DateFormat.getDateTimeInstance() diff --git a/app/src/main/java/dev/spikeysanju/expensetracker/view/dashboard/DashboardFragment.kt b/app/src/main/java/dev/spikeysanju/expensetracker/view/dashboard/DashboardFragment.kt index a2b43b8..61853a5 100644 --- a/app/src/main/java/dev/spikeysanju/expensetracker/view/dashboard/DashboardFragment.kt +++ b/app/src/main/java/dev/spikeysanju/expensetracker/view/dashboard/DashboardFragment.kt @@ -93,7 +93,7 @@ class DashboardFragment : override fun onMove( recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, - target: RecyclerView.ViewHolder, + target: RecyclerView.ViewHolder ): Boolean { return true } diff --git a/build.gradle b/build.gradle index b64ea26..bcee468 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.4.21" + ext.kotlin_version = "1.3.72" repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.0-beta04' + classpath "com.android.tools.build:gradle:4.1.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.3" classpath 'com.google.dagger:hilt-android-gradle-plugin:2.30.1-alpha' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae8dbe4..104492c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip From 0f4ddfab7244626677f3b39a6871b9df0e793f9c Mon Sep 17 00:00:00 2001 From: maifeeulasad Date: Thu, 18 Mar 2021 15:23:25 +0600 Subject: [PATCH 2/7] implemented basic bio-metric --- app/build.gradle | 3 ++ app/src/main/AndroidManifest.xml | 3 +- .../expensetracker/view/main/MainActivity.kt | 45 +++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index ce37383..ae00e97 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -96,4 +96,7 @@ dependencies { //implementation "com.google.dagger:hilt-android-testing:$hilt_ver" implementation "androidx.hilt:hilt-common:1.0.0-alpha03" implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03" + + //Bio-metric + implementation 'androidx.biometric:biometric:1.2.0-alpha03' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 637e37e..d7ce326 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,7 +3,8 @@ package="dev.spikeysanju.expensetracker"> - + Date: Fri, 19 Mar 2021 13:09:26 +0600 Subject: [PATCH 3/7] added settings in menu + settings fragment + biometric preference saved --- .idea/codeStyles/Project.xml | 15 +- .../data/local/datastore/SettingsDataStore.kt | 42 ++++ .../view/dashboard/DashboardFragment.kt | 4 + .../view/settings/SettingsFragment.kt | 39 ++++ .../view/settings/SettingsViewModel.kt | 31 +++ app/src/main/res/layout/fragment_settings.xml | 59 ++++++ app/src/main/res/menu/menu_ui.xml | 5 + app/src/main/res/navigation/nav_graph.xml | 200 ++++++++++-------- app/src/main/res/values/strings.xml | 2 + 9 files changed, 291 insertions(+), 106 deletions(-) create mode 100644 app/src/main/java/dev/spikeysanju/expensetracker/data/local/datastore/SettingsDataStore.kt create mode 100644 app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsFragment.kt create mode 100644 app/src/main/java/dev/spikeysanju/expensetracker/view/settings/SettingsViewModel.kt create mode 100644 app/src/main/res/layout/fragment_settings.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 3c7772a..208123b 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -3,18 +3,9 @@ -