[Android] Clean Snackbars from TV preferences
Geoffrey Métais
git at videolan.org
Mon Mar 13 16:26:18 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 13 16:25:37 2017 +0100| [ae87fbee2c2d45277ca0d7517ba6f9cade3becb6] | committer: Geoffrey Métais
Clean Snackbars from TV preferences
> https://code.videolan.org/videolan/vlc-android/commit/ae87fbee2c2d45277ca0d7517ba6f9cade3becb6
---
.../src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java | 4 ++--
.../src/org/videolan/vlc/gui/tv/preferences/PreferencesUi.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
index 0c58537..c9f9608 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
@@ -36,13 +36,13 @@ import android.os.Bundle;
import android.support.v7.preference.EditTextPreference;
import android.support.v7.preference.Preference;
import android.text.TextUtils;
+import android.widget.Toast;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.vlc.BuildConfig;
import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.DebugLogActivity;
-import org.videolan.vlc.gui.helpers.UiTools;
import org.videolan.vlc.util.VLCInstance;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@@ -128,7 +128,7 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
editor.putInt("network_caching_value", 0);
EditTextPreference networkCachingPref = (EditTextPreference) findPreference(key);
networkCachingPref.setText("");
- UiTools.snacker(getView(), R.string.network_caching_popup);
+ Toast.makeText(getActivity(), R.string.network_caching_popup, Toast.LENGTH_SHORT).show();
}
editor.apply();
// No break because need VLCInstance.restart();
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesUi.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesUi.java
index 9a770ec..6b81c0c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesUi.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesUi.java
@@ -27,9 +27,9 @@ import android.annotation.TargetApi;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
+import android.widget.Toast;
import org.videolan.vlc.R;
-import org.videolan.vlc.gui.helpers.UiTools;
import org.videolan.vlc.util.AndroidDevices;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@@ -74,7 +74,7 @@ public class PreferencesUi extends BasePreferenceFragment implements SharedPrefe
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key) {
case "set_locale":
- UiTools.snacker(getView(), R.string.set_locale_popup);
+ Toast.makeText(getActivity(), R.string.set_locale_popup, Toast.LENGTH_SHORT).show();
break;
case "tv_ui":
((PreferencesActivity) getActivity()).setRestartApp();
More information about the Android
mailing list