diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
new file mode 100644
index 0000000..676ad49
Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser
new file mode 100644
index 0000000..b40e47a
Binary files /dev/null and b/.idea/caches/gradle_models.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..681f41a
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 7ac24c7..ee635a3 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -3,6 +3,9 @@
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 75dac50..0aa809b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -5,26 +5,41 @@
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 43ae26f..955add8 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/forrestknight/todo_list/MainActivity.java b/app/src/main/java/com/example/forrestknight/todo_list/MainActivity.java
index 7648218..037d236 100644
--- a/app/src/main/java/com/example/forrestknight/todo_list/MainActivity.java
+++ b/app/src/main/java/com/example/forrestknight/todo_list/MainActivity.java
@@ -7,6 +7,7 @@
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
+import android.widget.Toast;
import org.apache.commons.io.FileUtils;
@@ -67,6 +68,7 @@ private void readItems() {
try {
items = new ArrayList(FileUtils.readLines(todoFile));
} catch (IOException e) {
+ Toast.makeText(getApplicationContext(), getString(R.string.error_read_file), Toast.LENGTH_LONG).show();
items = new ArrayList();
}
}
@@ -77,6 +79,7 @@ private void writeItems() {
try {
FileUtils.writeLines(todoFile, items);
} catch (IOException e) {
+ Toast.makeText(getApplicationContext(), getString(R.string.error_write_file), Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index afc4af0..73d4f97 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,5 @@
To Do List
+ Unable to read local file
+ Unable to update local file