linux 音频播放器源码,Android音乐播放器源码

这是一个详细的Android音乐播放器实现,包含专辑栏的UI设计和代码。源代码提供了专辑封面、艺术家和专辑名称的显示,并支持设置默认图片。源码可以在指定FTP服务器下载,适用于Android开发者学习参考。
摘要由CSDN通过智能技术生成

相当完整的Android音乐播放器,直接上效果图及源代码,自己欣赏,具体不再解释了,可以说是一个很给力的Android音乐播放器。

示例代码:

/*

* Copyright (C) 2009 Teleca Poland Sp. z o.o.

*

* Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

*      http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/

package com.teleca.jamendo.widget;

import com.teleca.jamendo.api.Album;

import com.teleca.jamendo.R;

import android.content.Context;

import android.util.AttributeSet;

import android.view.LayoutInflater;

import android.widget.LinearLayout;

import android.widget.TextView;

/**

* Widget bar represenation of album, used with AlbumBarFlipper

*

* @author Lukasz Wisniewski

*/

public class AlbumBar extends LinearLayout {

protected TextView mArtistTextView;

protected TextView mAlbumTextView;

protected TextView mDescriptionTextView;

protected RemoteImageView mCoverImageView;

public AlbumBar(Context context, AttributeSet attrs) {

super(context, attrs);

init();

}

public AlbumBar(Context context) {

super(context);

init();

}

/**

* Sharable code between constructors

*/

private void init(){

LayoutInflater.from(getContext()).inflate(R.layout.album_bar, this);

mArtistTextView = (TextView)findViewById(R.id.ArtistTextView);

mAlbumTextView = (TextView)findViewById(R.id.AlbumTextView);

mCoverImageView = (RemoteImageView)findViewById(R.id.CoverImageView);

//mCoverImageView.setDefaultImage(R.drawable.no_cd);

mCoverImageView.setImageResource(R.drawable.no_cd);

mDescriptionTextView = (TextView)findViewById(R.id.DescriptionTextView);

}

public void setAlbum(Album album){

mArtistTextView.setText(album.getArtistName());

mAlbumTextView.setText(album.getName());

mCoverImageView.setDefaultImage(R.drawable.no_cd);

mCoverImageView.setImageUrl(album.getImage());

}

public void setDescription(String description){

mDescriptionTextView.setText(description);

}

public void setDescription(int resid){

mDescriptionTextView.setText(resid);

}

}

效果图:

1f9c487757a729546178314244730011.png

1d04cdeb77f0a1882961f125c0e8d52f.png

48be128a74e2bc1af3bab829caaddb86.png

Android音乐播放器源码下载在Linux公社的1号FTP服务器里,下载地址:

用户名:www.linuxidc.com

密码:www.muu.cc

在 2011年LinuxIDC.com\10月\Android音乐播放器源码

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值