Android 音乐播放器控件的歌曲名称实现滚动显示的效果
来源:互联网 发布:淘宝店铺降权截图 编辑:程序博客网 时间:2024/04/28 23:05
前言
欢迎大家我分享和推荐好用的代码段~~
声明
欢迎转载,但请保留文章原始出处:
CSDN:http://www.csdn.net
雨季o莫忧离:http://blog.csdn.net/luckkof
正文
1、在frameworks\base\core\java\android\widget\下创建AlwaysMarqueeTextView.java,内容如下:
package android.widget;
package android.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
import android.widget.RemoteViews.RemoteView;
import android.util.AttributeSet;
import android.widget.TextView;
import android.widget.RemoteViews.RemoteView;
@RemoteView
public class AlwaysMarqueeTextView extends TextView {
public class AlwaysMarqueeTextView extends TextView {
public AlwaysMarqueeTextView(Context context) {
super(context);
}
super(context);
}
public AlwaysMarqueeTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
super(context, attrs);
}
public AlwaysMarqueeTextView(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
}
int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean isFocused() {
return true;
}
}
public boolean isFocused() {
return true;
}
}
2、执行update-api的命令:
./mk update-api
./mk update-api
3、重新编译整个工程并下载至手机。
4、修改packages\apps\Music\res\layout\下的album_appwidget.xml的
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/appwidget_text"
android:textStyle="bold"
android:textSize="18sp"
android:singleLine="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="10dip"
android:ellipsize="none"
/>
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/appwidget_text"
android:textStyle="bold"
android:textSize="18sp"
android:singleLine="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="10dip"
android:ellipsize="none"
/>
为
<AlwaysMarqueeTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/appwidget_text"
android:textStyle="bold"
android:textSize="18sp"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="10dip"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
/>
<AlwaysMarqueeTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/appwidget_text"
android:textStyle="bold"
android:textSize="18sp"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="10dip"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
/>
5、重新编译Music.apk并替换手机中的Music.apk。
- Android 音乐播放器控件的歌曲名称实现滚动显示的效果
- 酷狗音乐展示滚动歌词效果的控件实现
- android MusicPlayer 音乐播放器 Lrc歌词控件的实现
- 实现音乐播放器歌词显示效果
- 音乐播放器的滚动歌词的实现
- 实现一个android的音乐播放器
- Android:音乐播放器的实现
- Android 音乐播放器的实现
- Android简易的音乐播放器实现
- android实现简单的音乐播放器
- Android音乐播放器的简单实现
- android 简易音乐播放器的实现
- Android 实现简单的音乐播放器效果(音频文件的三种存放)
- Android 音乐播放器实现歌词显示
- 卡拉OK效果的实现-IOS音乐播放器
- 基于android的网络音乐播放器-播放音乐及收藏音乐的效果展示(四)
- 关于音乐播放器中歌词同步显示的实现
- Android应用开发--MP3音乐播放器滚动歌词实现
- MySQL master.info 0字节导致Replication搭建失败
- 杨辉三角形变型【庞果网】
- JAVA坏境变量中的JAVA_HOME path classpath 的设置与作用。
- OCP-1Z0-053-V12.02-429题
- 13.IO(二)【键盘录入】【转换流】【流的操作规律】
- Android 音乐播放器控件的歌曲名称实现滚动显示的效果
- shell编程范例之文件系统操作
- linux相关命令
- 系统架构师笔记(四)
- oracle sqlplus 常用命令
- php经典面试题--五种以上方法获取扩展名
- 自适应lable
- NSDate NSString转换
- Fragment的详细介绍和使用方法