android 音乐播放器制作 之Tabhost 简单使用(三)(1)

看完http://blog.csdn.net/woshishuoshuoa/article/details/9840857后,TabHost的基本界面已出来了,从这一节开始着手解决上节提出的四个界面,首先是Music部分,下面就先给出item_music.xml布局的代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
   <ImageView 
       android:id="@+id/img_music"
        android:layout_width="65dp"
        android:layout_height="65dp"
        android:layout_margin="5dp"
        android:src="@drawable/music"/>
    <LinearLayout 
        android:layout_width="match_parent"
        android:layout_height="65dp"
        android:layout_margin="5dp"
        android:orientation="horizontal" > 
     <LinearLayout 
         android:layout_width="190dp"
         android:layout_height="65dp"
         android:orientation="vertical"
         android:layout_weight="0" >
     <TextView
          android:id="@+id/title_music"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" 
          android:textSize="25sp"
          android:gravity="center"
          android:text="一世美好"
         />
    <TextView 
        android:id="@+id/singer_music"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:textSize="20sp"
         android:gravity="right"
         android:text="张韶涵"/>      
    </LinearLayout>

     <TextView
         android:id="@+id/time_music"
         android:layout_width="20dp"
         android:layout_height="65dp"
         android:layout_margin="5dp" 
         android:layout_weight="1"
         android:text="02:00"
         android:gravity="center"
         android:textSize="20sp"/>
 </LinearLayout> 
</LinearLayout>
效果图:


这篇仅仅给出了一个xml布局,java代码部分还没做好,不过小菜鸟在下次博文里会给出java代码的哦~~~在设计这个界面时,还是比较耗点时间的,主要烦在LinearLayout中又嵌套了LinearLayout,有点绕,不过慢慢理一理就好了呢,之后还有比这个更烦的布局,就是播放界面的布局,比较绕的,嵌套比较多。。。。欢迎喜欢安卓的亲们给出宝贵的意见哈~~~小菜鸟建议喜欢安卓的亲们,亲自动手慢慢做一做这样的界面,不要直接参考或拷贝哦~~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值