Skip to content

Commit

Permalink
#update binding
Browse files Browse the repository at this point in the history
  • Loading branch information
wumeng1 authored and wumeng1 committed Jul 1, 2021
1 parent fe6c4f4 commit ad42256
Show file tree
Hide file tree
Showing 13 changed files with 1,249 additions and 1,238 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/mirkowu/mvm/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.util.Log
import android.view.View
import com.mirkowu.lib_base.adapter.FragmentBasePagerAdapter
import com.mirkowu.lib_base.mediator.EmptyMediator
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_bugly.BuglyManager
import com.mirkowu.lib_bugly.UpgradeDialog
import com.mirkowu.lib_util.utilcode.util.ToastUtils
Expand All @@ -16,7 +17,6 @@ import com.mirkowu.mvm.mvvm.MVVMActivity
import com.mirkowu.mvm.recycelerview.GridListActivity
import com.mirkowu.mvm.viewbinding.DataBindingActivity
import com.mirkowu.mvm.viewbinding.DataBindingFragment
import com.mirkowu.mvm.viewbinding.bindingView

class MainActivity : BaseActivity<EmptyMediator>() {
companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mirkowu.mvm.download

import com.mirkowu.lib_base.mediator.EmptyMediator
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_network.download.Downloader
import com.mirkowu.lib_network.download.OnDownloadListener
import com.mirkowu.lib_util.FileUtil
Expand All @@ -11,7 +12,6 @@ import com.mirkowu.lib_util.utilcode.util.ConvertUtils
import com.mirkowu.lib_util.utilcode.util.ToastUtils
import com.mirkowu.mvm.base.BaseActivity
import com.mirkowu.mvm.databinding.ActivityDownloadBinding
import com.mirkowu.mvm.viewbinding.bindingView
import java.io.File

class DownloadActivity : BaseActivity<EmptyMediator>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mirkowu.mvm.imagepicker
import android.graphics.Color
import android.util.Log
import com.mirkowu.lib_base.mediator.EmptyMediator
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_photo.ImagePicker
import com.mirkowu.lib_photo.PickerConfig
import com.mirkowu.lib_photo.mediaLoader.ResultModel
Expand All @@ -15,7 +16,6 @@ import com.mirkowu.lib_util.utilcode.util.BarUtils
import com.mirkowu.mvm.R
import com.mirkowu.mvm.base.BaseActivity
import com.mirkowu.mvm.databinding.ActivityImagePickerBinding
import com.mirkowu.mvm.viewbinding.bindingView

class ImagePickerActivity : BaseActivity<EmptyMediator>() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import android.content.Intent
import android.graphics.Color
import androidx.recyclerview.widget.LinearLayoutManager
import com.mirkowu.lib_base.mediator.EmptyMediator
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_util.LogUtil
import com.mirkowu.lib_widget.decoration.LinearDecoration
import com.mirkowu.mvm.R
import com.mirkowu.mvm.base.BaseActivity
import com.mirkowu.mvm.databinding.ActivityGridListBinding
import com.mirkowu.mvm.viewbinding.bindingView

class GridListActivity : BaseActivity<EmptyMediator>() {
companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mirkowu.mvm.viewbinding

import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_network.state.observerRequest
import com.mirkowu.lib_util.LogUtil
import com.mirkowu.mvm.base.BaseActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mirkowu.mvm.viewbinding
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.mvm.databinding.DialogDatabindingBinding

class DataBindingDialog(context: Context) : Dialog(context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_qr.QRScanner
import com.mirkowu.lib_qr.ScanConfig
import com.mirkowu.lib_upgrade.IUpgradeInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent
import android.content.res.Resources
import com.mirkowu.lib_base.mediator.EmptyMediator
import com.mirkowu.lib_base.util.bindingView
import com.mirkowu.lib_screen.AutoSizeManager
import com.mirkowu.lib_screen.internal.CustomAdapt
import com.mirkowu.lib_util.ktxutil.click
Expand All @@ -16,7 +17,6 @@ import com.mirkowu.mvm.R
import com.mirkowu.mvm.base.BaseActivity
import com.mirkowu.mvm.databinding.ActivityWidgetDemoBinding
import com.mirkowu.mvm.viewbinding.DataBindingDialog
import com.mirkowu.mvm.viewbinding.bindingView

class WidgetDemoActivity : BaseActivity<EmptyMediator>(), CustomAdapt {
companion object {
Expand Down
6 changes: 6 additions & 0 deletions lib_base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}

//AS4.0及以上
buildFeatures {
viewBinding = true
// dataBinding = true
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mirkowu.mvm.viewbinding
package com.mirkowu.lib_base.util

import android.app.Dialog
import android.view.LayoutInflater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ private PermissionsUtil() {
};
/**
* 蓝牙权限(需要粗略定位权限 )
* 编译版本10及以上 需要 ACCESS_FINE_LOCATION
* 9以下 有 ACCESS_COARSE_LOCATION 或 ACCESS_FINE_LOCATION 任一个都行
*/
public static final String[] GROUP_BLUETOOTH = new String[]{
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.BLUETOOTH
};
/**
Expand Down
Loading

0 comments on commit ad42256

Please sign in to comment.