-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
viewBinding refactorings & use delegates;
LBaseQuickAdapter
- Loading branch information
Showing
51 changed files
with
965 additions
and
1,132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/perol/asdpl/pixivez/adapters/LBaseQuickAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.perol.asdpl.pixivez.adapters | ||
|
||
import androidx.annotation.LayoutRes | ||
import com.chad.library.adapter.base.BaseQuickAdapter | ||
import com.chad.library.adapter.base.listener.OnLoadMoreListener | ||
import com.chad.library.adapter.base.module.LoadMoreModule | ||
import com.chad.library.adapter.base.viewholder.BaseViewHolder | ||
|
||
abstract class LBaseQuickAdapter<T, VH : BaseViewHolder>(@LayoutRes private val layoutResId: Int, | ||
data: MutableList<T>?=null) | ||
:BaseQuickAdapter<T,VH>(layoutResId, data), LoadMoreModule { | ||
fun loadMoreEnd() { | ||
this.loadMoreModule.loadMoreEnd() | ||
} | ||
|
||
fun loadMoreComplete() { | ||
this.loadMoreModule.loadMoreComplete() | ||
} | ||
|
||
fun loadMoreFail() { | ||
this.loadMoreModule.loadMoreFail() | ||
} | ||
|
||
fun setOnLoadMoreListener(onLoadMoreListener: OnLoadMoreListener) { | ||
this.loadMoreModule.setOnLoadMoreListener(onLoadMoreListener) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.