Skip to content

Commit

Permalink
fix #96
Browse files Browse the repository at this point in the history
  • Loading branch information
hegaojian committed Jan 4, 2022
1 parent 6b8950b commit 474e6c7
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 899 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 2 additions & 4 deletions JetpackMvvm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.hegaojian'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 25
versionName "1.2.5"
versionCode 26
versionName "1.2.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ import me.hgj.jetpackmvvm.network.manager.NetworkStateManager
abstract class BaseVmDbFragment<VM : BaseViewModel, DB : ViewDataBinding> : BaseVmFragment<VM>() {

//该类绑定的ViewDataBinding
lateinit var mDatabind: DB
private var _binding: DB? = null
val mDatabind: DB get() = _binding!!

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
mDatabind = DataBindingUtil.inflate(inflater, layoutId(), container, false)
_binding = DataBindingUtil.inflate(inflater, layoutId(), container, false)
mDatabind.lifecycleOwner = this
return mDatabind.root
}

override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}
9 changes: 2 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "me.hgj.jetpackmvvm.demo"
minSdkVersion 21
targetSdkVersion 30
versionCode 25
versionName "1.2.5"
versionCode 26
versionName "1.2.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
/* ndk {
// 设置支持的SO库架构 一般只设置这个就阔以设配所有的设备了,还可以减少apk的大小
Expand Down Expand Up @@ -129,9 +129,4 @@ dependencies {
implementation 'me.jessyan:autosize:1.2.1'
//防崩溃
implementation 'cat.ereza:customactivityoncrash:2.3.0'
//下载
implementation("com.liulishuo.filedownloader:library:1.7.7") {
exclude group: "com.android.support"
}
implementation 'com.louiscad.splitties:splitties-collections:2.1.1'
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 474e6c7

Please sign in to comment.