diff --git a/.gitignore b/.gitignore index aa724b7..b8237ed 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ .externalNativeBuild .cxx local.properties +/.idea +app/build +/build \ No newline at end of file diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index f4b3bbd..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Daily Notes \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index b589d56..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 6e5389e..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml deleted file mode 100644 index b1077fb..0000000 --- a/.idea/kotlinc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 0ad17cb..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43_[Changes]/shelved.patch deleted file mode 100644 index b6fc78a..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43_[Changes]/shelved.patch +++ /dev/null @@ -1,175 +0,0 @@ -Index: app/src/main/java/com/aditya/dailynotes/activity/InsertNoteActivity.kt -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+>package com.aditya.dailynotes.activity\r\n\r\nimport androidx.appcompat.app.AppCompatActivity\r\nimport android.os.Bundle\r\nimport android.provider.ContactsContract.CommonDataKinds.Note\r\nimport android.text.Editable\r\nimport android.text.SpannableStringBuilder\r\nimport android.widget.EditText\r\nimport android.widget.TextView\r\nimport android.widget.Toast\r\nimport androidx.core.os.bundleOf\r\nimport androidx.lifecycle.*\r\nimport com.aditya.dailynotes.R\r\nimport com.aditya.dailynotes.database.*\r\nimport com.aditya.dailynotes.databinding.ActivityInsertNoteBinding\r\nimport com.aditya.dailynotes.repository.NotesRepository\r\nimport com.aditya.dailynotes.viewModel.*\r\nimport java.text.FieldPosition\r\nimport java.time.LocalDateTime\r\nimport java.time.format.DateTimeFormatter\r\nimport java.time.format.FormatStyle\r\n\r\nclass InsertNoteActivity : AppCompatActivity() {\r\n\r\n private lateinit var binding: ActivityInsertNoteBinding\r\n private lateinit var mainViewModel: MainViewModel\r\n private lateinit var state: String\r\n private var position: Int = 0\r\n\r\n override\r\n fun onCreate(savedInstanceState: Bundle?) {\r\n super.onCreate(savedInstanceState)\r\n binding = ActivityInsertNoteBinding.inflate(layoutInflater)\r\n setContentView(binding.root)\r\n supportActionBar?.hide()\r\n\r\n state = intent.getStringExtra(\"state\").toString()\r\n position = intent.getIntExtra(\"position\", 0)\r\n\r\n val notesDatabase = NotesDatabase.getDatabase(applicationContext)\r\n val repository = NotesRepository(notesDatabase)\r\n\r\n mainViewModel = ViewModelProvider(this,\r\n MainViewModelFactory(repository))[MainViewModel::class.java]\r\n\r\n\r\n binding.insertActivityBackButton.setOnClickListener {\r\n finish()\r\n }\r\n\r\n if(state == \"update\") {\r\n val title = intent.getStringArrayListExtra(\"notes\")?.get(1).toString()\r\n val note = intent.getStringArrayListExtra(\"notes\")?.get(2).toString()\r\n\r\n binding.insertActivityNote.text = if (note != \"\") {\r\n SpannableStringBuilder(note)\r\n } else {\r\n SpannableStringBuilder(\"\")\r\n }\r\n binding.insertActivityTitle.text = if (title != \"\") {\r\n SpannableStringBuilder(title)\r\n } else {\r\n SpannableStringBuilder(\"\")\r\n }\r\n }\r\n\r\n binding.insertActivitySaveButton.setOnClickListener {\r\n if(state == \"update\") {\r\n //This give us a note data class which we have to update\r\n val note = updateNote()\r\n mainViewModel.updateNote(note)\r\n Toast.makeText(this,\"Note Successfully Updated\",Toast.LENGTH_SHORT).show()\r\n finish()\r\n\r\n } else {\r\n //This give us a note data class which we have to create\r\n val addNote = createNote()\r\n if(addNote.title == \"\" && addNote.description == \"\") {//This check that the title and description of note is empty or not\r\n finish()\r\n } else {\r\n mainViewModel.insertNote(addNote)\r\n Toast.makeText(this@InsertNoteActivity, \"Note Successfully Created\", Toast.LENGTH_SHORT).show()\r\n finish()\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n private fun updateNote(): Notes {\r\n val id : Int = Integer.parseInt(intent.getStringArrayListExtra(\"notes\")?.get(0).toString())\r\n val title = binding.insertActivityTitle.text.toString()\r\n val note = binding.insertActivityNote.text.toString()\r\n val date = intent.getStringArrayListExtra(\"notes\")?.get(3).toString()\r\n\r\n return Notes(id,title,note,date)\r\n\r\n }\r\n\r\n private fun createNote(): Notes {\r\n val title = binding.insertActivityTitle.text.toString()\r\n val note = binding.insertActivityNote.text.toString()\r\n val local= LocalDateTime.now()\r\n val dateTime = local.format(DateTimeFormatter.ofPattern(\"MMM dd, yyyy \\nhh:mm a\"))\r\n\r\n return Notes(0, title, note, dateTime)\r\n\r\n }\r\n} -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/app/src/main/java/com/aditya/dailynotes/activity/InsertNoteActivity.kt b/app/src/main/java/com/aditya/dailynotes/activity/InsertNoteActivity.kt ---- a/app/src/main/java/com/aditya/dailynotes/activity/InsertNoteActivity.kt (revision 5f325d8bf88bae53ca7f6546d08bc94bd143ece3) -+++ b/app/src/main/java/com/aditya/dailynotes/activity/InsertNoteActivity.kt (date 1669301193937) -@@ -1,16 +1,12 @@ - package com.aditya.dailynotes.activity - -+import android.os.Build - import androidx.appcompat.app.AppCompatActivity - import android.os.Bundle --import android.provider.ContactsContract.CommonDataKinds.Note --import android.text.Editable - import android.text.SpannableStringBuilder --import android.widget.EditText --import android.widget.TextView - import android.widget.Toast --import androidx.core.os.bundleOf -+import androidx.annotation.RequiresApi - import androidx.lifecycle.* --import com.aditya.dailynotes.R - import com.aditya.dailynotes.database.* - import com.aditya.dailynotes.databinding.ActivityInsertNoteBinding - import com.aditya.dailynotes.repository.NotesRepository -@@ -19,6 +15,7 @@ - import java.time.LocalDateTime - import java.time.format.DateTimeFormatter - import java.time.format.FormatStyle -+import java.util.Date - - class InsertNoteActivity : AppCompatActivity() { - -@@ -100,9 +97,12 @@ - private fun createNote(): Notes { - val title = binding.insertActivityTitle.text.toString() - val note = binding.insertActivityNote.text.toString() -- val local= LocalDateTime.now() -- val dateTime = local.format(DateTimeFormatter.ofPattern("MMM dd, yyyy \nhh:mm a")) -- -+ var local: String = "" -+ var dateTime : String = "" -+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { -+ local = LocalDateTime.now().toString() -+ dateTime = local.format(DateTimeFormatter.ofPattern("MMM dd, yyyy \nhh:mm a")) -+ } - return Notes(0, title, note, dateTime) - - } -Index: app/build.gradle -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+>plugins {\r\n id 'com.android.application'\r\n id 'org.jetbrains.kotlin.android'\r\n id 'kotlin-kapt'\r\n}\r\n\r\nandroid {\r\n namespace 'com.aditya.dailynotes'\r\n compileSdk 32\r\n\r\n defaultConfig {\r\n applicationId \"com.aditya.dailynotes\"\r\n minSdk 28\r\n targetSdk 32\r\n versionCode 1\r\n versionName \"1.0\"\r\n\r\n testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\r\n }\r\n\r\n buildTypes {\r\n release {\r\n minifyEnabled false\r\n proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\r\n }\r\n }\r\n compileOptions {\r\n sourceCompatibility JavaVersion.VERSION_1_8\r\n targetCompatibility JavaVersion.VERSION_1_8\r\n }\r\n kotlinOptions {\r\n jvmTarget = '1.8'\r\n }\r\n buildFeatures{\r\n viewBinding = true\r\n }\r\n}\r\n\r\ndependencies {\r\n\r\n implementation 'androidx.core:core-ktx:1.7.0'\r\n implementation 'androidx.appcompat:appcompat:1.5.1'\r\n implementation 'com.google.android.material:material:1.6.1'\r\n implementation 'androidx.constraintlayout:constraintlayout:2.1.4'\r\n testImplementation 'junit:junit:4.13.2'\r\n androidTestImplementation 'androidx.test.ext:junit:1.1.3'\r\n androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'\r\n\r\n def room_version = \"2.4.3\"\r\n implementation \"androidx.room:room-runtime:$room_version\"\r\n kapt \"androidx.room:room-compiler:$room_version\"\r\n implementation \"androidx.room:room-ktx:$room_version\"\r\n\r\n def lifecycle_version = \"2.5.1\"\r\n implementation \"androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version\"\r\n implementation \"androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version\"\r\n\r\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'\r\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'\r\n\r\n\r\n} -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/app/build.gradle b/app/build.gradle ---- a/app/build.gradle (revision 5f325d8bf88bae53ca7f6546d08bc94bd143ece3) -+++ b/app/build.gradle (date 1668749352399) -@@ -10,7 +10,7 @@ - - defaultConfig { - applicationId "com.aditya.dailynotes" -- minSdk 28 -+ minSdk 25 - targetSdk 32 - versionCode 1 - versionName "1.0" -@@ -38,13 +38,14 @@ - - dependencies { - -+ //noinspection GradleDependency - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.5.1' -- implementation 'com.google.android.material:material:1.6.1' -+ implementation 'com.google.android.material:material:1.7.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - testImplementation 'junit:junit:4.13.2' -- androidTestImplementation 'androidx.test.ext:junit:1.1.3' -- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' -+ androidTestImplementation 'androidx.test.ext:junit:1.1.4' -+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' - - def room_version = "2.4.3" - implementation "androidx.room:room-runtime:$room_version" -Index: app/src/main/java/com/aditya/dailynotes/activity/ViewNoteActivity.kt -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+>package com.aditya.dailynotes.activity\r\n\r\nimport android.content.Intent\r\nimport androidx.appcompat.app.AppCompatActivity\r\nimport android.os.Bundle\r\nimport android.widget.Toast\r\nimport androidx.lifecycle.Observer\r\nimport androidx.lifecycle.ViewModelProvider\r\nimport com.aditya.dailynotes.database.Notes\r\nimport com.aditya.dailynotes.database.NotesDatabase\r\nimport com.aditya.dailynotes.databinding.ActivityViewNoteBinding\r\nimport com.aditya.dailynotes.repository.NotesRepository\r\nimport com.aditya.dailynotes.viewModel.*\r\n\r\nclass ViewNoteActivity : AppCompatActivity() {\r\n\r\n private lateinit var binding: ActivityViewNoteBinding\r\n private lateinit var mainViewModel: MainViewModel\r\n\r\n override\r\n fun onCreate(savedInstanceState: Bundle?) {\r\n super.onCreate(savedInstanceState)\r\n binding = ActivityViewNoteBinding.inflate(layoutInflater)\r\n setContentView(binding.root)\r\n supportActionBar?.hide()\r\n\r\n val position: Int = intent.getIntExtra(\"position\",0)\r\n\r\n val repository = NotesRepository(NotesDatabase.getDatabase(applicationContext))\r\n mainViewModel = ViewModelProvider(this,\r\n MainViewModelFactory(repository))[MainViewModel::class.java]\r\n\r\n var id = \"\";\r\n var title : String = \"\"\r\n var description: String = \"\"\r\n mainViewModel.getNotes().observe(this, Observer {\r\n if(it.isNotEmpty()) {\r\n binding.noteTextView.text = it[position].description\r\n binding.titleTextView.text = it[position].title\r\n binding.dateTextView.text = it[position].date\r\n id = it[position].id.toString()\r\n title = it[position].title\r\n description = it[position].description\r\n }\r\n })\r\n\r\n\r\n binding.deleteNote.setOnClickListener {\r\n var note: Notes = deleteNote(id,title,description,binding.dateTextView.text.toString() );\r\n mainViewModel.deleteNote(note)\r\n finish()\r\n Toast.makeText(this,\"Note Successfully Deleted\", Toast.LENGTH_SHORT).show()\r\n }\r\n binding.insertActivityBackButton.setOnClickListener {\r\n finish()\r\n }\r\n\r\n binding.editNote.setOnClickListener {\r\n val intent = Intent(this@ViewNoteActivity, InsertNoteActivity::class.java)\r\n intent.putExtra(\"position\", position)\r\n intent.putExtra(\"state\", \"update\")\r\n intent.putStringArrayListExtra(\"notes\", arrayListOf(id,binding.titleTextView.text.toString(),binding.noteTextView.text.toString(),binding.dateTextView.text.toString()))\r\n startActivity(intent)\r\n }\r\n\r\n\r\n }\r\n\r\n private fun deleteNote(id: String, title: String, description: String, toString: String): Notes {\r\n return Notes(Integer.parseInt(id),title,description, toString)\r\n }\r\n} -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/app/src/main/java/com/aditya/dailynotes/activity/ViewNoteActivity.kt b/app/src/main/java/com/aditya/dailynotes/activity/ViewNoteActivity.kt ---- a/app/src/main/java/com/aditya/dailynotes/activity/ViewNoteActivity.kt (revision 5f325d8bf88bae53ca7f6546d08bc94bd143ece3) -+++ b/app/src/main/java/com/aditya/dailynotes/activity/ViewNoteActivity.kt (date 1669299319308) -@@ -24,7 +24,7 @@ - setContentView(binding.root) - supportActionBar?.hide() - -- val position: Int = intent.getIntExtra("position",0) -+ var position: Int = intent.getIntExtra("position",0) - - val repository = NotesRepository(NotesDatabase.getDatabase(applicationContext)) - mainViewModel = ViewModelProvider(this, -@@ -35,6 +35,7 @@ - var description: String = "" - mainViewModel.getNotes().observe(this, Observer { - if(it.isNotEmpty()) { -+ Toast.makeText(this@ViewNoteActivity, it.size.toString(), Toast.LENGTH_SHORT).show() - binding.noteTextView.text = it[position].description - binding.titleTextView.text = it[position].title - binding.dateTextView.text = it[position].date -@@ -46,9 +47,10 @@ - - - binding.deleteNote.setOnClickListener { -- var note: Notes = deleteNote(id,title,description,binding.dateTextView.text.toString() ); -- mainViewModel.deleteNote(note) -+ -+ val note: Notes = Notes(Integer.parseInt(id),title,description,binding.dateTextView.text.toString() ); - finish() -+ mainViewModel.deleteNote(note) - Toast.makeText(this,"Note Successfully Deleted", Toast.LENGTH_SHORT).show() - } - binding.insertActivityBackButton.setOnClickListener { -@@ -69,4 +71,5 @@ - private fun deleteNote(id: String, title: String, description: String, toString: String): Notes { - return Notes(Integer.parseInt(id),title,description, toString) - } -+ - } -\ No newline at end of file -Index: app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+>package com.aditya.dailynotes.activity\r\n\r\nimport android.content.Intent\r\nimport androidx.appcompat.app.AppCompatActivity\r\nimport android.os.Bundle\r\nimport android.util.Log\r\nimport android.view.Menu\r\nimport android.widget.SearchView\r\nimport androidx.lifecycle.*\r\nimport androidx.recyclerview.widget.StaggeredGridLayoutManager\r\nimport com.aditya.dailynotes.R\r\nimport com.aditya.dailynotes.adapter.NotesAdapter\r\nimport com.aditya.dailynotes.database.Notes\r\nimport com.aditya.dailynotes.database.NotesDatabase\r\nimport com.aditya.dailynotes.databinding.ActivityMainBinding\r\nimport com.aditya.dailynotes.repository.NotesRepository\r\nimport com.aditya.dailynotes.viewModel.*\r\n\r\nclass MainActivity : AppCompatActivity() {\r\n private lateinit var binding: ActivityMainBinding\r\n private lateinit var mainViewModel: MainViewModel\r\n private lateinit var filteredNameList: List\r\n private lateinit var notes: List\r\n\r\n override\r\n fun onCreate(savedInstanceState: Bundle?) {\r\n super.onCreate(savedInstanceState)\r\n binding = ActivityMainBinding.inflate(layoutInflater)\r\n setContentView(binding.root)\r\n\r\n val repository = NotesRepository(NotesDatabase.getDatabase(applicationContext))\r\n mainViewModel = ViewModelProvider(this,\r\n MainViewModelFactory(repository))[MainViewModel::class.java]\r\n\r\n mainViewModel.getNotes().observe(this, Observer {\r\n binding.notesRecyclerView.adapter = NotesAdapter(it)\r\n binding.notesRecyclerView.layoutManager= StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL)\r\n filteredNameList = it\r\n notes = it\r\n })\r\n\r\n binding.newNote.setOnClickListener {\r\n val intent = Intent(this@MainActivity, InsertNoteActivity::class.java)\r\n startActivity(intent)\r\n }\r\n\r\n }\r\n\r\n override fun onCreateOptionsMenu(menu: Menu?): Boolean {\r\n menuInflater.inflate(R.menu.search_note,menu)\r\n val menuItem = menu?.findItem(R.id.searchNote)\r\n val searchView: SearchView = menuItem?.actionView as SearchView\r\n searchView.queryHint = \"Search Notes Here...\"\r\n searchView.setOnQueryTextListener(object :SearchView.OnQueryTextListener{\r\n override fun onQueryTextSubmit(p0: String?): Boolean {\r\n return true\r\n }\r\n override fun onQueryTextChange(p0: String?): Boolean {\r\n notesFilter(p0)\r\n return true\r\n }\r\n\r\n })\r\n return super.onCreateOptionsMenu(menu)\r\n }\r\n\r\n private fun notesFilter(p0: String?) {\r\n val filteredNames = arrayListOf()\r\n for (note in filteredNameList) {\r\n if(note.title.contains(p0!!) or note.description.contains(p0)) {\r\n filteredNames.add(note)\r\n }\r\n\r\n if(filteredNames.isEmpty()) {\r\n } else {\r\n NotesAdapter(notes).filteredList(filteredNames)\r\n }\r\n\r\n }\r\n\r\n binding.notesRecyclerView.adapter = NotesAdapter(filteredNames)\r\n binding.notesRecyclerView.layoutManager= StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL)\r\n }\r\n} -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt b/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt ---- a/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt (revision 5f325d8bf88bae53ca7f6546d08bc94bd143ece3) -+++ b/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt (date 1663767233521) -@@ -3,7 +3,6 @@ - import android.content.Intent - import androidx.appcompat.app.AppCompatActivity - import android.os.Bundle --import android.util.Log - import android.view.Menu - import android.widget.SearchView - import androidx.lifecycle.* -Index: build.gradle -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+>// Top-level build file where you can add configuration options common to all sub-projects/modules.\r\nplugins {\r\n id 'com.android.application' version '7.3.0' apply false\r\n id 'com.android.library' version '7.3.0' apply false\r\n id 'org.jetbrains.kotlin.android' version '1.7.10' apply false\r\n} -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/build.gradle b/build.gradle ---- a/build.gradle (revision 5f325d8bf88bae53ca7f6546d08bc94bd143ece3) -+++ b/build.gradle (date 1666201071659) -@@ -1,6 +1,6 @@ - // Top-level build file where you can add configuration options common to all sub-projects/modules. - plugins { -- id 'com.android.application' version '7.3.0' apply false -- id 'com.android.library' version '7.3.0' apply false -+ id 'com.android.application' version '7.3.1' apply false -+ id 'com.android.library' version '7.3.1' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false - } -\ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43__Changes_.xml deleted file mode 100644 index 6048dea..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Update_at_25-11-2022_11_43__Changes_.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 6fa8223..3656c76 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,12 +6,12 @@ plugins { android { namespace 'com.aditya.dailynotes' - compileSdk 32 + compileSdk 34 defaultConfig { applicationId "com.aditya.dailynotes" minSdk 28 - targetSdk 32 + targetSdk 34 versionCode 1 versionName "1.0" @@ -22,6 +22,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.debug } } compileOptions { @@ -38,13 +39,14 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.core:core:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.11.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' def room_version = "2.4.3" implementation "androidx.room:room-runtime:$room_version" diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6f7ddc9 Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt b/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt index 9ab46a0..f669c66 100644 --- a/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt +++ b/app/src/main/java/com/aditya/dailynotes/activity/MainActivity.kt @@ -3,7 +3,6 @@ package com.aditya.dailynotes.activity import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle -import android.util.Log import android.view.Menu import android.widget.SearchView import androidx.lifecycle.* diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml index 07d5da9..ca3826a 100644 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,170 +1,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns:android="http://schemas.android.com/apk/res/android"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index eca70cf..036d09b 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index eca70cf..036d09b 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp index c209e78..f02b92e 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..3a04b8c Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp index b2dfe3d..5f3f971 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp index 4f0f1d6..c3b5d74 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..72d0a6e Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 62b611d..30b789a 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp index 948a307..c2075b4 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..3d58272 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp index 1b9a695..3af94e2 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp index 28d4b77..752ccda 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..618e878 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp index 9287f50..856a591 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp index aa7d642..5aa38f2 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..1c3d943 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp index 9126ae3..6cfd376 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..74b0415 --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #B8BBD3 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c82b1dd..baa0190 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,4 @@ - Daily Notes + Daily Notes + Adding the Note \ No newline at end of file diff --git a/build.gradle b/build.gradle index c518bc1..0e39653 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.3.0' apply false - id 'com.android.library' version '7.3.0' apply false + id 'com.android.application' version '8.2.2' apply false + id 'com.android.library' version '8.2.2' apply false id 'org.jetbrains.kotlin.android' version '1.7.10' apply false } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3c5031e..a2e90d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ca35ff0..e33345f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sun Sep 18 16:38:57 IST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME