android 关于音乐进度 circular-music-progressbar
2016-11-08 10:48
369 查看
circular-music-progressbar
项目地址:aliab/circular-music-progressbar简介:Beautiful Circular Progress Bar with album art for android
Description
This Circular Progress bar is a designed and made for music players that need beautiful music progress bar.Usage
To use Circular Music ProgressBar you must add it as a dependency in your Gradle build:Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:allprojects { repositories { ... maven { url "https://jitpack.io" } } }Step 2. Add the dependency
dependencies { compile 'com.github.aliab:circular-music-progressbar:v1.0' }Then add the view to your layout:
<info.abdolahi.CircularMusicProgressBar xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/album_art" android:layout_width="300dp" android:layout_height="300dp" android:layout_gravity="center" android:src="@drawable/maron5" app:border_color="#00796B" app:border_width="2dp" app:centercircle_diammterer="1" app:progress_color="#80CBC4" app:progress_startAngle="40" />
XML attributes
<info.abdolahi.CircularMusicProgressBar ... app:border_color="#00796B" app:border_width="2dp" app:centercircle_diammterer="1" app:progress_color="#80CBC4" app:progress_startAngle="40" ... />
XML attributes
Name | Type | Default | Description |
---|---|---|---|
border_color | Color | Color.BLACK | ProgressBar background color |
border_width | dimen | 2 | Thicknes of progress bar |
centercircle_diammterer | Float | 0.805f | Number between 0 and 1, that change diammeter of album art image |
progress_color | Color | Color.BLUE | ProgressBar active state color |
progress_startAngle | Float | 0 | Number between 0 and 360 that describe Start angle of progress bar active state |
Public Methods
Name | Description |
---|---|
setValue(float) | change value of progress with animation |
setBorderProgressColor(Color) | set progressbar active state color |
setBorderColor(Color) | set progressbar non-active state color |
Limitations
The ScaleType is always CENTER_CROP and you'll get an exception if you try to change it. This is (currently) by design as it's perfectly fine for music album art.Enabling
adjustViewBoundsis not supported as this requires an unsupported ScaleType
If you use an image loading library like Picasso or Glide, you need to disable their fade animations to avoid messed up images. For Picasso use the
noFade()option, for Glide use
dontAnimate(). If you want to keep the fadeIn animation, you have to fetch the image into a
Targetand apply a custom animation yourself when receiving the
Bitmap.
Using a
TransitionDrawablewith
CircleImageViewdoesn't work properly and leads to messed up images.
Todo
Animation interpolator setterAnimation disable/enable method
Buffering mode animation
Drag to seek listener
change thickness of borderes independently
support shadow/glow
Changelog
v1.0.0
Initial releaseCREDITS
Special Thanks to CircleImageView.相关文章推荐
- Android 控件之ProgressBar进度条
- Android中 如何让水平进度条(ProgressBar)从左往右变化
- Android之利用Handler实现ProgressBar进度条
- 我的Android进阶之旅------>Android之进度条(ProgressBar)的功能和用法
- 【Android开发学习27】界面控件之进度条(ProgressBar)
- Android入门逆引手册 - 14 进度条(ProgressBar)的使用
- Android自定义进度条-带文本(文字进度)的水平进度条(ProgressBar)
- android之GridView异步加载图片时显示加载进度ProgressBar
- Android自定义进度条-带文本(文字进度)的水平进度条(ProgressBar)
- Android笔记: ProgressBar 圆形进度条颜色的设置
- Android深入浅出系列之实例应用—程序运行进度提示条应用ProgressBar和Handler的使用
- Android深入浅出系列之实例应用—程序运行进度提示条应用ProgressBar和Handler的使用
- android 各种进度条(ProgressBar)
- Android ProgressBar 进度条
- [Android 界面]重画Progressbar的进度
- Android关于后台下载前台通知更新进度条的问题
- Android之MediaPlayer播放音乐并实现进度条实例
- Android ProgressBar自定义图片进度,自定义渐变色进度条
- Android 进度条(ProgressBar)的使用