From ca5b6878d944e5052a73ea995625ebfc3af770fc Mon Sep 17 00:00:00 2001 From: Finn M Glas Date: Tue, 19 May 2020 16:37:05 +0200 Subject: [PATCH] Prepare translating Fix some problems I forgot about earlier, Move more strings to the string resource xml --- .../java/com/finnmglas/launcher/SettingsActivity.kt | 13 ++++++------- app/src/main/res/layout/activity_settings.xml | 2 +- app/src/main/res/values/icons.xml | 8 ++++---- app/src/main/res/values/strings.xml | 10 ++++++++-- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/finnmglas/launcher/SettingsActivity.kt b/app/src/main/java/com/finnmglas/launcher/SettingsActivity.kt index 80f13c0..0a2f984 100644 --- a/app/src/main/java/com/finnmglas/launcher/SettingsActivity.kt +++ b/app/src/main/java/com/finnmglas/launcher/SettingsActivity.kt @@ -7,7 +7,6 @@ import android.os.Bundle import android.provider.Settings import android.view.View import android.view.WindowManager -import android.widget.Toast import androidx.appcompat.app.AppCompatActivity @@ -73,8 +72,8 @@ class SettingsActivity : AppCompatActivity() { startActivity(intent) } - fun openFinnWebsite(view: View) { openNewTabWindow("https://www.finnmglas.com/", this) } - fun openGithubRepo(view: View) { openNewTabWindow("https://github.com/finnmglas/Launcher#en", this) } + fun openFinnWebsite(view: View) { openNewTabWindow(getString(R.string.settings_footer_web), this) } + fun openGithubRepo(view: View) { openNewTabWindow(getString(R.string.settings_footer_repo), this) } fun backHome(view: View) { finish() } fun setLauncher(view: View) { @@ -86,8 +85,8 @@ class SettingsActivity : AppCompatActivity() { // on older sdk: manage app details else { AlertDialog.Builder(this) - .setTitle("App Info") - .setMessage("Your device does not support this feature. Manage application details instead?") + .setTitle(getString(R.string.alert_cant_choose_launcher)) + .setMessage(getString(R.string.alert_cant_choose_launcher_message)) .setPositiveButton(android.R.string.yes, DialogInterface.OnClickListener { dialog, which -> try { @@ -106,8 +105,8 @@ class SettingsActivity : AppCompatActivity() { // Show a dialog prompting for confirmation fun resetSettingsClick(view: View) { AlertDialog.Builder(this) - .setTitle("Reset Settings") - .setMessage("This will discard all your App Choices. Sure you want to continue?") + .setTitle(getString(R.string.settings_reset)) + .setMessage(getString(R.string.settings_reset_message)) .setPositiveButton(android.R.string.yes, DialogInterface.OnClickListener { dialog, which -> resetSettings(this.getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE), this) diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 0527f15..e2a5ee8 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -281,7 +281,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.95"> + app:layout_constraintVertical_bias="0.98"> - - - - + + + + \ 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 c3b742b..deaf271 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,7 +1,7 @@ - Launcher - V3RYR4ND0MK3YCR4P + Launcher + V3RYR4ND0MK3YCR4P None found @@ -10,6 +10,9 @@ Want to change its settings (\'add it to the apps screen\')? Open settings to choose an app for this action + App Info + Your device does not support this feature. Manage application details instead? + Settings Applications @@ -25,11 +28,14 @@ Select Launcher Reset Settings + You are going to discard all your preferences. Continue? Launch Apps Uninstall Apps Back Home By + https://github.com/finnmglas/Launcher#en + https://www.finnmglas.com Choose App