菜单
  

    如图3.2所示。系统启动后,进入到主界面,可供选择的是否显示出全部音乐,如选择了则进入播放列表界面,选择用户所要播放的歌曲,同时播放歌曲。
     
    图3.2 系统控制流程图
     
    4 结论
    4.1 播放器界面
    4.1.1 播放器主界面
    播放器主界面在设计时需要充分考虑到其方便性与实用性,每一个Android的界面都是一个可视化的界面,都有其唯一的布局配置文件,在文件中我们可以根据自己的需求来配置各种布局方式,资源文件如图像,文字,颜色的引用,这样就可以形成不同的可视化界面和炫丽的效果。如图4.1所示。
     
    图4.1 播放器主界面示意图
    在main.xml文件中实现播放器主界面部分代码。
    <Galleryandroid:id="@+id/gallery"android:layout_width="fill_parent"android:layout_height="200dp"android:layout_alignParentLeft="true"android:layout_centerVertical="true" android:layout_y="20px"/>
    <LinearLayoutandroid:orientation="horizontal"android:gravity="center"android:layout_y="423px" android:layout_height="wrap_content"android:layout_width="fill_parent"android:background="@drawable/buttonground"/>
    <ImageButton android:id="@+id/btStart"android:layout_height="70dp"  
    android:layout_width="70dp"android:layout_x="145px"android:layout_y="390px"
    android:background="#00000000"android:src="@drawable/play"/>
    <LinearLayoutandroid:orientation="horizontal"android:gravity="center"android:layout_y="250px"android:layout_height="wrap_content" android:layout_width="fill_parent">
    </LinearLayout>
    </AbsoluteLayout>
    4.1.2 添加歌曲界面
    进入程序以后,因为首次登陆没有相应的歌曲,需要用户自己添加歌曲进行播放,所以需要进入添加歌曲界面,此时播放列表为空需要添加歌曲,可以选择从SD卡中添加。如图4.2所示。
     
    图4.2 播放器添加歌曲界面示意图
    添加歌曲界面部分实现代码:
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:background="@drawable/list_bg">
        <LinearLayout android:layout_width="fill_parent"
            android:gravity="center" android:layout_height="wrap_content"
            android:background="@drawable/footer_bar">
            <TextView android:text="SD卡" android:id="@+id/store_card" android:textStyle="bold"
                android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:textSize="@dimen/music_list_title"></TextView>
        </LinearLayout>
        <ListView android:id="@id/android:list" android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
            <TextView  android:layout_width="10px"
            android:layout_height="wrap_content" />
        <TextView android:id="@id/android:empty" android:layout_width="wrap_content"
  1. 上一篇:ASP.net+sqlserver手工艺分享网站设计与开发
  2. 下一篇:ASP人才招聘网站的设计与实现+ER图+流程图
  1. 基于MATLAB的图像增强算法设计

  2. 基于Kinect的手势跟踪与识别算法设计

  3. JAVA基于安卓平台的医疗护工管理系统设计

  4. 基于核独立元分析的非线...

  5. 基于Hadoop的制造过程大数据存储平台构建

  6. 基于安卓系统的测量软件...

  7. 基于VC++的GIS矢量图形系统开发

  8. 河岸冲刷和泥沙淤积的监测国内外研究现状

  9. 十二层带中心支撑钢结构...

  10. 当代大学生慈善意识研究+文献综述

  11. java+mysql车辆管理系统的设计+源代码

  12. 大众媒体对公共政策制定的影响

  13. 中考体育项目与体育教学合理结合的研究

  14. 电站锅炉暖风器设计任务书

  15. 乳业同业并购式全产业链...

  16. 酸性水汽提装置总汽提塔设计+CAD图纸

  17. 杂拟谷盗体内共生菌沃尔...

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回