Skip to content

Commit 55c3272

Browse files
Support for animation
1 parent 9dfbdbd commit 55c3272

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

loadingstateview-ktx/src/main/java/com/dylanc/loadingstateview/LoadingState.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ interface LoadingState {
4545

4646
fun Fragment.setDecorView(delegate: LoadingStateView.DecorViewDelegate)
4747

48-
fun showLoadingView()
48+
fun showLoadingView(animation: LoadingStateView.Animation? = null)
4949

50-
fun showContentView()
50+
fun showContentView(animation: LoadingStateView.Animation? = null)
5151

52-
fun showErrorView()
52+
fun showErrorView(animation: LoadingStateView.Animation? = null)
5353

54-
fun showEmptyView()
54+
fun showEmptyView(animation: LoadingStateView.Animation? = null)
5555

5656
fun showCustomView(viewType: Any)
5757

loadingstateview-ktx/src/main/java/com/dylanc/loadingstateview/LoadingStateDelegate.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ class LoadingStateDelegate : LoadingState {
7676
loadingStateView?.addChildDecorView(delegate)
7777
}
7878

79-
override fun showLoadingView() {
80-
loadingStateView?.showLoadingView()
79+
override fun showLoadingView(animation: LoadingStateView.Animation?) {
80+
loadingStateView?.showLoadingView(animation)
8181
}
8282

83-
override fun showContentView() {
84-
loadingStateView?.showContentView()
83+
override fun showContentView(animation: LoadingStateView.Animation?) {
84+
loadingStateView?.showContentView(animation)
8585
}
8686

87-
override fun showErrorView() {
88-
loadingStateView?.showErrorView()
87+
override fun showErrorView(animation: LoadingStateView.Animation?) {
88+
loadingStateView?.showErrorView(animation)
8989
}
9090

91-
override fun showEmptyView() {
92-
loadingStateView?.showEmptyView()
91+
override fun showEmptyView(animation: LoadingStateView.Animation?) {
92+
loadingStateView?.showEmptyView(animation)
9393
}
9494

9595
override fun showCustomView(viewType: Any) {

0 commit comments

Comments
 (0)