在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):akexorcist/RoundCornerProgressBar开源软件地址(OpenSource Url):https://github.com/akexorcist/RoundCornerProgressBar开源编程语言(OpenSource Language):Java 75.3%开源软件介绍(OpenSource Introduction):RoundCornerProgressBarRound corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which you can customized a color and corner radius DownloadSince version 2.1.2 will move from JCenter to MavenCentral // build.gradle (project)
allprojects {
repositories {
mavenCentral()
/* ... */
}
} Gradle implementation 'com.akexorcist:round-corner-progress-bar:2.1.2' Migrate from 2.0.x to 2.1.x or higherBaseRoundCornerProgressBar.OnProgressChangedListenerChange the view ID parameter in // Old
fun onProgressChanged(
viewId: Int,
progress: Float,
isPrimaryProgress: Boolean,
isSecondaryProgress: Boolean
)
// New
fun onProgressChanged(
view: View,
progress: Float,
isPrimaryProgress: Boolean,
isSecondaryProgress: Boolean
) Custom your own progress bar by extends BaseRoundCornerProgressBarUse AnimatedRoundCornerProgressBar instead of BaseRoundCornerProgressBar for progress change animation support. class CustomRoundCornerProgressBar: AnimatedRoundCornerProgressBar() {
/* ... */
} And you do not have to create the // Old
fun drawProgress(
layoutProgress: LinearLayout,
max: Float,
progress: Float,
totalWidth: Float,
radius: Int,
padding: Int,
progressColor: Int,
isReverse: Boolean
)
// New
fun drawProgress(
layoutProgress: LinearLayout,
progressDrawable: GradientDrawable,
max: Float,
progress: Float,
totalWidth: Float,
radius: Int,
padding: Int,
isReverse: Boolean
) DemoOverviewRound Corner Progress BarSimple round corner progress bar CenteredRoundCornerProgressBarRound corner progress bar with progress expands from the center Icon Round Corner Progress BarRound corner progress bar with heading icon TextRoundCornerProgressBarRound corner progress bar with text inside the progress IndeterminateRoundCornerProgressBar and IndeterminateCenteredRoundCornerProgressBarSimple round corner progress bar and centered round corner progress bar with indeterminate animation FeatureStandard Features
Component Features
UsageFor using custom attribute of progress bar, define 'app' namespace as root view attribute in your layout xmlns:app="http://schemas.android.com/apk/res-auto" RoundCornerProgressBarExample<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="30dp"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcMax="100"
app:rcProgress="40"
app:rcProgressColor="#EF5350"
app:rcRadius="10dp"
app:rcSecondaryProgress="60"
app:rcSecondaryProgressColor="#40EF5350" /> Layout XML<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcReverse="boolean"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float" /> Public Methods// Progress
fun getMax(): Float
fun setMax(max: Float)
fun getProgress(): Float
fun setProgress(progress: Int)
fun setProgress(progress: Float)
fun getSecondaryProgress(): Float
fun setSecondaryProgress(secondaryProgress: Int)
fun setSecondaryProgress(secondaryProgress: Float)
// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float
// Animation
fun enableAnimation()
fun disableAnimation()
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)
fun isProgressAnimating(): Boolean
fun isSecondaryProgressAnimating(): Boolean
// Reversing Progress
fun isReverse(): Boolean
fun setReverse(isReverse: Boolean)
// Color
fun getProgressBackgroundColor(): Int
fun setProgressBackgroundColor(color: Int)
fun getProgressColor(): Int
fun setProgressColor(color: Int)
fun getProgressColors(): IntArray
fun setProgressColors(colors: IntArray)
fun getSecondaryProgressColor(): Int
fun setSecondaryProgressColor(color: Int)
fun getSecondaryProgressColors(): IntArray
fun setSecondaryProgressColors(colors: IntArray)
// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener) CenteredRoundCornerProgressBarSame as RoundCornerProgressBar but reversing does not supported. Example<com.akexorcist.roundcornerprogressbar.CenteredRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="30dp"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcMax="100"
app:rcProgress="40"
app:rcProgressColor="#EF5350"
app:rcRadius="10dp"/> Layout XML<com.akexorcist.roundcornerprogressbar.CenteredRoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float" /> Public Methods// Progress
fun getMax(): Float
fun setMax(max: Float)
fun getProgress(): Float
fun setProgress(progress: Int)
fun setProgress(progress: Float)
fun getSecondaryProgress(): Float
fun setSecondaryProgress(secondaryProgress: Int)
fun setSecondaryProgress(secondaryProgress: Float)
// Dimension
fun getRadius(): Int
fun setRadius(radius: Int)
fun getPadding(): Int
fun setPadding(padding: Int)
fun getLayoutWidth(): Float
// Animation
fun enableAnimation()
fun disableAnimation()
fun getAnimationSpeedScale(): Float
fun setAnimationSpeedScale(scale: Float)
fun isProgressAnimating(): Boolean
fun isSecondaryProgressAnimating(): Boolean
// Color
fun getProgressBackgroundColor(): Int
fun setProgressBackgroundColor(color: Int)
fun getProgressColor(): Int
fun setProgressColor(color: Int)
fun getProgressColors(): IntArray
fun setProgressColors(colors: IntArray)
fun getSecondaryProgressColor(): Int
fun setSecondaryProgressColor(color: Int)
fun getSecondaryProgressColors(): IntArray
fun setSecondaryProgressColors(colors: IntArray)
// Listener
fun setOnProgressChangedListener(listener: OnProgressChangedListener) IconRoundCornerProgressBarIcon size is required for this progress bar. Use <com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_height="wrap_content"
app:rcIconSize="40dp"
... /> Example<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:layout_width="260dp"
android:layout_height="wrap_content"
app:rcBackgroundColor="#0A000000"
app:rcBackgroundPadding="2dp"
app:rcIconBackgroundColor="#00796B"
app:rcIconPadding="5dp"
app:rcIconSize="40dp"
app:rcIconSrc="@drawable/ic_android"
app:rcMax="150"
app:rcProgress="90"
app:rcProgressColor="#EF5350"
app:rcRadius="5dp"
app:rcReverse="true" /> Layout XML<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
app:rcProgress="float"
app:rcSecondaryProgress="float"
app:rcMax="float"
app:rcRadius="dimension"
app:rcBackgroundPadding="dimension"
app:rcReverse="boolean"
app:rcProgressColor="color"
app:rcSecondaryProgressColor="color"
app:rcBackgroundColor="color"
app:rcAnimationEnable="boolean"
app:rcAnimationSpeedScale="float"
app:rcIconSrc="reference"
app:rcIconSize="dimension"
app:rcIconWidth="dimension"
app:rcIconHeight="dimension"
app:rcIconPadding="dimension"
app:rcIconPaddingLeft="dimension"
app:rcIconPaddingRight="dimension"
app:rcIconPaddingTop="dimension"
app:rcIconPaddingBottom="dimension"
app:rcIconBackgroundColor="color" /> Public Methods全部评论
专题导读
上一篇:joaopaulonsoares/templateestagiofga: Este repositório contém o template para a ...发布时间:2022-07-09下一篇:abcminiuser/avr-tutorials: LaTeX typeset versions of my popular AVR Tutorials.发布时间:2022-07-09热门推荐
热门话题
阅读排行榜
|
请发表评论