Skip to content

Commit

Permalink
日常提交:2022-08-08.
Browse files Browse the repository at this point in the history
  • Loading branch information
walgr committed Aug 8, 2022
1 parent 25000e3 commit fc26f5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.os.Bundle
import android.view.View
import androidx.annotation.LayoutRes
import com.wpf.app.quick.helper.DialogSizeHelper
import com.wpf.app.quickbind.QuickBind

/**
* Created by 王朋飞 on 2022/6/16.
Expand Down Expand Up @@ -46,18 +47,18 @@ abstract class QuickDialog : Dialog, DialogSize, DialogLifecycle {
}

private var mView: View? = null
override fun onCreate(savedInstanceState: Bundle) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
dealSize()
mView = layoutView ?: View.inflate(context, layoutId, null)
setContentView(mView!!)
val window = getWindow()
if (window != null) {
if (initDialogAnim() != DialogSize.NO_SET) {
window.setWindowAnimations(initDialogAnim())
window!!.setWindowAnimations(initDialogAnim())
}
window.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
}
QuickBind.bind(this)
initView(mView)
}
protected var mScreenWidth = 0
Expand All @@ -69,6 +70,10 @@ abstract class QuickDialog : Dialog, DialogSize, DialogLifecycle {
mScreenHeight = size.y
}

override fun getView(): View? {
return mView
}

abstract fun initView(view: View?)

protected var mNewWidth = DialogSize.NO_SET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ abstract class QuickDialogFragment @JvmOverloads constructor(
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
dealSize()
QuickBind.bind(this)
initView(view)
onDialogOpen()
QuickBind.bind(this)
}

abstract fun initView(view: View?)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android.nonTransitiveRClass=true
IS_REMOTE=true
IS_ONLY_PLUGIN=false
GROUP=com.wpf.app.quick
VERSION_NAME=0.2.13
VERSION_NAME=0.2.14

POM_DESCRIPTION=Quick Android.

Expand Down

0 comments on commit fc26f5e

Please sign in to comment.