[Android] Rename FAB variable

Geoffrey Métais git at videolan.org
Tue Mar 29 11:28:15 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 29 11:27:01 2016 +0200| [b5abb7dd49a47cb408c3c2217a628bbf1e799de4] | committer: Geoffrey Métais

Rename FAB variable

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

 .../org/videolan/vlc/gui/browser/BaseBrowserFragment.java  | 14 +++++++-------
 .../videolan/vlc/gui/browser/NetworkBrowserFragment.java   |  8 ++++----
 .../videolan/vlc/gui/browser/StorageBrowserFragment.java   |  8 ++++----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 3f4326c..0ca39b5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -79,7 +79,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
     public static final String KEY_CONTENT_LIST = "key_content_list";
     public static final String KEY_POSITION = "key_list";
 
-    protected FloatingActionButton mAddDirectoryFAB;
+    protected FloatingActionButton mFAB;
 
     protected BrowserFragmentHandler mHandler;
     protected MediaBrowser mMediaBrowser;
@@ -139,7 +139,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
         View v = inflater.inflate(getLayoutId(), container, false);
         mRecyclerView = (ContextMenuRecyclerView) v.findViewById(R.id.network_list);
         mEmptyView = (TextView) v.findViewById(android.R.id.empty);
-        mAddDirectoryFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
+        mFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
         mLayoutManager = new LinearLayoutManager(getActivity());
         mRecyclerView.addItemDecoration(new DividerItemDecoration(VLCApplication.getAppContext(), DividerItemDecoration.VERTICAL_LIST));
         mRecyclerView.setLayoutManager(mLayoutManager);
@@ -318,13 +318,13 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
         mAdapter.notifyDataSetChanged();
         parseSubDirectories();
         focusHelper();
-        if (mAddDirectoryFAB != null) {
+        if (mFAB != null) {
             if (mAdapter.getMediaCount() > 0) {
-                mAddDirectoryFAB.setVisibility(View.VISIBLE);
-                mAddDirectoryFAB.setOnClickListener(this);
+                mFAB.setVisibility(View.VISIBLE);
+                mFAB.setOnClickListener(this);
             } else {
-                mAddDirectoryFAB.setVisibility(View.GONE);
-                mAddDirectoryFAB.setOnClickListener(null);
+                mFAB.setVisibility(View.GONE);
+                mFAB.setOnClickListener(null);
             }
         }
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index e03f54f..6fa579c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -69,10 +69,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         View v = super.onCreateView(inflater, container, savedInstanceState);
         if (mRoot) {
-            mAddDirectoryFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
-            mAddDirectoryFAB.setImageResource(R.drawable.ic_fab_add);
-            mAddDirectoryFAB.setVisibility(View.VISIBLE);
-            mAddDirectoryFAB.setOnClickListener(this);
+            mFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
+            mFAB.setImageResource(R.drawable.ic_fab_add);
+            mFAB.setVisibility(View.VISIBLE);
+            mFAB.setOnClickListener(this);
         }
         return v;
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
index f83fbe5..f45e5ae 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
@@ -74,10 +74,10 @@ public class StorageBrowserFragment extends FileBrowserFragment {
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         View v = super.onCreateView(inflater, container, savedInstanceState);
         if (mRoot) {
-            mAddDirectoryFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
-            mAddDirectoryFAB.setImageResource(R.drawable.ic_fab_add);
-            mAddDirectoryFAB.setVisibility(View.VISIBLE);
-            mAddDirectoryFAB.setOnClickListener(this);
+            mFAB = (FloatingActionButton) v.findViewById(R.id.fab_add_custom_dir);
+            mFAB.setImageResource(R.drawable.ic_fab_add);
+            mFAB.setVisibility(View.VISIBLE);
+            mFAB.setOnClickListener(this);
         }
         return v;
     }



More information about the Android mailing list