所属分类:
移动互联网开发
开发工具:Java
文件大小:121KB
下载次数:1
上传日期:2017-12-30 10:48:16
说明: 如何使用MediaPlayer类来播放声音或是视频。涉及的Activity有三个:
MediaPlayerDemo:主Activity,显示示例列表。
MediaPlayerDemo_Audio: 子Activity,用于播放声音,在Launcher中没有图标。
MediaPlayerDemo_Video: 子Activity,用于播放视频,在Launcher中没有图标。
其中MediaPlayerDemo 使用四个按钮用于显示例子列表:
点击按钮后,触发子Activity,比如”Play video from local file” 将启动MediaPlayerDemo_Audio
(How to use the MediaPlayer class to play the sound or the video. There are three Activity involved:
MediaPlayerDemo: Master Activity, showing a list of examples.
MediaPlayerDemo_Audio: child Activity, used for playing sound, and there is no icon in Launcher.
MediaPlayerDemo_Video: child Activity, used to play video, and there is no icon in Launcher.
In which MediaPlayerDemo uses four buttons to display the list of examples:
Click the button, trigger Activity, such as "Play video from local file" will start MediaPlayerDemo_Audio)
文件列表:
Android ApiDemos示例解析.doc, 974408 , 2017-11-22