From 32a19e4cde1b29c3efbb75e2da61633b7e72cc28 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Thu, 24 May 2018 20:08:31 -0500 Subject: [PATCH] Allow opening any text files Previously the app was limited to just files with common markdown file extensions in their name, but Nextcloud Notes, for example, saves the markdown files with a .txt extension. In order to be more accommodating, the filename extension restriction has been lifted --- app/src/main/AndroidManifest.xml | 5 ++--- .../wbrawner/simplemarkdown/view/fragment/EditFragment.java | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dbf6dce..e70bbdd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,10 +11,11 @@ android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" + android:resizeableActivity="true" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:resizeableActivity="true" android:theme="@style/AppTheme" + tools:ignore="AllowBackup" tools:targetApi="n"> - - diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/fragment/EditFragment.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/fragment/EditFragment.java index b1e079e..de4fa76 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/fragment/EditFragment.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/fragment/EditFragment.java @@ -140,8 +140,9 @@ public class EditFragment extends Fragment implements MarkdownEditView { @Override public void onFileLoaded(boolean success) { - int message = success ? R.string.file_loaded : R.string.file_load_error; - Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show(); + // TODO: Investigate why this fires off so often +// int message = success ? R.string.file_loaded : R.string.file_load_error; +// Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show(); } @Override