Skip to content

1.4.2

Compare
Choose a tag to compare
@EudyContreras EudyContreras released this 22 Feb 23:29
· 17 commits to master since this release
a220b59

General Api improvements

Adresses issue #20

New view extensions and utility functions for toggling, enabling, disabling skeleton and bone loaders

fun View.enableSkeletonLoading() = this.toggleSkeletonLoading(true)
fun View.disableSkeletonLoading() = this.toggleSkeletonLoading(false)
fun View.toggleSkeletonLoading(enabled: Boolean)

We can now create SkeletonDrawables and BoneDrawables by passing properties and builders

fun create(view: View, enabled: Boolean = true, builder: BoneBuilder): BoneDrawable 
fun create(view: View, enabled: Boolean = true, properties: BoneProperties = BoneProperties()): BoneDrawable
fun builder(defaultProps: BoneProperties): BoneBuilder

fun create(viewGroup: ViewGroup, enabled: Boolean = true, builder: SkeletonBuilder): SkeletonDrawable
fun create(viewGroup: ViewGroup, enabled: Boolean = true, properties: SkeletonProperties = SkeletonProperties()): SkeletonDrawable
fun builder(defaultProps: SkeletonProperties = SkeletonProperties()): SkeletonBuilder

Missing builder functions for SkeletonBuilders

fun withBoneBuilder(view: View, builder: BoneBuilder.() -> Unit): SkeletonBuilder
fun setAnimateRestoreBounds(animateRestoreBounds: Boolean = false): SkeletonBuilder
fun withIgnoredBones(vararg ids: Int): SkeletonBuilder
fun withIgnoredBones(vararg views: View): SkeletonBuilder 

Missing builder properties for BoneBuilders

fun setCornerRadius(cornerRadius: Float = 0f): BoneBuilder