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

本文讨论了如何美化Android应用的音乐列表UI,包括music_list_item_layout.xml中的布局设计,并强调了30-40岁开发者在保持技术更新和职业规划的重要性,推荐了一套全面的学习资源包,帮助提升技能并规划职业路径。
摘要由CSDN通过智能技术生成

以上第一个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” >

<ImageView

android: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” />

<TextView

android: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” />

<TextView

android: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” />

<TextView

android: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” />

第二个是用来显示歌词和控制播放的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” >

<RelativeLayout

android:id=“@+id/header_layout”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_alignParentTop=“true” >

<Button

android:id=“@id/repeat_music”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_alignParentLeft=“true”

android:background=“@drawable/repeat_none_selector” />

<Button

android:id=“@id/shuffle_music”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_alignParentRight=“true”

android:background=“@drawable/shuffle_none_selector” />

<TextView

android: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”

/>

<ScrollView

android:id=“@+id/lrcScrollView”

android:layout_width=“match_parent”

android:layout_height=“match_parent”

android:layout_below=“@id/header_layout” >

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_gravity=“center”

android:text=“好歌不容错过”

android:textAppearance=“?android:attr/textAppearanceLarge” />

<RelativeLayout

android:id=“@+id/footer_layout”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_alignParentBottom=“true” >

<RelativeLayout

android:id=“@+id/seekbarLayout”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_below=“@id/lrcScrollView”

android:background=“@drawable/player_progresslayout_bg” >

<SeekBar

android: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”

/>

<TextView

android:id=“@+id/current_progress”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_below=“@id/audioTrack”

android:text=“0:25” />

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则近万的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

img

img

img

img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:Android)

最后

我见过很多技术leader在面试的时候,遇到处于迷茫期的大龄程序员,比面试官年龄都大。这些人有一些共同特征:可能工作了7、8年,还是每天重复给业务部门写代码,工作内容的重复性比较高,没有什么技术含量的工作。问到这些人的职业规划时,他们也没有太多想法。

其实30岁到40岁是一个人职业发展的黄金阶段,一定要在业务范围内的扩张,技术广度和深度提升上有自己的计划,才有助于在职业发展上有持续的发展路径,而不至于停滞不前。

不断奔跑,你就知道学习的意义所在!

《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!

我见过很多技术leader在面试的时候,遇到处于迷茫期的大龄程序员,比面试官年龄都大。这些人有一些共同特征:可能工作了7、8年,还是每天重复给业务部门写代码,工作内容的重复性比较高,没有什么技术含量的工作。问到这些人的职业规划时,他们也没有太多想法。

其实30岁到40岁是一个人职业发展的黄金阶段,一定要在业务范围内的扩张,技术广度和深度提升上有自己的计划,才有助于在职业发展上有持续的发展路径,而不至于停滞不前。

不断奔跑,你就知道学习的意义所在!

《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值