diff --git a/app/src/main/java/com/mylloon/mobidl/MainActivity.kt b/app/src/main/java/com/mylloon/mobidl/MainActivity.kt index fe1dbfb..55550af 100644 --- a/app/src/main/java/com/mylloon/mobidl/MainActivity.kt +++ b/app/src/main/java/com/mylloon/mobidl/MainActivity.kt @@ -140,9 +140,9 @@ class MainActivity : AppCompatActivity() { button = itemView?.findViewById(R.id.text_list_item) button?.setOnLongClickListener { val builder: android.app.AlertDialog.Builder = android.app.AlertDialog.Builder(instance) - builder.setTitle("Remove ${button?.text}?") - builder.setPositiveButton("Remove") { _, _ -> instance?.mainPage(button?.text.toString()) } - builder.setNeutralButton("Cancel") { dialog, _ -> dialog.cancel() } + builder.setTitle("${R.string.remove} ${button?.text} ?") + builder.setPositiveButton(R.string.remove) { _, _ -> instance?.mainPage(button?.text.toString()) } + builder.setNeutralButton(R.string.cancel) { dialog, _ -> dialog.cancel() } builder.show() true } @@ -181,19 +181,19 @@ class MainActivity : AppCompatActivity() { val addButton = findViewById(R.id.addButton) addButton.setOnClickListener { val builder: android.app.AlertDialog.Builder = android.app.AlertDialog.Builder(this) - builder.setTitle("App Name") + builder.setTitle(R.string.newAppDialogTitle) val input = EditText(this) input.inputType = InputType.TYPE_CLASS_TEXT builder.setView(input) - builder.setPositiveButton("Validate") { _, _ -> addApp(input.text.toString()) } - builder.setNeutralButton("Cancel") { dialog, _ -> dialog.cancel() } + builder.setPositiveButton(R.string.validate) { _, _ -> addApp(input.text.toString()) } + builder.setNeutralButton(R.string.cancel) { dialog, _ -> dialog.cancel() } builder.show() } // easter egg addButton.setOnLongClickListener { - Toast.makeText(this@MainActivity, "lâche frère", Toast.LENGTH_SHORT) + Toast.makeText(this@MainActivity, R.string.dropBro, Toast.LENGTH_SHORT) .show() true } @@ -216,7 +216,7 @@ class MainActivity : AppCompatActivity() { val credentialsButton = findViewById