[Android] Deinline method and comments

Jean-Baptiste Kempf git at videolan.org
Sun Jun 24 21:41:54 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 24 21:20:34 2012 +0200| [83657abbe4c8258dd9618714007cd82b1eb2fd42] | committer: Jean-Baptiste Kempf

Deinline method and comments

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=83657abbe4c8258dd9618714007cd82b1eb2fd42
---

 .../src/org/videolan/vlc/gui/MainActivity.java     |   31 ++++++++++----------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d5823a8..a728d1d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -117,7 +117,19 @@ public class MainActivity extends SherlockFragmentActivity {
         mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
         mActionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
 
-        addMediaLibraryTabs();
+        mActionBar.addTab(mActionBar.newTab()
+                .setText("Video")
+                .setIcon(R.drawable.header_icon_video)
+                .setTabListener(new TabListener<VideoListFragment>(
+                        this, "video", VideoListFragment.class)));
+
+        mActionBar.addTab(mActionBar.newTab()
+                .setText("Audio")
+                .setIcon(R.drawable.header_icon_audio)
+                .setTabListener(new TabListener<AudioBrowserFragment>(
+                        this, "audio", AudioBrowserFragment.class)));
+
+        /* DirectoryView */
         mDirectoryView = new DirectoryViewFragment(this);
         mDirectoryView.setRetainInstance(true); /* Retain instance across attach/detach */
         getSupportFragmentManager().beginTransaction()
@@ -127,7 +139,7 @@ public class MainActivity extends SherlockFragmentActivity {
             .detach(mDirectoryView)
             .commit();
 
-        // Add mini audio player
+        /* Set up the mini audio player */
         mAudioPlayer = new AudioMiniPlayer();
 
         FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
@@ -152,6 +164,7 @@ public class MainActivity extends SherlockFragmentActivity {
                 showInfoDialog();
         }
 
+        /* Prepare the progressBar */
         IntentFilter filter = new IntentFilter();
         filter.addAction(ACTION_SHOW_PROGRESSBAR);
         filter.addAction(ACTION_HIDE_PROGRESSBAR);
@@ -162,20 +175,6 @@ public class MainActivity extends SherlockFragmentActivity {
         MediaLibrary.getInstance(this).loadMediaItems(this);
     }
 
-    private void addMediaLibraryTabs() {
-        mActionBar.addTab(mActionBar.newTab()
-                .setText("Video")
-                .setIcon(R.drawable.header_icon_video)
-                .setTabListener(new TabListener<VideoListFragment>(
-                        this, "video", VideoListFragment.class)));
-
-        mActionBar.addTab(mActionBar.newTab()
-                .setText("Audio")
-                .setIcon(R.drawable.header_icon_audio)
-                .setTabListener(new TabListener<AudioBrowserFragment>(
-                        this, "audio", AudioBrowserFragment.class)));
-    }
-
     @Override
     protected void onResume() {
         mAudioController.addAudioPlayer(mAudioPlayer);



More information about the Android mailing list