[Android] Refactore AudioListActivity into AudioListFragment

Jean-Baptiste Kempf git at videolan.org
Thu Jun 21 20:53:31 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 21 20:53:10 2012 +0200| [738a77c12be43429e45016ab9be7264b7c3f53d5] | committer: Jean-Baptiste Kempf

Refactore AudioListActivity into AudioListFragment

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

 vlc-android/AndroidManifest.xml                        |    2 +-
 .../videolan/vlc/gui/audio/AudioBrowserFragment.java   |   16 ++++++++--------
 .../{AudioListActivity.java => AudioListFragment.java} |    2 +-
 .../videolan/vlc/gui/audio/AudioPlayerActivity.java    |    2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index e8a1b43..3a3f81d 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -88,7 +88,7 @@
             android:name=".gui.audio.AudioBrowserFragment"
             android:theme="@android:style/Theme.NoTitleBar" />
         <activity
-            android:name=".gui.audio.AudioListActivity"
+            android:name=".gui.audio.AudioListFragment"
             android:theme="@style/Theme.VLC"  />
         <activity
             android:name=".gui.audio.AudioActivityGroup"
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 1ce3225..802bcb6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -211,11 +211,11 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
 
             String name = adapter.getGroup(groupPosition);
             
-            AudioListActivity audioList = new AudioListActivity();
+            AudioListFragment audioList = new AudioListFragment();
             Bundle b = new Bundle();
-            b.putString(AudioListActivity.EXTRA_NAME, name);
-            b.putString(AudioListActivity.EXTRA_NAME2, null);
-            b.putInt(AudioListActivity.EXTRA_MODE, mFlingViewGroup.getPosition());
+            b.putString(AudioListFragment.EXTRA_NAME, name);
+            b.putString(AudioListFragment.EXTRA_NAME2, null);
+            b.putInt(AudioListFragment.EXTRA_MODE, mFlingViewGroup.getPosition());
             audioList.setArguments(b);
 
             FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
@@ -234,11 +234,11 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
             String name = adapter.getGroup(groupPosition);
             String child = adapter.getChild(groupPosition, childPosition);
             
-            AudioListActivity audioList = new AudioListActivity();
+            AudioListFragment audioList = new AudioListFragment();
             Bundle b = new Bundle();
-            b.putString(AudioListActivity.EXTRA_NAME, name);
-            b.putString(AudioListActivity.EXTRA_NAME2, child);
-            b.putInt(AudioListActivity.EXTRA_MODE, mFlingViewGroup.getPosition());
+            b.putString(AudioListFragment.EXTRA_NAME, name);
+            b.putString(AudioListFragment.EXTRA_NAME2, child);
+            b.putInt(AudioListFragment.EXTRA_MODE, mFlingViewGroup.getPosition());
             audioList.setArguments(b);
 
             FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
similarity index 99%
rename from vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
rename to vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
index 752770c..2388679 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
@@ -52,7 +52,7 @@ import android.widget.TextView;
 
 import com.actionbarsherlock.app.SherlockListFragment;
 
-public class AudioListActivity extends SherlockListFragment {
+public class AudioListFragment extends SherlockListFragment {
 
     public final static String TAG = "VLC/AudioListActivity";
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
index eea98a2..7ca0e01 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -195,7 +195,7 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
     }
 
     public void onTextClick(View view) {
-        Intent intent = new Intent(this, AudioListActivity.class);
+        Intent intent = new Intent(this, AudioListFragment.class);
         intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
         startActivity(intent);
     }



More information about the Android mailing list