安卓音乐播放器

不知不觉毕业2个半月了,在学校也学过java se,android,没做过啥项目,只是做过一些简单的demo,然而很明显企业需要的是项目经验,面试了几次虽然不多,处处碰壁,只想静下心来好好写写代码,想想基础来了工作自然就来了,男人嘛,就得不抛弃,从哪儿跌倒了从哪里爬起来,过去的时间已经过去了,尽力步入IT行业既然付出了为啥面试了几次失败了就放弃呢!这里用的开发工具是AndroidStudio前面对Eclipse算比较熟悉吧,开发工具度差不多,androidStudio是未来的开发工具,越来越流行了,

我个人的渣渣思想做的渣渣app,从界面出发  


首先是布局界面也就是Activity_main.xml它的代码如下:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@mipmap/skin_bg"
    android:orientation="vertical"
    tools:context=".MainActivity">
    <!--第一行标题栏-->
    <TextView
        android:id="@+id/tv_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="本地音乐库"
        android:textSize="25dp"
        android:textColor="#ffffff"/>
    <!--线性布局一个-->
    <LinearLayout
        android:id="@+id/control_layout"
        android:layout_width="match_parent"
        android:layout_height="65dp"
        android:layout_below="@id/tv_title"
        android:orientation="horizontal">

        <Button
            android:id="@+id/btn_previous"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:layout_weight="1"
            android:background="@mipmap/main_btn_previous"
           />

        <Button
            android:id="@+id/btn_play_pause"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:background="@mipmap/main_btn_pause"
            android:layout_weight="1"
            />
     <!--   android:background="@mipmap/btn_shuffle-->

        <Button
            android:id="@+id/btn_next"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:layout_weight="1"
            android:background="@mipmap/main_btn_next"
         />


    </LinearLayout>


	<!--底部控制栏-->
    <RelativeLayout
        android:id="@+id/main_bottom_layout"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_alignParentBottom="true"
        android:layout_weight="1"
        >
        <LinearLayout
            android:id="@+id/main_bottom_click"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_toLeftOf="@+id/btn_main_bottom_detail"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/main_bottom_image"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:src="@mipmap/music_bottom" />

            <LinearLayout
                android:id="@+id/main_bottom_v"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_toRightOf="@+id/main_bottom_image"
                android:layout_toLeftOf="@+id/btn_main_bottom_detail"
                android:orientation="vertical"
                >

                <TextView
                    android:id="@+id/tv_bottom_title"
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:text="音乐的标题"
                    android:textColor="#ffffff"
                    android:layout_weight="1"/>
                <TextView
                    android:id="@+id/tv_bottom_artist"
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:textColor="#ffffff"
                    android:text="音乐的歌手"
                    android:layout_weight="1"/>
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:orientation="horizontal">
                    <TextView
                        android:id="@+id/tv_bottom_currentTime"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:text="当前时间"
                        android:textColor="#ffffff"
                        android:layout_weight="1"/>
                    <TextView
                        android:id="@+id/tv_botton_durationTime"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_marginLeft="10dp"
                        android:textColor="#ffffff"
                        android:text="总时间"
                        />
                </LinearLayout>

            </LinearLayout>
        </LinearLayout>


        <Button
            android:id="@+id/btn_main_bottom_detail"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:text="详细信息"
            android:textColor="#ffffff"
            android:layout_alignParentRight="true"
            />
    </RelativeLayout>


    <ListView
        android:id="@+id/lv_musicList"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:focusable="true"
        android:layout_below="@+id/control_layout"
        android:layout_above="@+id/main_bottom_layout"
        >
    </ListView>
</RelativeLayout>
//andriodStudio图片显示如下

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值