Commit 7bab0946 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Rename activities that are now of type fragment

parent 182281d4
......@@ -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"
......
......@@ -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:
......
......@@ -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();
......
......@@ -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));
......
......@@ -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;
......
......@@ -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();
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment