diff --git a/app/src/main/java/com/batledev/bluetask/CreateTaskActivity.kt b/app/src/main/java/com/batledev/bluetask/CreateTaskActivity.kt index e5d0eed..a2ca0e9 100644 --- a/app/src/main/java/com/batledev/bluetask/CreateTaskActivity.kt +++ b/app/src/main/java/com/batledev/bluetask/CreateTaskActivity.kt @@ -112,7 +112,7 @@ class CreateTaskActivity : AppCompatActivity() { // Validate input data if (title.isEmpty()) { - editTextTitle.error = "Title required" + editTextTitle.error = resources.getString(R.string.error_empty_title) editTextTitle.requestFocus() return } @@ -143,7 +143,8 @@ class CreateTaskActivity : AppCompatActivity() { } .addOnFailureListener { e -> println("Error adding task: $e") - Toast.makeText(this, "Error adding task", Toast.LENGTH_SHORT).show() + Toast.makeText(this, resources.getString(R.string.error_create_task), + Toast.LENGTH_SHORT).show() } } } diff --git a/app/src/main/java/com/batledev/bluetask/MainActivity.kt b/app/src/main/java/com/batledev/bluetask/MainActivity.kt index 846b163..6181516 100644 --- a/app/src/main/java/com/batledev/bluetask/MainActivity.kt +++ b/app/src/main/java/com/batledev/bluetask/MainActivity.kt @@ -199,6 +199,10 @@ class MainActivity : AppCompatActivity() { private fun loadTasks() { swipeRefreshLayout.isRefreshing = true + // Show/Hide the create task button + val createTaskButton = findViewById