File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
skeletonloading/src/main/java/com/larswerkman/skeletonloading Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ abstract class SkeletonAnimation(
1515) {
1616
1717 private var animator: ValueAnimator ? = null
18- private val progress = Progress (start)
18+ val progress = Progress (start)
1919
2020 private fun create () {
2121 animator = ValueAnimator .ofFloat(start, end)
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ class SkeletonLoading(
2323
2424 private val binders = CopyOnWriteArrayList <SkeletonBinder >()
2525
26+ init {
27+ animation?.progress?.update(drawable)
28+ }
29+
2630 fun create (block : SkeletonBinder .Builder .() -> Unit ): SkeletonBinder {
2731 val builder = SkeletonBinder .Builder ()
2832 block(builder)
@@ -36,6 +40,8 @@ class SkeletonLoading(
3640 @OnLifecycleEvent(Lifecycle .Event .ON_CREATE )
3741 fun onCreate () {
3842 animation?.start { progress ->
43+ progress.update(drawable)
44+
3945 binders.forEach { binder ->
4046 if (binder.isUnbound) {
4147 binders.remove(binder)
You can’t perform that action at this time.
0 commit comments