Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.agrawalsuneet.dotsloader.loaders

import android.app.Activity
import android.content.Context
import android.graphics.Canvas
import android.util.AttributeSet
Expand Down Expand Up @@ -68,7 +67,9 @@ class CircularDotsLoader : CircularAbstractView {
selectedDotPos = 1
}

(context as Activity).runOnUiThread { invalidate() }
handler?.let {
it.post { invalidate() }
}
}
}, 0, animDur.toLong())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.agrawalsuneet.dotsloader.loaders

import android.app.Activity
import android.content.Context
import android.graphics.Canvas
import android.util.AttributeSet
Expand Down Expand Up @@ -119,7 +118,10 @@ class LinearDotsLoader : DotsLoaderBaseView {
}
}

(context as Activity).runOnUiThread { invalidate() }
handler?.let {
it.post { invalidate() }
}

}
}, 0, animDur.toLong())
}
Expand Down