[Android] Replace ML settings warning snack by a toast

Geoffrey Métais git at videolan.org
Mon Oct 30 15:28:51 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 30 14:56:31 2017 +0100| [d5ffd7c44943bba7d0d7f0507cf95a915c9cfce7] | committer: Geoffrey Métais

Replace ML settings warning snack by a toast

We are not in an AppCompatActivity, styling is missing for snacks

> https://code.videolan.org/videolan/vlc-android/commit/d5ffd7c44943bba7d0d7f0507cf95a915c9cfce7
---

 .../src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
index 032525530..38c4f3e0a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
@@ -28,11 +28,11 @@ import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.v7.preference.Preference;
+import android.widget.Toast;
 
 import org.videolan.vlc.R;
 import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.gui.SecondaryActivity;
-import org.videolan.vlc.gui.helpers.UiTools;
 
 @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
 public class PreferencesFragment extends BasePreferenceFragment {
@@ -68,7 +68,7 @@ public class PreferencesFragment extends BasePreferenceFragment {
         switch (preference.getKey()){
             case "directories":
                 if (VLCApplication.getMLInstance().isWorking())
-                    UiTools.snacker(getView(), getString(R.string.settings_ml_block_scan));
+                    Toast.makeText(getContext(), getString(R.string.settings_ml_block_scan), Toast.LENGTH_SHORT).show();
                 else {
                     final Intent intent = new Intent(VLCApplication.getAppContext(), SecondaryActivity.class);
                     intent.putExtra("fragment", SecondaryActivity.STORAGE_BROWSER);



More information about the Android mailing list