Skip to content

Commit

Permalink
日常修改:2024-10-17.
Browse files Browse the repository at this point in the history
  • Loading branch information
walgr committed Oct 17, 2024
1 parent 65a4093 commit f6a6c92
Show file tree
Hide file tree
Showing 46 changed files with 112 additions and 120 deletions.
2 changes: 1 addition & 1 deletion Quick-annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ java {
}

dependencies {
compileOnly deps.androidx.annotation
implementation deps.androidx.annotation
}

apply from: rootProject.file('gradle-mvn-push-jar.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GenerateRequestProcessor(environment: SymbolProcessorEnvironment) :
val wpfRequest = ClassName("com.wpf.app.quicknetwork.base", "WpfRequest")
val realCall = ClassName("com.wpf.app.quicknetwork.call", "RealCall")
val requestCoroutineScope =
ClassName("com.wpf.app.quicknetwork.base", "RequestCoroutineScope")
ClassName("com.wpf.app.quickutil.network", "RequestCoroutineScope")

val defaultFunBuilder = FunSpec.builder(funName)
.addModifiers(KModifier.INLINE)
Expand Down
4 changes: 2 additions & 2 deletions Quick/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ dependencies {

if (IS_REMOTE.toBoolean()) {
api deps.quickbind.util
// api deps.quickbind.network
api deps.quickbind.network
api deps.quickbind.recyclerview
api deps.quickbind.dialog
api deps.quickbind.widget
} else {
api project(":QuickUtil")
// api project(":QuickNetwork")
api project(":QuickNetwork")
api project(":QuickRecyclerView")
api project(":QuickDialog")
api project(":QuickWidget")
Expand Down
2 changes: 1 addition & 1 deletion Quick/src/main/java/com/wpf/app/quick/ability/QuickView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.wpf.app.quickutil.ability.base.QuickAbility
import com.wpf.app.quickutil.ability.base.QuickGenerateViewAbility
import com.wpf.app.quickutil.ability.base.QuickInflateViewAbility
import com.wpf.app.quickutil.ability.base.QuickInitViewAbility
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.network.RequestCoroutineScope
import com.wpf.app.quickutil.helper.InitViewHelper
import com.wpf.app.quickutil.helper.match
import com.wpf.app.quickutil.helper.reset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import androidx.activity.result.ActivityResultRegistry
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.network.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickutil.bind.QuickBindWrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickutil.network.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickutil.bind.QuickBindWrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.ViewModel
import com.wpf.app.quickutil.ViewLifecycle
import com.wpf.app.quickutil.Quick
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.network.RequestCoroutineScope
import kotlinx.coroutines.Job

/**
* Created by 王朋飞 on 2022/7/13.
*
*/
open class QuickViewModel<T : Quick> : ViewModel(), LifecycleObserver, ViewLifecycle, RequestCoroutineScope {
open class QuickViewModel<T : Quick> : ViewModel(), LifecycleObserver, ViewLifecycle,
RequestCoroutineScope {
override var jobManager: MutableList<Job> = mutableListOf()
var quickView: T? = null
open fun onViewCreated(baseView: T) {
Expand Down
22 changes: 5 additions & 17 deletions QuickBind/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,19 @@ android {
}

dependencies {
//ktx核心
compileOnly deps.androidx.corektx
//activity-ktx
compileOnly deps.androidx.activityktx
compileOnly deps.androidx.appcompat
//fragment-ktx
compileOnly deps.androidx.fragmentktx
//列表
compileOnly deps.androidx.recyclerview

compileOnly deps.androidx.material

//Glide
compileOnly deps.glide
implementation deps.glide
//GSON
compileOnly deps.gson
implementation deps.gson
//viewpager2
compileOnly deps.viewpager2
implementation deps.viewpager2

if (IS_REMOTE.toBoolean()) {
api deps.quickbind.annotations
api deps.quickbind.network
api deps.quickbind.util
} else {
api project(":Quick-annotations")
api project(":QuickNetwork")
api project(":QuickUtil")
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wpf.app.quickbind.annotations

import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import kotlin.reflect.KClass

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wpf.app.quickbind.annotations

import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import kotlin.reflect.KClass

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wpf.app.quickbind.annotations

import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import kotlin.reflect.KClass

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel
import androidx.viewpager2.widget.ViewPager2
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickbind.annotations.BindFragment2
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickbind.utils.getFragment
import com.wpf.app.quickbind.viewpager2.adapter.Fragments2StateAdapter
import com.wpf.app.quickutil.helper.generic.forceTo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.fragment.app.FragmentManager
import androidx.lifecycle.ViewModel
import androidx.viewpager.widget.ViewPager
import com.wpf.app.quickbind.annotations.BindFragment
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickbind.utils.getFragment
import com.wpf.app.quickbind.viewpager.adapter.FragmentsAdapter
import com.wpf.app.quickbind.viewpager.adapter.FragmentsStateAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.lifecycle.ViewModel
import androidx.viewpager2.widget.ViewPager2
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickbind.annotations.BindFragments2
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickbind.viewpager2.adapter.Fragments2StateAdapter
import com.wpf.app.quickutil.helper.generic.forceTo
import java.lang.reflect.Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.fragment.app.FragmentManager
import androidx.lifecycle.ViewModel
import androidx.viewpager.widget.ViewPager
import com.wpf.app.quickbind.annotations.BindFragments
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickbind.viewpager.adapter.FragmentsAdapter
import com.wpf.app.quickbind.viewpager.adapter.FragmentsStateAdapter
import java.lang.reflect.Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.wpf.app.quickbind.utils

import android.app.Activity
import androidx.fragment.app.Fragment
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickutil.helper.generic.forceTo

fun getFragment(
Expand Down
3 changes: 0 additions & 3 deletions QuickDialog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ android {

dependencies {
implementation deps.androidx.material
implementation deps.androidx.activityktx

if (IS_REMOTE.toBoolean()) {
api deps.quickbind.util
api deps.quickbind.bind
} else {
api project(":QuickUtil")
api project(":QuickBind")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import com.wpf.app.quickdialog.helper.DialogSheetHelper
import com.wpf.app.quickdialog.helper.DialogSizeHelper
import com.wpf.app.quickdialog.listeners.DialogLifecycle
import com.wpf.app.quickdialog.listeners.DialogSize
import com.wpf.app.quickdialog.listeners.SheetInit
import com.wpf.app.quickutil.utils.SheetInit
import com.wpf.app.quickdialog.minAndMaxLimit.SizeLimitViewGroup
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.QuickBindWrap
import com.wpf.app.quickutil.helper.InitViewHelper
import com.wpf.app.quickutil.network.RequestCoroutineScope
import kotlinx.coroutines.Job

/**
Expand All @@ -33,7 +33,8 @@ open class QuickBaseBottomSheetDialog(
@LayoutRes private val layoutId: Int = 0,
private val layoutView: View? = null,
private var layoutViewCreate: (Context.() -> View)? = null,
) : BottomSheetDialog(context, true, null), SheetInit, DialogSize, DialogLifecycle, RequestCoroutineScope, Quick {
) : BottomSheetDialog(context, true, null),
SheetInit, DialogSize, DialogLifecycle, RequestCoroutineScope, Quick {

override var jobManager: MutableList<Job> = mutableListOf()

Expand All @@ -58,10 +59,7 @@ open class QuickBaseBottomSheetDialog(
dealSize()
mView = generateContentView(
InitViewHelper.init(
context,
layoutId,
layoutView,
layoutViewCreate
context, layoutId, layoutView, layoutViewCreate
)
)
if (initDialogAdaptiveHeight()) {
Expand Down Expand Up @@ -94,6 +92,7 @@ open class QuickBaseBottomSheetDialog(

@Suppress("MemberVisibilityCanBePrivate")
protected var mScreenWidth = 0

@Suppress("MemberVisibilityCanBePrivate")
protected var mScreenHeight = 0

Expand All @@ -106,6 +105,7 @@ open class QuickBaseBottomSheetDialog(

@Suppress("MemberVisibilityCanBePrivate")
protected var mNewWidth = 0

@Suppress("MemberVisibilityCanBePrivate")
protected var mNewHeight = 0

Expand Down Expand Up @@ -137,6 +137,7 @@ open class QuickBaseBottomSheetDialog(
override fun getLifecycleDialog(): Dialog {
return this
}

override var funcPrepare: (() -> Unit)? = null
override var funcShow: (Dialog.() -> Unit)? = null
override var funcDismiss: (Dialog.() -> Unit)? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickdialog.helper.DialogSheetHelper
import com.wpf.app.quickdialog.helper.DialogSizeHelper
import com.wpf.app.quickdialog.listeners.DialogLifecycle
import com.wpf.app.quickdialog.listeners.DialogSize
import com.wpf.app.quickdialog.listeners.SheetInit
import com.wpf.app.quickutil.utils.SheetInit
import com.wpf.app.quickdialog.minAndMaxLimit.SizeLimitViewGroup
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickutil.bind.QuickBindWrap
import com.wpf.app.quickutil.helper.InitViewHelper
import com.wpf.app.quickutil.network.RequestCoroutineScope
import kotlinx.coroutines.Job

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.wpf.app.quickdialog.helper.DialogSizeHelper
import com.wpf.app.quickdialog.listeners.DialogLifecycle
import com.wpf.app.quickdialog.listeners.DialogSize
import com.wpf.app.quickdialog.minAndMaxLimit.SizeLimitViewGroup
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.network.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.QuickBindWrap
import com.wpf.app.quickutil.helper.InitViewHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import androidx.annotation.StyleRes
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import com.wpf.app.quickbind.interfaces.BindBaseFragment
import com.wpf.app.quickutil.bind.BindBaseFragment
import com.wpf.app.quickdialog.helper.DialogSizeHelper
import com.wpf.app.quickdialog.listeners.DialogLifecycle
import com.wpf.app.quickdialog.listeners.DialogSize
import com.wpf.app.quickdialog.minAndMaxLimit.SizeLimitViewGroup
import com.wpf.app.quicknetwork.base.RequestCoroutineScope
import com.wpf.app.quickutil.network.RequestCoroutineScope
import com.wpf.app.quickutil.Quick
import com.wpf.app.quickutil.bind.Bind
import com.wpf.app.quickutil.bind.QuickBindWrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.View
import android.view.Window
import android.view.WindowManager
import androidx.annotation.StyleRes
import com.wpf.app.quickutil.utils.QuickContext

/**
* Created by 王朋飞 on 2022/6/17.
Expand Down
1 change: 0 additions & 1 deletion QuickNetwork/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ android {
}

dependencies {
implementation deps.androidx.annotation
implementation deps.kotlin.kotlinxcoroutinescore
//retrofit2-okhttp-gson
api deps.retrofit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wpf.app.quicknetwork.base

import com.wpf.app.quickutil.network.RequestCoroutineScope


/**
* Created by 王朋飞 on 2022/7/22.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wpf.app.quicknetwork.base

import com.wpf.app.quickutil.network.RequestCoroutineScope

/**
* Created by 王朋飞 on 2022/7/22.
*
Expand Down
2 changes: 1 addition & 1 deletion QuickRecyclerView/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
} else {
api project(":QuickUtil")
api project(":QuickBind")
api project(":QuickNetwork")
// api project(":QuickNetwork")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ open class QuickAdapter : RecyclerView.Adapter<QuickViewHolder<QuickItemData>>()
private var mRecyclerView: RecyclerView? = null
private var mQuickAdapterListener: QuickAdapterListener<QuickItemData>? = null

internal var mDataList: MutableList<QuickItemData>? = null
internal var allDataList: MutableList<QuickItemData>? = null
var mDataList: MutableList<QuickItemData>? = null
var allDataList: MutableList<QuickItemData>? = null
val headerViews = mutableListOf<QuickHeaderData>()
val footerViews = mutableListOf<QuickFooterData>()

Expand Down
Loading

0 comments on commit f6a6c92

Please sign in to comment.