diff --git a/.idea/misc.xml b/.idea/misc.xml
index 58a5dfb..94cac64 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -10,7 +10,7 @@
diff --git a/app/src/main/assets/model.tflite b/app/src/main/assets/model.tflite
deleted file mode 100644
index c43a91b..0000000
Binary files a/app/src/main/assets/model.tflite and /dev/null differ
diff --git a/app/src/main/java/com/example/studymate/MainActivity.kt b/app/src/main/java/com/example/studymate/MainActivity.kt
index d718f27..eb92d80 100644
--- a/app/src/main/java/com/example/studymate/MainActivity.kt
+++ b/app/src/main/java/com/example/studymate/MainActivity.kt
@@ -53,7 +53,6 @@ class MainActivity : AppCompatActivity() {
if(remember){
val intent = Intent(this@MainActivity, HomePage::class.java)
- val editor : SharedPreferences.Editor = preferences.edit()
startActivity(intent)
finish()
}
diff --git a/app/src/main/java/com/example/studymate/QuestionAnsweringSystem.kt b/app/src/main/java/com/example/studymate/QuestionAnsweringSystem.kt
index 26ec71f..d4ef686 100644
--- a/app/src/main/java/com/example/studymate/QuestionAnsweringSystem.kt
+++ b/app/src/main/java/com/example/studymate/QuestionAnsweringSystem.kt
@@ -29,6 +29,8 @@ import org.tensorflow.lite.task.text.qa.BertQuestionAnswerer
import org.tensorflow.lite.task.text.qa.BertQuestionAnswerer.BertQuestionAnswererOptions
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
+import java.util.Locale
+
@OptIn(DelicateCoroutinesApi::class)
class QuestionAnsweringSystem : AppCompatActivity() {
@@ -79,7 +81,7 @@ class QuestionAnsweringSystem : AppCompatActivity() {
if(document.data["note-id"].toString() == intent.getStringExtra("documentId")){
questionCardExists = true
questionId = document.id
- questionAndAnswerList = Json.decodeFromString?>(document.data["question-answer"]?.toJson()
+ questionAndAnswerList = Json.decodeFromString(document.data["question-answer"]?.toJson()
.toString())!!
for (item in questionAndAnswerList){
createQuestionCard(item.split("\n")[0], item.split("\n")[1])
@@ -124,7 +126,12 @@ class QuestionAnsweringSystem : AppCompatActivity() {
val highestConfidenceAnswer = answers.first()
var highestConfidenceAnswerText = highestConfidenceAnswer.text
val words = highestConfidenceAnswerText.split(" ")
- val capitalizedWords = words.map { it.capitalize() }
+ @Suppress("NAME_SHADOWING") val capitalizedWords = words.map { it ->
+ it.replaceFirstChar {
+ if (it.isLowerCase()) it.titlecase(
+ Locale.getDefault()
+ ) else it.toString()
+ } }
highestConfidenceAnswerText = capitalizedWords.joinToString(" ")
createQuestionCard(
question.text.toString(),
@@ -146,6 +153,8 @@ class QuestionAnsweringSystem : AppCompatActivity() {
})
}
+ @Suppress("DEPRECATION")
+ @Deprecated("Deprecated in Java")
override fun onBackPressed() {
// Check if the user went back
// Perform your desired action here
diff --git a/app/src/main/java/com/example/studymate/ShareActivity.kt b/app/src/main/java/com/example/studymate/ShareActivity.kt
index 4f5d203..7dad37d 100644
--- a/app/src/main/java/com/example/studymate/ShareActivity.kt
+++ b/app/src/main/java/com/example/studymate/ShareActivity.kt
@@ -15,10 +15,12 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import android.content.SharedPreferences
import io.appwrite.ID
+import kotlinx.coroutines.DelicateCoroutinesApi
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
+@OptIn(DelicateCoroutinesApi::class)
class ShareActivity : AppCompatActivity() {
private lateinit var receiverEmailAddress : EditText
diff --git a/app/src/main/res/drawable/baseline_library_add_24.xml b/app/src/main/res/drawable/add_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_library_add_24.xml
rename to app/src/main/res/drawable/add_icon.xml
diff --git a/app/src/main/res/drawable/attachment.xml b/app/src/main/res/drawable/attachment_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/attachment.xml
rename to app/src/main/res/drawable/attachment_icon.xml
diff --git a/app/src/main/res/drawable/baseline_arrow_back.xml b/app/src/main/res/drawable/back_arrow_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_arrow_back.xml
rename to app/src/main/res/drawable/back_arrow_icon.xml
diff --git a/app/src/main/res/drawable/cancel_icon4.xml b/app/src/main/res/drawable/cancel_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/cancel_icon4.xml
rename to app/src/main/res/drawable/cancel_icon.xml
diff --git a/app/src/main/res/drawable/delete_note.xml b/app/src/main/res/drawable/delete_note_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/delete_note.xml
rename to app/src/main/res/drawable/delete_note_icon.xml
diff --git a/app/src/main/res/drawable/baseline_edit.xml b/app/src/main/res/drawable/edit_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_edit.xml
rename to app/src/main/res/drawable/edit_icon.xml
diff --git a/app/src/main/res/drawable/baseline_home.xml b/app/src/main/res/drawable/home_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_home.xml
rename to app/src/main/res/drawable/home_icon.xml
diff --git a/app/src/main/res/drawable/learning_logo.png b/app/src/main/res/drawable/home_page_image.png
similarity index 100%
rename from app/src/main/res/drawable/learning_logo.png
rename to app/src/main/res/drawable/home_page_image.png
diff --git a/app/src/main/res/drawable/concentric_circles.png b/app/src/main/res/drawable/login_signup_bg.png
similarity index 100%
rename from app/src/main/res/drawable/concentric_circles.png
rename to app/src/main/res/drawable/login_signup_bg.png
diff --git a/app/src/main/res/drawable/baseline_menu.xml b/app/src/main/res/drawable/menu_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_menu.xml
rename to app/src/main/res/drawable/menu_icon.xml
diff --git a/app/src/main/res/drawable/baseline_text_snippet.xml b/app/src/main/res/drawable/notes_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_text_snippet.xml
rename to app/src/main/res/drawable/notes_icon.xml
diff --git a/app/src/main/res/drawable/ocr.xml b/app/src/main/res/drawable/ocr_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/ocr.xml
rename to app/src/main/res/drawable/ocr_icon.xml
diff --git a/app/src/main/res/drawable/baseline_question_answer.xml b/app/src/main/res/drawable/question_answer_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/baseline_question_answer.xml
rename to app/src/main/res/drawable/question_answer_icon.xml
diff --git a/app/src/main/res/drawable/save_note_black.xml b/app/src/main/res/drawable/save_note_black_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/save_note_black.xml
rename to app/src/main/res/drawable/save_note_black_icon.xml
diff --git a/app/src/main/res/drawable/save_note.xml b/app/src/main/res/drawable/save_note_icon.xml
similarity index 100%
rename from app/src/main/res/drawable/save_note.xml
rename to app/src/main/res/drawable/save_note_icon.xml
diff --git a/app/src/main/res/layout/activity_home_page.xml b/app/src/main/res/layout/activity_home_page.xml
index 3612d41..d05fb38 100644
--- a/app/src/main/res/layout/activity_home_page.xml
+++ b/app/src/main/res/layout/activity_home_page.xml
@@ -22,7 +22,8 @@
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintVertical_bias="0.0" />
+ app:layout_constraintVertical_bias="0.0"
+ tools:ignore="VisualLintBounds" />
+ android:background="@drawable/login_signup_bg">
+ app:layout_constraintTop_toBottomOf="@+id/imageView"
+ tools:ignore="HardcodedText" />
+ android:textSize="14sp"
+ tools:ignore="HardcodedText" />
@@ -61,7 +63,8 @@
android:inputType="textPassword"
android:fontFamily="@font/open_sans"
android:textColor="@color/black"
- android:textSize="14sp"/>
+ android:textSize="14sp"
+ tools:ignore="HardcodedText" />
@@ -73,7 +76,8 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
- app:srcCompat="@drawable/studymate_logos_white"/>
+ app:srcCompat="@drawable/studymate_logos_white"
+ android:importantForAccessibility="no" />
+ app:layout_constraintStart_toStartOf="parent"
+ tools:ignore="HardcodedText" />
+ app:layout_constraintTop_toBottomOf="@+id/textInputLayoutPassword"
+ tools:ignore="HardcodedText" />
+ android:textColor="@color/black"
+ tools:ignore="HardcodedText" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_question_answering_system.xml b/app/src/main/res/layout/activity_question_answering_system.xml
index 425381c..e079c15 100644
--- a/app/src/main/res/layout/activity_question_answering_system.xml
+++ b/app/src/main/res/layout/activity_question_answering_system.xml
@@ -132,7 +132,7 @@
android:layout_marginEnd="10dp"
android:background="@drawable/button_template"
android:backgroundTint="@color/light_blue"
- android:drawableStart="@drawable/baseline_question_answer"
+ android:drawableStart="@drawable/question_answer_icon"
android:drawablePadding="8dp"
android:fontFamily="@font/open_sans"
android:padding="10dp"
diff --git a/app/src/main/res/layout/activity_share.xml b/app/src/main/res/layout/activity_share.xml
index 6725d46..d75ad82 100644
--- a/app/src/main/res/layout/activity_share.xml
+++ b/app/src/main/res/layout/activity_share.xml
@@ -98,7 +98,8 @@
android:textColor="@color/black"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/shareTextLayout" />
+ app:layout_constraintTop_toBottomOf="@+id/shareTextLayout"
+ tools:ignore="HardcodedText" />
+ app:layout_constraintTop_toBottomOf="@+id/shareTextLayout"
+ tools:ignore="HardcodedText" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_sign_up.xml b/app/src/main/res/layout/activity_sign_up.xml
index 454c2ae..4c25d55 100644
--- a/app/src/main/res/layout/activity_sign_up.xml
+++ b/app/src/main/res/layout/activity_sign_up.xml
@@ -5,14 +5,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SignUp"
- android:background="@drawable/concentric_circles">
+ android:background="@drawable/login_signup_bg">
+ android:textSize="14sp" />
@@ -56,11 +56,11 @@
android:id="@+id/signUpeditTextPassword"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:hint="Password"
+ android:hint="@string/password"
android:inputType="textPassword"
android:fontFamily="@font/open_sans"
android:textColor="@color/black"
- android:textSize="14dp" />
+ android:textSize="14sp" />
@@ -82,7 +82,8 @@
android:inputType="textPassword"
android:fontFamily="@font/open_sans"
android:textColor="@color/black"
- android:textSize="14dp"/>
+ android:textSize="14sp"
+ tools:ignore="HardcodedText" />
+ app:srcCompat="@drawable/studymate_logos_white"
+ android:importantForAccessibility="no" />
+ app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="UseCompoundDrawables">
+ app:srcCompat="@drawable/back_arrow_icon"
+ android:importantForAccessibility="no"
+ tools:ignore="VisualLintBounds" />
+ app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="SpeakableTextPresentCheck" />
diff --git a/app/src/main/res/layout/fragment_create_notes.xml b/app/src/main/res/layout/fragment_create_notes.xml
index 26f20dc..fe315cb 100644
--- a/app/src/main/res/layout/fragment_create_notes.xml
+++ b/app/src/main/res/layout/fragment_create_notes.xml
@@ -87,7 +87,7 @@
android:layout_marginEnd="10dp"
android:background="@drawable/button_template"
android:backgroundTint="@color/light_blue"
- android:drawableStart="@drawable/save_note"
+ android:drawableStart="@drawable/save_note_icon"
android:drawablePadding="8dp"
android:fontFamily="@font/open_sans"
android:padding="12dp"
@@ -151,7 +151,7 @@
android:layout_marginTop="5dp"
android:background="@drawable/button_template"
android:backgroundTint="@color/light_blue"
- android:drawableStart="@drawable/attachment"
+ android:drawableStart="@drawable/attachment_icon"
android:drawablePadding="8dp"
android:fontFamily="@font/open_sans"
android:padding="12dp"
@@ -171,7 +171,7 @@
android:layout_marginEnd="170dp"
android:background="@drawable/button_template"
android:backgroundTint="@color/light_blue"
- android:drawableStart="@drawable/ocr"
+ android:drawableStart="@drawable/ocr_icon"
android:drawablePadding="8dp"
android:fontFamily="@font/open_sans"
android:padding="12dp"
@@ -235,7 +235,7 @@
android:layout_marginEnd="10dp"
android:background="@drawable/button_template"
android:backgroundTint="@color/light_blue"
- android:drawableStart="@drawable/baseline_library_add_24"
+ android:drawableStart="@drawable/add_icon"
android:drawablePadding="8dp"
android:fontFamily="@font/open_sans"
android:padding="10dp"
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
index 12d408f..6b20e50 100644
--- a/app/src/main/res/layout/fragment_home.xml
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -17,7 +17,7 @@
android:layout_height="277dp"
android:layout_marginTop="100dp"
android:contentDescription="@string/landing_page"
- android:src="@drawable/learning_logo"
+ android:src="@drawable/home_page_image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.893"
app:layout_constraintStart_toStartOf="parent"
@@ -65,7 +65,7 @@
app:layout_constraintStart_toEndOf="@+id/description"
app:layout_constraintTop_toTopOf="@+id/description"
app:layout_constraintVertical_bias="0.486"
- app:srcCompat="@drawable/baseline_library_add_24"
+ app:srcCompat="@drawable/add_icon"
android:contentDescription="@string/make_notes" />
+ tools:ignore="HardcodedText,TextContrastCheck" />
Question\nCards
Use the note-based question\nanswering system. Select a note\nand ask questions.
Question Answering System
+ Register now to enjoy the perks of\nAutomated Learning and\nPeer Reviews.
+ Email address
+ Password
+ SignUp
+ Login
+ Remember Me
\ No newline at end of file
diff --git a/app/src/main/res/values/buttons.xml b/app/src/main/res/values/buttons.xml
index 27090d9..cbdd702 100644
--- a/app/src/main/res/values/buttons.xml
+++ b/app/src/main/res/values/buttons.xml
@@ -4,12 +4,12 @@
1dp
- - @drawable/baseline_home
- - @drawable/save_note_black
- - @drawable/baseline_text_snippet
- - @drawable/baseline_question_answer
- - @drawable/baseline_question_answer
- - @drawable/baseline_text_snippet
+ - @drawable/home_icon
+ - @drawable/save_note_black_icon
+ - @drawable/notes_icon
+ - @drawable/question_answer_icon
+ - @drawable/question_answer_icon
+ - @drawable/notes_icon
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cabb864..9216d06 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -24,4 +24,10 @@
Question\nCards
Use the note-based question\nanswering system. Select a note\nand ask questions.
Question Answering System
+ Register now to enjoy the perks of\nAutomated Learning and\nPeer Reviews.
+ Email address
+ Password
+ SignUp
+ Login
+ Remember Me
\ No newline at end of file