Migrate some hardcoded strings to resources

Signed-off-by: June <june@eridan.me>
diff --git a/app/src/main/java/app/grapheneos/camera/CamConfig.kt b/app/src/main/java/app/grapheneos/camera/CamConfig.kt
index 348832f..91085ff 100644
--- a/app/src/main/java/app/grapheneos/camera/CamConfig.kt
+++ b/app/src/main/java/app/grapheneos/camera/CamConfig.kt
@@ -1360,7 +1360,7 @@
         }
 
         // Add OK and Cancel buttons
-        builder.setPositiveButton("OK") { _, _ ->
+        builder.setPositiveButton(getString(R.string.ok)) { _, _ ->
 
             commonPref.edit {
                 for (index in 0 until optionNames.size) {
diff --git a/app/src/main/java/app/grapheneos/camera/NumInputFilter.kt b/app/src/main/java/app/grapheneos/camera/NumInputFilter.kt
index a40a559..793f9bb 100644
--- a/app/src/main/java/app/grapheneos/camera/NumInputFilter.kt
+++ b/app/src/main/java/app/grapheneos/camera/NumInputFilter.kt
@@ -22,7 +22,8 @@
             if (isInRange(input)) {
                 return null
             } else {
-                settings.showMessage("Photo quality can only be between $min and $max")
+                settings.showMessage(settings.getString(
+                    R.string.photo_quality_number_limit, min, max))
             }
         } catch (e: NumberFormatException) {
             e.printStackTrace()
diff --git a/app/src/main/java/app/grapheneos/camera/ui/QRToggle.kt b/app/src/main/java/app/grapheneos/camera/ui/QRToggle.kt
index 5fb09c5..7089a33 100644
--- a/app/src/main/java/app/grapheneos/camera/ui/QRToggle.kt
+++ b/app/src/main/java/app/grapheneos/camera/ui/QRToggle.kt
@@ -2,6 +2,7 @@
 
 import android.content.Context
 import android.util.AttributeSet
+import app.grapheneos.camera.R
 import app.grapheneos.camera.ui.activities.MainActivity
 import com.google.android.material.imageview.ShapeableImageView
 
@@ -33,10 +34,9 @@
         val camConfig = mActivity.camConfig
 
         if (!selected && camConfig.allowedFormats.size == 1) {
-            mActivity.showMessage(
-                "Couldn't exclude $key format. " +
-                        "Please ensure at least one format is selected in manual mode."
-            )
+            mActivity.showMessage(mActivity.getString(
+                R.string.couldnt_exclude_qr_format, key
+            ))
             isSelected = true
         } else {
             camConfig.setQRScanningFor(key, selected)
diff --git a/app/src/main/java/app/grapheneos/camera/ui/activities/InAppGallery.kt b/app/src/main/java/app/grapheneos/camera/ui/activities/InAppGallery.kt
index ba69a6c..ba6c283 100644
--- a/app/src/main/java/app/grapheneos/camera/ui/activities/InAppGallery.kt
+++ b/app/src/main/java/app/grapheneos/camera/ui/activities/InAppGallery.kt
@@ -305,21 +305,21 @@
         val alertDialog: AlertDialog.Builder =
             AlertDialog.Builder(this, android.R.style.Theme_DeviceDefault_Dialog_Alert)
 
-        alertDialog.setTitle("File Details")
+        alertDialog.setTitle(getString(R.string.file_details))
 
         val detailsBuilder = StringBuilder()
 
-        detailsBuilder.append("\nFile Name: \n")
+        detailsBuilder.append("\n", getString(R.string.file_name_generic), "\n")
         detailsBuilder.append(fileName)
         detailsBuilder.append("\n\n")
 
-        detailsBuilder.append("File Path: \n")
+        detailsBuilder.append(getString(R.string.file_path), "\n")
         detailsBuilder.append(getRelativePath(this, curItem.uri, relativePath, fileName!!))
         detailsBuilder.append("\n\n")
 
-        detailsBuilder.append("File Size: \n")
+        detailsBuilder.append(getString(R.string.file_size), "\n")
         if (size == 0L) {
-            detailsBuilder.append("Loading...")
+            detailsBuilder.append(getString(R.string.loading_generic))
         } else {
             detailsBuilder.append(
                 String.format(
@@ -332,25 +332,25 @@
 
         detailsBuilder.append("\n\n")
 
-        detailsBuilder.append("File Created On: \n")
+        detailsBuilder.append(getString(R.string.file_created_on), "\n")
         if (dateAdded == null) {
-            detailsBuilder.append("Not found")
+            detailsBuilder.append(getString(R.string.not_found_generic))
         } else {
             detailsBuilder.append(dateAdded)
         }
 
         detailsBuilder.append("\n\n")
 
-        detailsBuilder.append("Last Modified On: \n")
+        detailsBuilder.append(getString(R.string.last_modified_on), "\n")
         if (dateModified == null) {
-            detailsBuilder.append("Not found")
+            detailsBuilder.append(getString(R.string.not_found_generic))
         } else {
             detailsBuilder.append(dateModified)
         }
 
         alertDialog.setMessage(detailsBuilder)
 
-        alertDialog.setPositiveButton("Ok", null)
+        alertDialog.setPositiveButton(getString(R.string.ok), null)
 
 
         alertDialog.show()
diff --git a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt
index da18410..805a306 100644
--- a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt
+++ b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt
@@ -314,11 +314,9 @@
         if (data?.encodedPath != null) {
             val file = File(data.encodedPath!!)
             if (file.exists()) {
-                showMessage("File exists: ${file.absolutePath}")
+                showMessage(getString(R.string.file_already_exists, file.absolutePath))
             } else {
-                showMessage(
-                    "File does not exist :( ${data.encodedPath!!} "
-                )
+                showMessage(getString(R.string.file_does_not_exist, data.encodedPath))
             }
         }
 
diff --git a/app/src/main/java/app/grapheneos/camera/ui/activities/MoreSettings.kt b/app/src/main/java/app/grapheneos/camera/ui/activities/MoreSettings.kt
index 9553379..940af4f 100644
--- a/app/src/main/java/app/grapheneos/camera/ui/activities/MoreSettings.kt
+++ b/app/src/main/java/app/grapheneos/camera/ui/activities/MoreSettings.kt
@@ -60,7 +60,7 @@
             val uiString = storageLocationToUiString(this, uriString)
             sLField.setText(uiString)
 
-            showMessage("Storage location successfully updated to $uiString")
+            showMessage(getString(R.string.storage_location_updated, uiString))
 
         } else {
             showMessage(getString(R.string.no_directory_selected))
@@ -154,35 +154,6 @@
         vFField = binding.videoFormatSettingField
         vFField.setOnEditorActionListener(this)
 
-        val iPQButton = binding.increasePhotoQuality
-        iPQButton.setOnClickListener {
-
-            if (camConfig.photoQuality != NumInputFilter.max) {
-                ++camConfig.photoQuality
-                pQField.setText(camConfig.photoQuality.toString())
-            } else {
-                showMessage(
-                    "Photo quality can only be between ${NumInputFilter.min} and ${NumInputFilter.max}"
-                )
-            }
-        }
-
-        val dPQButton = binding.decreasePhotoQuality
-        dPQButton.setOnClickListener {
-            if (camConfig.photoQuality >= NumInputFilter.min) {
-                --camConfig.photoQuality
-
-                if (camConfig.photoQuality >= NumInputFilter.min) {
-                    pQField.setText(camConfig.photoQuality.toString())
-                } else {
-                    pQField.setText("")
-                    showMessage(
-                        getString(R.string.photo_quality_was_set_to_auto)
-                    )
-                }
-            }
-        }
-
         val exifToggle = binding.removeExifToggle
         val exifToggleSetting = binding.removeExifSetting
 
diff --git a/app/src/main/res/layout/more_settings.xml b/app/src/main/res/layout/more_settings.xml
index e534d10..e3cddb4 100644
--- a/app/src/main/res/layout/more_settings.xml
+++ b/app/src/main/res/layout/more_settings.xml
@@ -267,16 +267,6 @@
                 android:layout_height="match_parent"
                 android:orientation="horizontal">
 
-                <ImageView
-                    android:id="@+id/decrease_photo_quality"
-                    android:visibility="gone"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:src="@drawable/remove"
-                    android:background="?selectableItemBackgroundBorderless"
-                    android:layout_gravity="center"
-                    android:contentDescription="@string/decrease_quality"/>
-
                 <com.google.android.material.textfield.TextInputLayout
                     android:layout_height="match_parent"
                     android:layout_width="wrap_content"
@@ -312,16 +302,6 @@
                     android:layout_gravity="center"
                     android:layout_marginEnd="4dp"/>
 
-                <ImageView
-                    android:id="@+id/increase_photo_quality"
-                    android:visibility="gone"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:src="@drawable/add"
-                    android:background="?selectableItemBackgroundBorderless"
-                    android:layout_gravity="center"
-                    android:contentDescription="@string/increase_quality"/>
-
             </LinearLayout>
 
         </LinearLayout>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 959ceeb..864d922 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -144,6 +144,7 @@
     <string name="flash_unavailable_in_current_mode">Flash/Torch is unavailable for this mode</string>
     <string name="unexpected_error_while_setting_focus_timeout">An unexpected error occurred while setting focus timeout</string>
     <string name="unexpected_error_while_opening_gallery">An unexpected error occurred while opening the gallery</string>
+    <string name="storage_location_updated">Storage location successfully updated to %s</string>
     <string name="no_directory_selected">No directory was selected by the picker</string>
     <string name="choose_storage_location">Choose storage location</string>
     <string name="are_you_sure">Are you sure?</string>
@@ -151,7 +152,11 @@
     <string name="reverted_to_default_directory">Switched back to the default storage location</string>
     <string name="already_using_default_directory">Already using the default storage location</string>
     <string name="photo_quality_was_set_to_auto">Photo quality was set to auto mode</string>
+    <string name="photo_quality_number_limit">Photo quality can only be between %d and %d</string>
     <string name="image_taken_in_this_mode_does_not_contain_extra_data">Images taken in this mode don\'t contain extra EXIF data</string>
+    <string name="file_already_exists">File exists at %s</string>
+    <string name="file_does_not_exist">File does not exist at %s</string>
+    <string name="couldnt_exclude_qr_format">Couldn\'t exclude %s format. Please ensure at least one format is selected in manual mode.</string>
 
     <string name="capturing_image">Capturing Image…</string>
     <string name="image_captured_successfully">Image captured successfully</string>
@@ -167,6 +172,15 @@
     <string name="please_wait_for_image_to_get_captured_before_opening">Please wait for the image to get captured before trying to open the gallery.</string>
     <string name="please_wait_for_image_to_get_captured_before_sharing">Please wait for the image to get captured before attempting to share via long tap</string>
 
+    <string name="file_details">File Details</string>
+    <string name="file_name_generic">File Name: </string>
+    <string name="not_found_generic">Not Found</string>
+    <string name="loading_generic">Loading…</string>
+    <string name="file_size">File Size: </string>
+    <string name="file_path">File Path: </string>
+    <string name="file_created_on">File Created On: </string>
+    <string name="last_modified_on">Last Modified On: </string>
+
     <string name="inaccessible_image">Photo %s is inaccessible</string>
     <string name="inaccessible_video">Video %s is inaccessible</string>