[Android] Safety util method to update view visibility

Geoffrey Métais git at videolan.org
Fri Jun 24 12:47:31 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 24 12:34:41 2016 +0200| [242601db91e3de2e670eb345e69f47420427ac2b] | committer: Geoffrey Métais

Safety util method to update view visibility

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

 vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
index 21d1758..f3b4fb4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
@@ -178,6 +178,11 @@ public class UiTools {
         }
     }
 
+    public static void setViewVisibility(View v, int visibility) {
+        if (v != null)
+            v.setVisibility(visibility);
+    }
+
     public static boolean isBlackThemeEnabled() {
         SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(VLCApplication.getAppContext());
         return pref.getBoolean("enable_black_theme", false);



More information about the Android mailing list