[Android] Rename activities that are now of type fragment
Ludovic Fauvet
git at videolan.org
Thu Jun 21 14:19:49 CEST 2012
android | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Jun 21 14:10:59 2012 +0200| [7bab09468d197feb19ca0b933e137ec651f7e1d8] | committer: Ludovic Fauvet
Rename activities that are now of type fragment
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=7bab09468d197feb19ca0b933e137ec651f7e1d8
---
vlc-android/AndroidManifest.xml | 4 ++--
vlc-android/src/org/videolan/vlc/MediaLibrary.java | 8 ++++----
vlc-android/src/org/videolan/vlc/ThumbnailerManager.java | 6 +++---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 12 ++++++------
...dioBrowserActivity.java => AudioBrowserFragment.java} | 2 +-
.../org/videolan/vlc/gui/audio/AudioListActivity.java | 14 +++++++-------
.../{VideoListActivity.java => VideoListFragment.java} | 2 +-
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index 891dadf..f7022b6 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -57,7 +57,7 @@
android:name=".gui.video.VideoActivityGroup"
android:theme="@android:style/Theme.NoTitleBar" />
<activity
- android:name=".gui.video.VideoListActivity"
+ android:name=".gui.video.VideoListFragment"
android:theme="@style/Theme.Sherlock"/>
<activity
android:name=".gui.video.MediaInfoActivity"
@@ -84,7 +84,7 @@
</intent-filter>
</activity>
<activity
- android:name=".gui.audio.AudioBrowserActivity"
+ android:name=".gui.audio.AudioBrowserFragment"
android:theme="@android:style/Theme.NoTitleBar" />
<activity
android:name=".gui.audio.AudioListActivity"
diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index 74a2db5..be39386 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -30,7 +30,7 @@ import java.util.List;
import java.util.Stack;
import org.videolan.vlc.gui.MainActivity;
-import org.videolan.vlc.gui.audio.AudioBrowserActivity;
+import org.videolan.vlc.gui.audio.AudioBrowserFragment;
import android.content.Context;
import android.content.SharedPreferences;
@@ -107,13 +107,13 @@ public class MediaLibrary {
boolean valid = false;
switch (mode) {
- case AudioBrowserActivity.MODE_ARTIST:
+ case AudioBrowserFragment.MODE_ARTIST:
valid = name.equals(item.getArtist()) && (name2 == null || name2.equals(item.getAlbum()));
break;
- case AudioBrowserActivity.MODE_ALBUM:
+ case AudioBrowserFragment.MODE_ALBUM:
valid = name.equals(item.getAlbum());
break;
- case AudioBrowserActivity.MODE_GENRE:
+ case AudioBrowserFragment.MODE_GENRE:
valid = name.equals(item.getGenre()) && (name2 == null || name2.equals(item.getAlbum()));
break;
default:
diff --git a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
index 5d6656c..0b3271e 100644
--- a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
+++ b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
@@ -29,7 +29,7 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.videolan.vlc.gui.MainActivity;
-import org.videolan.vlc.gui.video.VideoListActivity;
+import org.videolan.vlc.gui.video.VideoListFragment;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
@@ -45,11 +45,11 @@ public class ThumbnailerManager extends Thread {
private final Condition notEmpty = lock.newCondition();
private LibVLC mLibVlc;
- private VideoListActivity mVideoListActivity;
+ private VideoListFragment mVideoListActivity;
private int totalCount;
private float mDensity;
- public ThumbnailerManager(VideoListActivity videoListActivity) {
+ public ThumbnailerManager(VideoListFragment videoListActivity) {
mVideoListActivity = videoListActivity;
try {
mLibVlc = LibVLC.getInstance();
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index f74b266..bee398f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -28,8 +28,8 @@ import org.videolan.vlc.LibVLC;
import org.videolan.vlc.MediaLibrary;
import org.videolan.vlc.R;
import org.videolan.vlc.VLCCallbackTask;
-import org.videolan.vlc.gui.audio.AudioBrowserActivity;
-import org.videolan.vlc.gui.video.VideoListActivity;
+import org.videolan.vlc.gui.audio.AudioBrowserFragment;
+import org.videolan.vlc.gui.video.VideoListFragment;
import org.videolan.vlc.gui.video.VideoListAdapter;
import org.videolan.vlc.gui.video.VideoPlayerActivity;
import org.videolan.vlc.interfaces.ISortable;
@@ -116,14 +116,14 @@ public class MainActivity extends SherlockFragmentActivity {
mActionBar.addTab(mActionBar.newTab()
.setText("Video")
.setIcon(R.drawable.header_icon_video)
- .setTabListener(new TabListener<VideoListActivity>(
- this, "video", VideoListActivity.class)));
+ .setTabListener(new TabListener<VideoListFragment>(
+ this, "video", VideoListFragment.class)));
mActionBar.addTab(mActionBar.newTab()
.setText("Audio")
.setIcon(R.drawable.header_icon_audio)
- .setTabListener(new TabListener<AudioBrowserActivity>(
- this, "audio", AudioBrowserActivity.class)));
+ .setTabListener(new TabListener<AudioBrowserFragment>(
+ this, "audio", AudioBrowserFragment.class)));
if (savedInstanceState != null) {
mActionBar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
similarity index 99%
rename from vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java
rename to vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 91e0118..69d5916 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -64,7 +64,7 @@ import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
-public class AudioBrowserActivity extends SherlockFragment implements ISortable {
+public class AudioBrowserFragment extends SherlockFragment implements ISortable {
public final static String TAG = "VLC/AudioBrowserActivity";
private FlingViewGroup mFlingViewGroup;
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
index 0d3073f..d5538ec 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListActivity.java
@@ -120,10 +120,10 @@ public class AudioListActivity extends SherlockListActivity {
{
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
- menu.add(Menu.NONE, AudioBrowserActivity.MENU_PLAY, Menu.NONE, R.string.play);
- menu.add(Menu.NONE, AudioBrowserActivity.MENU_APPEND, Menu.NONE, R.string.append);
- menu.add(Menu.NONE, AudioBrowserActivity.MENU_PLAY_ALL, Menu.NONE, R.string.play_all);
- menu.add(Menu.NONE, AudioBrowserActivity.MENU_APPEND_ALL, Menu.NONE, R.string.append_all);
+ menu.add(Menu.NONE, AudioBrowserFragment.MENU_PLAY, Menu.NONE, R.string.play);
+ menu.add(Menu.NONE, AudioBrowserFragment.MENU_APPEND, Menu.NONE, R.string.append);
+ menu.add(Menu.NONE, AudioBrowserFragment.MENU_PLAY_ALL, Menu.NONE, R.string.play_all);
+ menu.add(Menu.NONE, AudioBrowserFragment.MENU_APPEND_ALL, Menu.NONE, R.string.append_all);
}
};
@@ -132,8 +132,8 @@ public class AudioListActivity extends SherlockListActivity {
AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo) item.getMenuInfo();
int id = item.getItemId();
- boolean play_all = id == AudioBrowserActivity.MENU_PLAY_ALL || id == AudioBrowserActivity.MENU_APPEND_ALL;
- boolean play_append = id == AudioBrowserActivity.MENU_APPEND || id == AudioBrowserActivity.MENU_APPEND_ALL;
+ boolean play_all = id == AudioBrowserFragment.MENU_PLAY_ALL || id == AudioBrowserFragment.MENU_APPEND_ALL;
+ boolean play_append = id == AudioBrowserFragment.MENU_APPEND || id == AudioBrowserFragment.MENU_APPEND_ALL;
int start_position;
List<String> medias;
@@ -197,7 +197,7 @@ public class AudioListActivity extends SherlockListActivity {
String currentItem = null;
int currentIndex = -1;
- if (name == null || mode == AudioBrowserActivity.MODE_SONG) {
+ if (name == null || mode == AudioBrowserFragment.MODE_SONG) {
mTitle.setText(R.string.songs);
itemList = AudioServiceController.getInstance().getItems();
currentItem = AudioServiceController.getInstance().getItem();
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
similarity index 99%
rename from vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java
rename to vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
index 1b6795a..b06468a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
@@ -57,7 +57,7 @@ import android.widget.ListView;
import com.actionbarsherlock.app.SherlockListFragment;
-public class VideoListActivity extends SherlockListFragment implements ISortable {
+public class VideoListFragment extends SherlockListFragment implements ISortable {
private LinearLayout mNoFileLayout;
private LinearLayout mLoadFileLayout;
More information about the Android
mailing list