为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

android实验报告MP3播放器

2017-10-10 10页 doc 46KB 43阅读

用户头像

is_597436

暂无简介

举报
android实验报告MP3播放器android实验报告MP3播放器 LIAOCHENG UNIVERSITY 计算机学院实验报告 【20 14 ,20 15 学年第 2 学期】 【一、基本信息】 【实验课程】 Android应用程序开发 【设课形式】 独立? 非独立? 【课程学分】 2 实验四:后台服务【实验项目】 4 【项目类型】 基础?综合? 设计? 研究创新? 其它[ ] 【项目学时】 【学生姓名】 【学 号】 【系别专业】 【实验班组】 级 班 组 台 【同组学生】 【实验室名】 【实验日期】 【报告日期】 【二、实验教师...
android实验报告MP3播放器
android实验报告MP3播放器 LIAOCHENG UNIVERSITY 计算机学院实验报告 【20 14 ,20 15 学年第 2 学期】 【一、基本信息】 【实验课程】 Android应用程序开发 【设课形式】 独立? 非独立? 【课程学分】 2 实验四:后台服务【实验项目】 4 【项目类型】 基础?综合? ? 研究创新? 其它[ ] 【项目学时】 【学生姓名】 【学 号】 【系别专业】 【实验班组】 级 班 组 台 【同组学生】 【实验室名】 【实验日期】 【报告日期】 【二、实验教师对报告的最终及处理意见】 实验成绩: ,涂改无效, 指导教师签名: 年 月 日 注:要将实验项目、实验课程的成绩评定及课程考核办法明确告知学生,并报实验管理中心备案 Cypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the minjiang River size 31 terminals; the South stream in the territory of the port along the Yangtze River has a size ... 3.1.2 road traffic system in urban traffic status 1, 1) layout of the road network under the geographical and socio-economic development, roads within each group in Yibin city road network layout 【三、实验预习】 【实验目的】 1、掌握本地服务的管理方法 2、掌握服务的隐式启动和显式启动方法 4、掌握远程服务的绑定和调用方法 5、了解AIDL语言的用途和语法 【实验内容】 开发简易音乐播放程序,用后台服务功能实现音乐播放、暂停、切换等基本功能。要求分别以启动方式和绑定方式管理后 台服务。 【实验设备】 安装配置了安卓组件的windows操作系统 【四、实验过程、数据和实验结果记录】 实验设计(实验方法、步骤、操作过程、设计型实验、实验数据记录格): package org.app.musicplayer; import android.os.Bundle; import android.widget.RadioGroup; import android.widget.TabHost; import android.widget.RadioGroup.OnCheckedChangeListener; import android.app.TabActivity; import android.content.Intent; public class MainActivity extends TabActivity implements OnCheckedChangeListener{ private TabHost tabhost; private RadioGroup radiogroup; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tabhost_list); tabhost=getTabHost(); radiogroup=(RadioGroup) findViewById(R.id.tab_group); radiogroup.setOnCheckedChangeListener(this); radiogroup.setClickable(true); tabhost.addTab(tabhost.newTabSpec("local").setIndicator("local").setContent(new 2Yibin city road network layouteconomic development, roads within each group in -traffic status 1, 1) layout of the road network under the geographical and socio nals; the South stream in the territory of the port along the Yangtze River has a size ... 3.1.2 road traffic system in urbannjiang River size 31 termiCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi Intent(this,MusicListActivity.class))); tabhost.addTab(tabhost.newTabSpec("fav").setIndicator("fav").setContent(new Intent(this,FavroiteActivity.class))); tabhost.addTab(tabhost.newTabSpec("online").setIndicator("online").setContent(new Intent(this,MusicOnlineActivity.class))); } @Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (checkedId) { case R.id.local: tabhost.setCurrentTabByTag("local"); break; case R.id.fav: tabhost.setCurrentTabByTag("fav"); break; case R.id.online: tabhost.setCurrentTabByTag("online"); break; } } package org.app.netmusic; import java.util.List; import org.app.musicplayer.R; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.TextView; public class NetMusicAdapter extends BaseAdapter { private List data; private Context context; private int[] playerInfo=new int[2];//0:playerId,1:playerstate private ItemListener mItemListener; public NetMusicAdapter(Context context,List data){ this.context=context; this.data=data; playerInfo[0]=-1; 3economic development, roads within each group in Yibin city road network layout-raphical and socioangtze River has a size ... 3.1.2 road traffic system in urban traffic status 1, 1) layout of the road network under the geognjiang River size 31 terminals; the South stream in the territory of the port along the YCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi playerInfo[1]=-1; } public NetMusicAdapter setItemListener(ItemListener mItemListener){ this.mItemListener=mItemListener; return this; } public void setPlayerInfo(int[] playerInfo){ this.playerInfo=playerInfo; notifyDataSetChanged(); } public void setPlayerState(int playerState){ this.playerInfo[1]=playerState; notifyDataSetChanged(); } public int getCount() { return data.size(); } public Object getItem(int position) { return data.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder=null; if(convertView==null){ viewHolder=new ViewHolder(); convertView=LayoutInflater.from(context).inflate(R.layout.song_list_item_web, null); viewHolder.tv_web_list_item_number=(TextView)convertView.findViewById(R.id.tv_web_list_item_number); viewHolder.tv_web_list_item_top=(TextView)convertView.findViewById(R.id.tv_web_list_item_top); viewHolder.tv_web_list_item_bottom=(TextView)convertView.findViewById(R.id.tv_web_list_item_bottom); viewHolder.ibtn_web_list_item_download=(Button)convertView.findViewById(R.id.ibtn_web_list_item_download); convertView.setTag(viewHolder); }else{ viewHolder=(ViewHolder)convertView.getTag(); } 4Yibin city road network layouteconomic development, roads within each group in -traffic status 1, 1) layout of the road network under the geographical and socio nals; the South stream in the territory of the port along the Yangtze River has a size ... 3.1.2 road traffic system in urbannjiang River size 31 termiCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi final Song song=data.get(position); viewHolder.tv_web_list_item_number.setText((position+1)+""); viewHolder.tv_web_list_item_number.setBackgroundResource(0); viewHolder.tv_web_list_item_top.setText(song.getName()); viewHolder.tv_web_list_item_top.setTag(song.getId()); viewHolder.tv_web_list_item_bottom.setText(song.getArtist().getName()); viewHolder.ibtn_web_list_item_download.setTag(song.getNetUrl());//文件路径 viewHolder.ibtn_web_list_item_download.setOnClickListener(new OnClickListener() { public void onClick(View v) { if(mItemListener!=null){ mItemListener.onDownLoad(song); } } }); viewHolder.ibtn_web_list_item_download.setFocusable(false); viewHolder.ibtn_web_list_item_download.setFocusableInTouchMode(false); return convertView; } public class ViewHolder{ public TextView tv_web_list_item_number; public TextView tv_web_list_item_top; public TextView tv_web_list_item_bottom; public Button ibtn_web_list_item_download; } public interface ItemListener{ void onDownLoad(Song song); } 5economic development, roads within each group in Yibin city road network layout-raphical and socioangtze River has a size ... 3.1.2 road traffic system in urban traffic status 1, 1) layout of the road network under the geognjiang River size 31 terminals; the South stream in the territory of the port along the YCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi } 合格? 不合格? 记录成绩(涂改无效) 【五、实验结果】 合格? 不合格? 实验预习成绩(涂改无效) 6Yibin city road network layouteconomic development, roads within each group in -traffic status 1, 1) layout of the road network under the geographical and socio nals; the South stream in the territory of the port along the Yangtze River has a size ... 3.1.2 road traffic system in urbannjiang River size 31 termiCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi ?根据理论知识对所得到的实验数据或结果进行解释、分析。?对实验结果所作的一般性的判断、归纳、概括,实验的心得体会、建议等。 后台服务是通过启动方式或者绑定方式开启的。 在启动方式中,启动Service的组件不能够获取Service的对象实例 而在绑定方式中,可以调用Service中实现的函数。 7economic development, roads within each group in Yibin city road network layout-raphical and socioangtze River has a size ... 3.1.2 road traffic system in urban traffic status 1, 1) layout of the road network under the geognjiang River size 31 terminals; the South stream in the territory of the port along the YCypress Harbor, nanxi port and zhicheng Harbor, Cypress port along the Yangtze River, are distributed on both sides of the mi
/
本文档为【android实验报告MP3播放器】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索