Skip to content

Commit

Permalink
Add loading message
Browse files Browse the repository at this point in the history
  • Loading branch information
billthefarmer committed Jul 22, 2017
1 parent 3841084 commit 5614672
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/billthefarmer/editor/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ private void readFile(Uri uri)
String title = uri.getLastPathSegment();
setTitle(title);

textView.setText(R.string.loading);

path = uri.getPath();
file = new File(path);
ReadTask read = new ReadTask();
Expand Down Expand Up @@ -292,6 +294,7 @@ private void write(String text, File file)
fileWriter.write(text);
fileWriter.close();
}

catch (Exception e) {}
}

Expand Down Expand Up @@ -331,6 +334,8 @@ protected void onProgressUpdate(Integer... progress)
protected void onPostExecute(String result)
{
textView.setText(result);
dirty = false;
invalidateOptionsMenu();
}
}
}
1 change: 1 addition & 0 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<string name="open">Open file…</string>
<string name="save">Save</string>
<string name="loading">Loading…</string>

<string name="modified">
Text has been modified,\ndo you want to exit?
Expand Down

0 comments on commit 5614672

Please sign in to comment.