…
//JitPack 仓库
maven { url ‘https://jitpack.io’ }
}
}
2.在 Module 目录下的 build.gradle 中添加依赖
implementation ‘com.github.jsyjst:Yuan-LrcView:LrcView-1.2’
示例
dependencies {
implementation fileTree(dir: ‘libs’, include: [‘*.jar’])
implementation ‘com.android.support:appcompat-v7:28.0.0’
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
testImplementation ‘junit:junit:4.12’
androidTestImplementation ‘com.android.support.test🏃1.0.2’
androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’
implementation ‘com.github.jsyjst:Yuan-LrcView:LrcView-1.2’
}
使用方法
====
1.第一步,在布局文件中声明
<com.example.library.view.LrcView
android:id=“@+id/lrcView”
android:layout_width=“match_parent”
android:layout_height=“match_parent”
app:lineSpacing=“40dp”
app:textSize=“18sp”
app:lrcTextColor=“@color/colorPrimary”
app:highLineTextColor=“@color/highTextColor”
/>
属性说明:这些属性不设置的话为默认值
| 属性名 | 说明 | 默认值 |
| — | — | — |
| textSize | 歌词大小 | 16sp |
| lineSp