• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java VideoPlayerActivity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.videolan.vlc.gui.video.VideoPlayerActivity的典型用法代码示例。如果您正苦于以下问题:Java VideoPlayerActivity类的具体用法?Java VideoPlayerActivity怎么用?Java VideoPlayerActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VideoPlayerActivity类属于org.videolan.vlc.gui.video包,在下文中一共展示了VideoPlayerActivity类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: openMediaFile

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
private void openMediaFile(int p) {
    AudioServiceController audioController = AudioServiceController.getInstance();
    String mediaFile = mDirectoryAdapter.getMediaLocation(p);

    try {
        if (LibVLC.getExistingInstance() == null
                || !LibVLC.getExistingInstance().hasVideoTrack(mediaFile)) {
            List<String> mediaLocations = mDirectoryAdapter.getAllMediaLocations();
            audioController.load(mediaLocations, mediaLocations.indexOf(mediaFile));
        } else {
            VideoPlayerActivity.start(getActivity(), mediaFile);
        }
    } catch (IOException e) {
        /* disk error maybe? */
    }
}
 
开发者ID:smyhvae,项目名称:VlcTest,代码行数:17,代码来源:DirectoryViewFragment.java


示例2: handleVout

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
private void handleVout() {
    if (!hasCurrentMedia())
        return;
    Log.i(TAG, "Obtained video track");
    String title = getCurrentMedia().getTitle();
    String MRL = mLibVLC.getMediaList().getMRL(mCurrentIndex);
    int index = mCurrentIndex;
    mCurrentIndex = -1;
    mEventHandler.removeHandler(mVlcEventHandler);
    // Preserve playback when switching to video
    hideNotification(false);

    // Don't crash if user stopped the media
    if(!mLibVLC.isPlaying()) return;

    // Switch to the video player & don't lose the currently playing stream
    VideoPlayerActivity.start(VLCApplication.getAppContext(), MRL, title, index, true);
}
 
开发者ID:KlepikovMD,项目名称:popcorntime-android-kitkat,代码行数:19,代码来源:AudioService.java


示例3: playVideo

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
public String playVideo() {
	if (!"".equals(videoPath)) {
		Intent i = new Intent(this, VideoPlayerActivity.class);
		i.setAction(Intent.ACTION_VIEW);
		i.setData(Uri.parse("file://" + videoPath));

		if (!"".equals(subtitlePath)) {
			i.putExtra(VideoPlayerActivity.SUBTITLE_EXTARA_KEY, subtitlePath);
			i.putExtra(VideoPlayerActivity.SUBTITLE_ENCODING_EXTARA_KEY, subtitleEncoding);
		}
		
		if (!"".equals(fileName)) {
			i.putExtra(VideoPlayerActivity.FILENAME_EXTARA_KEY, fileName);
		}
		
		startActivity(i);
	}
	return videoPath;
}
 
开发者ID:KlepikovMD,项目名称:popcorntime-android-kitkat,代码行数:20,代码来源:HostActivity.java


示例4: openMedia

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
public static void openMedia(final Context context, final MediaWrapper media){
    if (media == null)
        return;
    if (media.getType() == MediaWrapper.TYPE_VIDEO)
        VideoPlayerActivity.start(context, media.getUri(), media.getTitle());
    else if (media.getType() == MediaWrapper.TYPE_AUDIO) {
        new DialogCallback(context, new DialogCallback.Runnable() {
            @Override
            public void run(PlaybackService service) {
                service.load(media);
            }
        });
    }
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:15,代码来源:Util.java


示例5: getHelper

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
private static PlaybackServiceActivity.Helper getHelper(Activity activity) {
    if (activity == null)
        return null;

    if ((activity instanceof AudioPlayerContainerActivity))
        return ((AudioPlayerContainerActivity) activity).getHelper();
    else if ((activity instanceof PlaybackServiceActivity))
        return ((PlaybackServiceActivity) activity).getHelper();
    else if ((activity instanceof VideoPlayerActivity))
        return ((VideoPlayerActivity) activity).getHelper();
    else
        return null;
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:14,代码来源:PlaybackServiceFragment.java


示例6: onClick

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
public void onClick(View v) {
    switch (v.getId()){
        case R.id.sleep_icon:
            if (VLCApplication.sPlayerSleepTime == null)
                showTimePickerFragment(ACTION_SLEEP_TIMER);
            else {
                setSleep(null);
                mHandler.sendEmptyMessage(TOGGLE_CANCEL);
            }
            break;
        case R.id.playback_speed_icon:
            showPlayBackSpeedDialog();
            break;
        case R.id.jump_chapter_title:
            showSelectChapterDialog();
            break;
        case R.id.audio_delay:
            showAudioSpuDelayControls(ACTION_AUDIO_DELAY);
            break;
        case R.id.spu_delay:
            showAudioSpuDelayControls(ACTION_SPU_DELAY);
            break;
        case R.id.jump_title:
            showTimePickerFragment(ACTION_JUMP_TO_TIME);
            break;
        case R.id.play_as_audio_icon:
            ((VideoPlayerActivity)getActivity()).switchToAudioMode(true);
            break;
        case R.id.opt_equalizer:
            Intent i = new Intent(getActivity(), SecondaryActivity.class);
            i.putExtra("fragment", SecondaryActivity.EQUALIZER);
            startActivity(i);
            dismiss();
            break;
    }
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:38,代码来源:AdvOptionsDialog.java


示例7: switchToVideo

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@MainThread
public boolean switchToVideo() {
    if (!canSwitchToVideo())
        return false;
    if (!mMediaPlayer.getVLCVout().areViewsAttached())
        VideoPlayerActivity.startOpened(VLCApplication.getAppContext(), mCurrentIndex);
    return true;
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:9,代码来源:PlaybackService.java


示例8: buildPendingIntent

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
private PendingIntent buildPendingIntent(MediaWrapper mediaWrapper, int id) {
    Intent intent = new Intent(mContext, VideoPlayerActivity.class);
    intent.setAction(VideoPlayerActivity.PLAY_FROM_VIDEOGRID);
    intent.putExtra(VideoPlayerActivity.PLAY_EXTRA_ITEM_LOCATION, mediaWrapper.getUri());
    intent.putExtra(VideoPlayerActivity.PLAY_EXTRA_ITEM_TITLE, mediaWrapper.getTitle());
    intent.putExtra(VideoPlayerActivity.PLAY_EXTRA_FROM_START, false);

    PendingIntent pi = PendingIntent.getActivity(this, id, intent, PendingIntent.FLAG_UPDATE_CURRENT);
    return pi;
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:11,代码来源:RecommendationsService.java


示例9: onClick

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
public void onClick(View v) {
    switch (v.getId()){
        case R.id.sleep:
            if (VLCApplication.sPlayerSleepTime == null)
                showTimePickerFragment(ACTION_SLEEP_TIMER);
            else {
                setSleep(null);
                initSleep();
            }
            break;
        case R.id.playback_speed:
            showPlayBackSpeedDialog();
            break;
        case R.id.jump_chapter_title:
            showSelectChapterDialog();
            break;
        case R.id.audio_delay:
            showAudioSpuDelayControls(ACTION_AUDIO_DELAY);
            break;
        case R.id.spu_delay:
            showAudioSpuDelayControls(ACTION_SPU_DELAY);
            break;
        case R.id.jump_title:
            showTimePickerFragment(ACTION_JUMP_TO_TIME);
            break;
        case R.id.play_as_audio_icon:
            ((VideoPlayerActivity)getActivity()).switchToAudioMode(true);
            break;
        case R.id.opt_equalizer:
            Intent i = new Intent(getActivity(), SecondaryActivity.class);
            i.putExtra("fragment", SecondaryActivity.EQUALIZER);
            startActivity(i);
            dismiss();
            break;
    }
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:38,代码来源:AdvOptionsDialog.java


示例10: startStreaming

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
/**
 * Starts streaming the video with VLC and cleans up the dialog and poller
 */
private void startStreaming() {
	Uri videoLink = XMLRPCDownloadManager.getInstance().getVideoUri();
	if (videoLink != null) {
		Intent intent = new Intent(Intent.ACTION_VIEW,
				XMLRPCDownloadManager.getInstance().getVideoUri(),
				mActivity.getApplicationContext(),
				VideoPlayerActivity.class);
		mActivity.startActivity(intent);
		pDialog.dismiss();
	} else
		pDialog.setMessage("No video file could be found in the torrent");

	mPoller.stop();
}
 
开发者ID:Tribler,项目名称:tribler-android,代码行数:18,代码来源:PlayButtonListener.java


示例11: onContextItemSelected

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
public boolean onContextItemSelected(MenuItem item) {
    if(!getUserVisibleHint()) return super.onContextItemSelected(item);

    AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
    if(info == null) // info can be null
        return super.onContextItemSelected(item);

    int id = item.getItemId();
    String mediaLocation = mDirectoryAdapter.getMediaLocation(info.position);
    if (mediaLocation == null)
        return super.onContextItemSelected(item);

    if(id == R.id.directory_view_play) {
        openMediaFile(info.position);
        return true;
    } else if(id == R.id.directory_view_append) {
        AudioServiceController.getInstance().append(mediaLocation);
        return true;
    } else if(id == R.id.directory_view_delete) {
        AlertDialog alertDialog = CommonDialogs.deleteMedia(getActivity(), mediaLocation,
                new VLCRunnable() {
                    @Override
                    public void run(Object o) {
                        refresh();
                    }
                });
        alertDialog.show();
    } else if(id == R.id.directory_view_play_audio) {
        AudioServiceController.getInstance().load(mediaLocation, true);
    } else if(id == R.id.directory_view_play_video) {
        VideoPlayerActivity.start(getActivity(), mediaLocation);
    }
    return super.onContextItemSelected(item);
}
 
开发者ID:smyhvae,项目名称:VlcTest,代码行数:36,代码来源:DirectoryViewFragment.java


示例12: onListItemClick

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
    if (getListAdapter() == mHistoryAdapter) {
        String selection = ((TextView) v.findViewById(android.R.id.text1)).getText().toString();
        mSearchText.setText(selection);
        mSearchText.setSelection(selection.length());
        mSearchText.requestFocus();
    } else if (getListAdapter() == mResultAdapter) {
        // add search text to the database (history)
        MediaDatabase db = MediaDatabase.getInstance();
        db.addSearchhistoryItem(mSearchText.getText().toString());

        // open media in the player
        Media item = (Media) getListView().getItemAtPosition(position);
        if (item != null) {
            if (item.getType() == Media.TYPE_VIDEO) {
                VideoPlayerActivity.start(getActivity(), item.getLocation());
            } else {
                ArrayList<String> arr = new ArrayList<String>();
                for (int i = 0; i < getListAdapter().getCount(); i++) {
                    Media audioItem = (Media) getListAdapter().getItem(i);
                    if (audioItem.getType() == Media.TYPE_AUDIO)
                        arr.add(audioItem.getLocation());
                }
                AudioServiceController.getInstance().load(arr, arr.indexOf(item.getLocation()));
                return;
            }
        }
        super.onListItemClick(l, v, position, id);

    }
}
 
开发者ID:smyhvae,项目名称:VlcTest,代码行数:33,代码来源:SearchFragment.java


示例13: handleVout

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
private void handleVout() {
    if (!hasCurrentMedia())
        return;
    Log.i(TAG, "Obtained video track");
    String title = getCurrentMedia().getTitle();
    String MRL = mLibVLC.getMediaList().getMRL(mCurrentIndex);
    int index = mCurrentIndex;
    mCurrentIndex = -1;
    mEventHandler.removeHandler(mVlcEventHandler);
    // Preserve playback when switching to video
    hideNotification(false);

    // Switch to the video player & don't lose the currently playing stream
    VideoPlayerActivity.start(VLCApplication.getAppContext(), MRL, title, index, true);
}
 
开发者ID:smyhvae,项目名称:VlcTest,代码行数:16,代码来源:AudioService.java


示例14: onContextItemSelected

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
public boolean onContextItemSelected(MenuItem item) {
    if(!getUserVisibleHint()) return super.onContextItemSelected(item);

    AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
    if(info == null) // info can be null
        return super.onContextItemSelected(item);

    int id = item.getItemId();
    String mediaLocation = mDirectoryAdapter.getMediaLocation(info.position);
    if (mediaLocation == null)
        return super.onContextItemSelected(item);

    if(id == R.id.directory_view_play) {
        openMediaFile(info.position);
        return true;
    } else if(id == R.id.directory_view_append) {
        AudioServiceController.getInstance().append(mediaLocation);
        return true;
    } else if(id == R.id.directory_view_delete) {
        AlertDialog alertDialog = CommonDialogs.deleteMedia(getActivity(), mediaLocation,
                new VlcRunnable() {
                    @Override
                    public void run(Object o) {
                        refresh();
                    }
                });
        alertDialog.show();
    } else if(id == R.id.directory_view_play_audio) {
        AudioServiceController.getInstance().load(mediaLocation, true);
    } else if(id == R.id.directory_view_play_video) {
        VideoPlayerActivity.start(getActivity(), mediaLocation);
    }
    return super.onContextItemSelected(item);
}
 
开发者ID:KlepikovMD,项目名称:popcorntime-android-kitkat,代码行数:36,代码来源:DirectoryViewFragment.java


示例15: onListItemClick

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
    if (getListAdapter() == mHistoryAdapter) {
        String selection = ((TextView) v.findViewById(android.R.id.text1)).getText().toString();
        mSearchText.setText(selection);
        mSearchText.setSelection(selection.length());
        mSearchText.requestFocus();
    } else if (getListAdapter() == mResultAdapter) {
        // add search text to the database (history)
        MediaDatabase db = MediaDatabase.getInstance(this);
        db.addSearchhistoryItem(mSearchText.getText().toString());

        // open media in the player
        Media item = (Media) getListAdapter().getItem(position - 1);
        if (item.getType() == Media.TYPE_VIDEO) {
            VideoPlayerActivity.start(this, item.getLocation());
        } else {
            ArrayList<String> arr = new ArrayList<String>();
            for (int i = 0; i < getListAdapter().getCount(); i++) {
                Media audioItem = (Media) getListAdapter().getItem(i);
                if (audioItem.getType() == Media.TYPE_AUDIO)
                    arr.add(audioItem.getLocation());
            }
            AudioServiceController.getInstance().load(arr, arr.indexOf(item.getLocation()));
            finish();
            return;
        }
        super.onListItemClick(l, v, position, id);

    }
}
 
开发者ID:KlepikovMD,项目名称:popcorntime-android-kitkat,代码行数:32,代码来源:SearchActivity.java


示例16: startStreaming

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
/**
 * Starts streaming the video with VLC and cleans up the dialog and poller
 */
private void startStreaming() {
	Uri videoLink = XMLRPCDownloadManager.getInstance().getVideoUri();
	if (videoLink != null) {
		Intent intent = new Intent(Intent.ACTION_VIEW,
				XMLRPCDownloadManager.getInstance().getVideoUri(),
				mActivity.getApplicationContext(),
				VideoPlayerActivity.class);
		mActivity.startActivity(intent);
		aDialog.cancel();
	} else
		aDialog.setMessage("No video file could be found in the torrent");

	mPoller.stop();
}
 
开发者ID:wtud,项目名称:tsap,代码行数:18,代码来源:PlayButtonListener.java


示例17: onOptionsItemSelected

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
/**
 * Handle onClick form menu buttons
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {

    // Current fragment loaded
    Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);

    // Handle item selection
    switch (item.getItemId()) {
        case R.id.ml_menu_sortby_name:
        case R.id.ml_menu_sortby_length:
        case R.id.ml_menu_sortby_date:
            if (current == null)
                break;
            if (current instanceof ISortable) {
                int sortBy = VideoListAdapter.SORT_BY_TITLE;
                if (item.getItemId() == R.id.ml_menu_sortby_length)
                    sortBy = VideoListAdapter.SORT_BY_LENGTH;
                else if(item.getItemId() == R.id.ml_menu_sortby_date)
                    sortBy = VideoListAdapter.SORT_BY_DATE;
                ((ISortable) current).sortBy(sortBy);
                supportInvalidateOptionsMenu();
            }
            break;
        case R.id.ml_menu_equalizer:
            showSecondaryFragment(SecondaryActivity.EQUALIZER);
            break;
        // Refresh
        case R.id.ml_menu_refresh:
            if (!mMediaLibrary.isWorking()) {
                if(current != null && current instanceof IRefreshable)
                    ((IRefreshable) current).refresh();
                else
                    mMediaLibrary.loadMediaItems(true);
            }
            break;
        // Restore last playlist
        case R.id.ml_menu_last_playlist:
            if (current instanceof AudioBrowserFragment) {
                Intent i = new Intent(PlaybackService.ACTION_REMOTE_LAST_PLAYLIST);
                sendBroadcast(i);
            } else if (current instanceof VideoGridFragment) {
                final Uri uri = Uri.parse(mSettings.getString(PreferencesActivity.VIDEO_LAST, null));
                if (uri != null)
                    VideoPlayerActivity.start(this, uri);
            }
            break;
        case android.R.id.home:
            // Slide down the audio player.
            if (slideDownAudioPlayer())
                break;
            /* Toggle the sidebar */
            if (mDrawerToggle.onOptionsItemSelected(item)) {
                return true;
            }
            break;
        case R.id.ml_menu_clean:
            if (getFragment(mCurrentFragment) instanceof MRLPanelFragment)
                ((MRLPanelFragment)getFragment(mCurrentFragment)).clearHistory();
            break;
        case R.id.ml_menu_save:
            if (current == null)
                break;
            ((NetworkBrowserFragment)current).toggleFavorite();
            item.setIcon(R.drawable.ic_menu_bookmark_w);
            break;
    }
    mDrawerLayout.closeDrawer(mListView);
    return super.onOptionsItemSelected(item);
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:73,代码来源:MainActivity.java


示例18: handleContextItemSelected

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
protected boolean handleContextItemSelected(MenuItem item, int position) {
        int id = item.getItemId();
        if (! (mAdapter.getItem(position) instanceof MediaWrapper))
            return super.onContextItemSelected(item);
        MediaWrapper mw = (MediaWrapper) mAdapter.getItem(position);
        switch (id){
            case R.id.directory_view_play:
                mw.removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
                Util.openMedia(getActivity(), mw);
                return true;
            case R.id.directory_view_append: {
                if (mService != null)
                    mService.append(mw);
                return true;
            }
            case R.id.directory_view_delete:
                AlertDialog alertDialog = CommonDialogs.deleteMedia(
                        mw.getType(), getActivity(), mw.getLocation(),
                        new VLCRunnable() {
                            @Override
                            public void run(Object o) {
                                refresh();
                            }
                        });
                alertDialog.show();
                return true;
            case  R.id.directory_view_info:
                Intent i = new Intent(getActivity(), SecondaryActivity.class);
                i.putExtra("fragment", "mediaInfo");
                i.putExtra("param", mw.getUri().toString());
                startActivity(i);
                return true;
            case R.id.directory_view_play_audio: {
                if (mService != null) {
                    mw.addFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
                    mService.load(mw);
                }
                return true;
            }
            case  R.id.directory_view_play_video:
                VideoPlayerActivity.start(getActivity(), mw.getUri());
                return true;
            case R.id.directory_view_play_folder:
                ArrayList<MediaWrapper> mediaList = new ArrayList<MediaWrapper>();
                for (MediaWrapper mediaItem : mMediaLists.get(position)){
                    if (mediaItem.getType() == MediaWrapper.TYPE_AUDIO || mediaItem.getType() == MediaWrapper.TYPE_VIDEO)
                        mediaList.add(mediaItem);
                }
                Util.openList(getActivity(), mediaList, 0);
                return true;
//            case R.id.directory_view_hide_media:
//                try {
//                    if (new File(mw.getLocation()+"/.nomedia").createNewFile())
//                        updateLib();
//                } catch (IOException e) {}
//                return true;
//            case R.id.directory_view_show_media:
//                if (new File(mw.getLocation()+"/.nomedia").delete())
//                    updateLib();
//                return true;
        }
        return false;
    }
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:64,代码来源:BaseBrowserFragment.java


示例19: onOptionsItemSelected

import org.videolan.vlc.gui.video.VideoPlayerActivity; //导入依赖的package包/类
/**
 * Handle onClick form menu buttons
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {

    // Current fragment loaded
    Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);

    // Handle item selection
    switch (item.getItemId()) {
        case R.id.ml_menu_sortby_name:
        case R.id.ml_menu_sortby_length:
        case R.id.ml_menu_sortby_date:
            if (current == null)
                break;
            if (current instanceof ISortable) {
                int sortBy = VideoListAdapter.SORT_BY_TITLE;
                if (item.getItemId() == R.id.ml_menu_sortby_length)
                    sortBy = VideoListAdapter.SORT_BY_LENGTH;
                else if(item.getItemId() == R.id.ml_menu_sortby_date)
                    sortBy = VideoListAdapter.SORT_BY_DATE;
                ((ISortable) current).sortBy(sortBy);
                supportInvalidateOptionsMenu();
            }
            break;
        case R.id.ml_menu_equalizer:
            showSecondaryFragment(SecondaryActivity.EQUALIZER);
            break;
        // Refresh
        case R.id.ml_menu_refresh:
            if (!mMediaLibrary.isWorking()) {
                if(current != null && current instanceof IRefreshable)
                    ((IRefreshable) current).refresh();
                else
                    mMediaLibrary.scanMediaItems(true);
            }
            break;
        // Restore last playlist
        case R.id.ml_menu_last_playlist:
            if (current instanceof AudioBrowserFragment) {
                Intent i = new Intent(PlaybackService.ACTION_REMOTE_LAST_PLAYLIST);
                sendBroadcast(i);
            } else if (current instanceof VideoGridFragment) {
                final Uri uri = Uri.parse(mSettings.getString(PreferencesActivity.VIDEO_LAST, null));
                if (uri != null)
                    VideoPlayerActivity.start(this, uri);
            }
            break;
        case android.R.id.home:
            // Slide down the audio player.
            if (slideDownAudioPlayer())
                break;
            /* Toggle the sidebar */
            if (mDrawerToggle.onOptionsItemSelected(item)) {
                return true;
            }
            break;
        case R.id.ml_menu_clean:
            if (getFragment(mCurrentFragment) instanceof MRLPanelFragment)
                ((MRLPanelFragment)getFragment(mCurrentFragment)).clearHistory();
            break;
        case R.id.ml_menu_save:
            if (current == null)
                break;
            ((NetworkBrowserFragment)current).toggleFavorite();
            item.setIcon(R.drawable.ic_menu_bookmark_w);
            break;
    }
    mDrawerLayout.closeDrawer(mListView);
    return super.onOptionsItemSelected(item);
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:73,代码来源:MainActivity.java



注:本文中的org.videolan.vlc.gui.video.VideoPlayerActivity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GenJDKLevel类代码示例发布时间:2022-05-22
下一篇:
Java Task类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap