Android应用开发--MP3音乐播放器界面设计(2)

2013年5月25日 简、美音乐播放器开发

真得很无奈,原本打算很快结束这个实战项目的,但因为各种满课、学科、杂事给耽误了进度,现在小巫的这个简、美音乐播放器基本上已经开发出来了个原型,以后会继续在这个原型基础上添加各种功能。这篇博文继续按照UI先搭建好,再实现业务逻辑。

这里有一点说明一下,关于歌词的滚动显示,小巫还没完全实现,需要去参考一下别人的实现方法,所以布局不太确定,暂时用TextView控件代替,后面可能需要自定义TextView来实现歌词显示的功能,所以这是这个UI需要注意的。

效果图:

       

以上第一个UI是主界面的,稍微美化了一下

列表布局music_list_item_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/RelativeLayout1"android:layout_width="match_parent"android:layout_height="50.0dp"android:orientation="vertical" ><ImageViewandroid:id="@+id/albumImage"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentLeft="true"android:layout_alignParentTop="true"android:src="@drawable/item" /><TextViewandroid:id="@+id/music_duration"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentRight="true"android:layout_alignParentTop="true"android:layout_marginRight="5.0dp"android:textColor="@android:color/white"android:text="@string/time" /><TextViewandroid:id="@+id/music_title"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentTop="true"android:layout_marginLeft="5dp"android:layout_toRightOf="@+id/albumImage"android:textColor="@android:color/white"android:text="@string/siger" /><TextViewandroid:id="@+id/music_Artist"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignLeft="@+id/music_title"android:layout_below="@id/music_title"android:textColor="@android:color/white"android:text="@string/artist" /></RelativeLayout>

第二个是用来显示歌词和控制播放的UI,是这篇博文要实现的。

布局代码如下:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/RelativeLayout1"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@drawable/bg_playback" ><RelativeLayoutandroid:id="@+id/header_layout"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_alignParentTop="true" ><Buttonandroid:id="@id/repeat_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentLeft="true"android:background="@drawable/repeat_none_selector" /><Buttonandroid:id="@id/shuffle_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentRight="true"android:background="@drawable/shuffle_none_selector" /><TextViewandroid:id="@+id/musicTitle"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignBaseline="@id/repeat_music"android:layout_centerHorizontal="true"android:text="@string/siger"android:textAppearance="?android:attr/textAppearanceLarge" android:ellipsize="marquee"android:focusable="true"android:focusableInTouchMode="true"android:gravity="center_horizontal"android:lines="1"android:marqueeRepeatLimit="marquee_forever"android:textColor="@android:color/white"android:singleLine="true"/><TextView android:id="@+id/musicArtist"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@id/musicTitle"android:layout_marginTop="15dp"android:layout_centerHorizontal="true"android:textSize="18sp"android:textColor="#0F0"android:text="@string/artist"/></RelativeLayout><ScrollViewandroid:id="@+id/lrcScrollView"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_below="@id/header_layout" ><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:text="好歌不容错过"android:textAppearance="?android:attr/textAppearanceLarge" /></ScrollView><RelativeLayoutandroid:id="@+id/footer_layout"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_alignParentBottom="true" ><RelativeLayoutandroid:id="@+id/seekbarLayout"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_below="@id/lrcScrollView"android:background="@drawable/player_progresslayout_bg" ><SeekBarandroid:id="@+id/audioTrack"android:layout_width="match_parent"android:layout_height="wrap_content" android:layout_centerVertical="true"android:background="@drawable/player_progress_bg"android:progressDrawable="@drawable/seekbar_img"android:thumb="@drawable/media_player_progress_button"/><TextViewandroid:id="@+id/current_progress"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@id/audioTrack"android:text="0:25" /><TextViewandroid:id="@+id/final_progress"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentRight="true"android:layout_below="@id/audioTrack"android:text="3:59" /></RelativeLayout><RelativeLayoutandroid:id="@+id/relativeLayout2"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_below="@+id/seekbarLayout" ><Buttonandroid:id="@id/play_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_above="@+id/relativeLayout2"android:layout_centerHorizontal="true"android:background="@drawable/pause_selector" /><Buttonandroid:id="@id/next_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignBaseline="@+id/play_music"android:layout_toRightOf="@+id/play_music"android:background="@drawable/next_music_selector" /><Buttonandroid:id="@id/previous_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignBaseline="@+id/play_music"android:layout_toLeftOf="@+id/play_music"android:background="@drawable/previous_music_selector" /><Buttonandroid:id="@+id/play_queue"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignBaseline="@+id/next_music"android:layout_toRightOf="@+id/next_music"android:background="@drawable/play_queue_selector" /><Buttonandroid:id="@+id/search_music"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignBaseline="@+id/previous_music"android:layout_toLeftOf="@+id/previous_music"android:background="@drawable/search_selector" /></RelativeLayout></RelativeLayout></RelativeLayout>

关于简、美音乐播放器是小巫本人自行设计的,是我想实现的效果,只是给个参考罢了,童鞋们自己可以按照自己的想法来布局,设计出更加美观好看的界面,小巫在这个方面是有些欠缺的。由于整个项目还处于开发状态,暂时不会共享项目源代码,直到把这个播放器开发到比较完善的时候才会上传资源,小巫也会把代码贴在每一篇博文上,需要的可以参考一下。

Android应用开发--MP3音乐播放器界面设计(2)相关推荐

  1. Android应用开发--MP3音乐播放器界面设计(1)

    Android应用开发--MP3音乐播放器界面设计(1)                                           近期突然想自己开发一款MP3播放器,所以就有了上面的界面, ...

  2. 音乐应用开发Android应用开发--MP3音乐播放器界面设计(2)

    在写这篇文章之前,xxx已写过了几篇关于改音乐应用开发主题的文章,想要了解的朋友可以去翻一下之前的文章 Android应用开发--MP3音乐播放器界面计划(2) 2013年5月25日 简.美音乐播放器 ...

  3. Android应用开发--MP3音乐播放器滚动歌词实现

    Android应用开发--MP3音乐播放器滚动歌词实现 2013年6月2日  简.美音乐播放器开发记录 -----前话 有网友给我博客评论说,让我借鉴好的Android代码,代码贴出来的时候最好整体先 ...

  4. Android应用开发--MP3音乐播放器Service实现

    Android应用开发--MP3音乐播放器Service实现 2013年5月29日简.美音乐播放器开发记录 让网友们久等啦,关于简.美音乐播放器的开发,最重要的Service类总算是要发博了.关于An ...

  5. Android应用开发 MP3音乐播放器滚动歌词实现

    分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow 也欢迎大家转载本篇文章.分享知识,造福人民,实现我们中华民族伟大复兴! Andr ...

  6. Android应用开发--MP3音乐播放器代码实现(一)

    Android应用开发--MP3音乐播放器代码实现(一) 需求1:将内存卡中的MP3音乐读取出来并显示到列表当中 1. 从数据库中查询所有音乐数据,保存到List集合当中,List当中存放的是Mp3I ...

  7. 基于JavaSwing开发MP3音乐播放器 课程设计 大作业源码 毕业设计

    基于JavaSwing开发MP3音乐播放器:   (大作业) 开发环境: Windows操作系统 开发工具: MyEclipse+Jdk 运行效果图:  基于JavaSwing开发MP3音乐播放器:  ...

  8. Android应用开发--MP3音乐播放器代码实现(二)

    2013年5月25日 简.美音乐播放器开发 小巫在这里罗列这个播放器已经实现的功能: 1.   自动显示音乐列表 2.   点击列表播放音乐 3.   长按列表弹出对话框 4.   暂停音乐 5.   ...

  9. Android应用开发--MP3音乐播放器代码实现(二,android开发实例大全

    } switch (repeatState) { case isCurrentRepeat: // 单曲循环 repeatBtn .setBackgroundResource(R.drawable.r ...

最新文章

  1. R语言进行数据聚合统计(Aggregating transforms)实战:使用R原生方法、data.table、dplyr等方案、计算分组均值并添加到可视化结果中
  2. c++ 提取傅里叶描述子_Matlab | 提取图像ROI任意形状
  3. HDU3923-Invoker-polya n次二面体
  4. python安装linux软件_Linux之安装常用软件
  5. matlab广泛用于什么,目前,Matlab已成为世界上最受欢迎的科学和工程计算软件工具....
  6. 获取本地 qt_用QT实现视频/音乐播放组件
  7. 【软件开发底层知识修炼】十一 链接器-链接脚本
  8. 【HDU - 5672】String(尺取法)
  9. ARMs3c2440开发板挂接NFS服务
  10. (133)FPGA面试题-Xilinx FPGA Block RAM的三种写模式是什么?
  11. mac版本 sadptool_海康 设备 发现(SADPTool原理)
  12. OPNET14.5+WIN10+VS2010安装教程(附安装包)
  13. 蓝蓝设计 扁平化界面风格的设计
  14. CTPN源码解析2-代码整体结构和框架
  15. MATLAB强化学习实战(十一) 使用自定义训练循环训练强化学习策略
  16. EditPlus 使用技巧以及快捷键
  17. 英文状态下输入字母,字母之间的间隔较大怎么解决?
  18. 数据结构基本概念和术语
  19. 字体加密-58同城简历信息爬取
  20. 对比学习sass和stylus的常用功能

热门文章

  1. Linux查看进程号总结
  2. 只能对数值操作的TextBox
  3. 家用WIFI信号多少正常
  4. Facebook Cookbook: Building Applications to Grow Your Facebook Empire
  5. 如何修改sql服务器名,修改SQL Server数据库服务器名字
  6. 20230516使用python3确认三门问题
  7. 手机CAD看图上有哪些编辑功能呢?应该如何操作呢?
  8. Thinkpad导航键更换成上下翻页键
  9. root过程重启,免root的高级重启
  10. Excel中HLOOKUP函数的用法