一个模仿网易云音乐的竖线动画View

先放上地址GitHub,欢迎star,欢迎给我发issues
也欢迎star我的另外一个库LDialog

MusicAnimLine

在使用网易云音乐的时候,偶然发现iOS版<网易云音乐>的垂直线条动画view,觉得挺好看,很有动感,所以将其模仿到了Android上。实现的方法比较笨拙,代码写得还不够好,欢迎多多指教。

预览

iOS网易云 原版

NeteaseIOS.jpg

模仿实现效果

image

获取

先在 build.gradle 的 repositories 添加:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

再在dependencies添加:

dependencies {
    implementation 'com.github.limuyang2:MusicAnimLine:0.1'
}

使用

<top.limuyang2.musicanimlineview.MusicAnimLineView
    android:id="@+id/lineView"
    android:layout_width="150dp"
        android:layout_height="150dp"
        app:isAutoPlay="false"
        app:line_color="#22b1f9"
        app:line_width="3dp" />

属性说明

属性 说明
app:line_width 竖线宽度(单位DP)
app:line_color 竖线颜色
app:animDuration 动画时长
app:isAutoPlay 是否自动播放
方法 startAnim() 播放动画

License

2018 limuyang
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.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。