Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_40328769
BaseRecyclerViewAdapterHelper
提交
6d511a68
B
BaseRecyclerViewAdapterHelper
项目概览
qq_40328769
/
BaseRecyclerViewAdapterHelper
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
BaseRecyclerViewAdapterHelper
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6d511a68
编写于
1月 13, 2020
作者:
limuyang2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean file
上级
b94b403a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
0 addition
and
96 deletion
+0
-96
brvahKtx/.gitignore
brvahKtx/.gitignore
+0
-1
brvahKtx/build.gradle
brvahKtx/build.gradle
+0
-33
brvahKtx/proguard-rules.pro
brvahKtx/proguard-rules.pro
+0
-31
brvahKtx/src/main/AndroidManifest.xml
brvahKtx/src/main/AndroidManifest.xml
+0
-2
brvahKtx/src/main/java/com/chinakingo/brvahktx/AdapterKtx.kt
brvahKtx/src/main/java/com/chinakingo/brvahktx/AdapterKtx.kt
+0
-29
未找到文件。
brvahKtx/.gitignore
已删除
100644 → 0
浏览文件 @
b94b403a
/build
brvahKtx/build.gradle
已删除
100644 → 0
浏览文件 @
b94b403a
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
android
{
compileSdkVersion
28
defaultConfig
{
minSdkVersion
14
targetSdkVersion
28
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
release
{
consumerProguardFiles
'proguard-rules.pro'
}
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
compileOnly
'com.android.support:recyclerview-v7:28.0.0'
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-RC'
implementation
project
(
path:
':library'
)
}
brvahKtx/proguard-rules.pro
已删除
100644 → 0
浏览文件 @
b94b403a
# Add project specific ProGuard rules here.
#
You
can
control
the
set
of
applied
configuration
files
using
the
#
proguardFiles
setting
in
build
.
gradle
.
#
#
For
more
details
,
see
#
http
://
developer
.
android
.
com
/
guide
/
developing
/
tools
/
proguard
.
html
#
If
your
project
uses
WebView
with
JS
,
uncomment
the
following
#
and
specify
the
fully
qualified
class
name
to
the
JavaScript
interface
#
class
:
#-
keepclassmembers
class
fqcn
.
of
.
javascript
.
interface
.
for
.
webview
{
#
public
*
;
#
}
#
Uncomment
this
to
preserve
the
line
number
information
for
#
debugging
stack
traces
.
#-
keepattributes
SourceFile
,
LineNumberTable
#
If
you
keep
the
line
number
information
,
uncomment
this
to
#
hide
the
original
source
file
name
.
#-
renamesourcefileattribute
SourceFile
#
ServiceLoader
support
-
keepnames
class
kotlinx
.
coroutines
.
internal
.
MainDispatcherFactory
{}
-
keepnames
class
kotlinx
.
coroutines
.
CoroutineExceptionHandler
{}
-
keepnames
class
kotlinx
.
coroutines
.
android
.
AndroidExceptionPreHandler
{}
-
keepnames
class
kotlinx
.
coroutines
.
android
.
AndroidDispatcherFactory
{}
#
Most
of
volatile
fields
are
updated
with
AFU
and
should
not
be
mangled
-
keepclassmembernames
class
kotlinx
.
**
{
volatile
<
fields
>
;
}
\ No newline at end of file
brvahKtx/src/main/AndroidManifest.xml
已删除
100644 → 0
浏览文件 @
b94b403a
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.chinakingo.brvahktx"
/>
brvahKtx/src/main/java/com/chinakingo/brvahktx/AdapterKtx.kt
已删除
100644 → 0
浏览文件 @
b94b403a
package
com.chinakingo.brvahktx
import
android.support.v7.util.DiffUtil
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.diff.BaseQuickDiffCallback
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.withContext
/**
* author : limuyang
* e-mail : limuyang2@163.com
* date : 2019/07/28
* desc : About the kotlin extension of the adapter
*/
/**
* this is kotlin Expansion, quick use async diff
* @receiver BaseQuickAdapter<T, K>
* @param baseQuickDiffCallback BaseQuickDiffCallback<T>
* @param detectMoves Boolean
*/
suspend
inline
fun
<
T
,
K
:
BaseViewHolder
>
BaseQuickAdapter
<
T
,
K
>.
setNewDiffDataAsync
(
baseQuickDiffCallback
:
BaseQuickDiffCallback
<
T
>,
detectMoves
:
Boolean
)
{
baseQuickDiffCallback
.
oldList
=
this
.
data
val
diffResult
=
withContext
(
Dispatchers
.
IO
)
{
DiffUtil
.
calculateDiff
(
baseQuickDiffCallback
,
detectMoves
)
}
this
.
setNewDiffData
(
diffResult
,
baseQuickDiffCallback
.
newList
)
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录