|
|
@@ -11,6 +11,7 @@ import androidx.appcompat.widget.AppCompatImageView
|
|
|
import com.bumptech.glide.Glide
|
|
|
import com.yingyangfly.baselib.R
|
|
|
import com.yingyangfly.baselib.utils.AppUtil
|
|
|
+import com.yingyangfly.baselib.utils.ViewTool
|
|
|
|
|
|
/**
|
|
|
* Loading
|
|
|
@@ -29,12 +30,13 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
|
|
|
fun initViews() {
|
|
|
val inflater = LayoutInflater.from(context)
|
|
|
- mView = inflater.inflate(R.layout.dialog_loading, null)
|
|
|
+// mView = inflater.inflate(R.layout.dialog_loading, null)
|
|
|
+ mView = ViewTool.inflateLayoutPixelsById(context, R.layout.dialog_loading, 1194, 834)
|
|
|
setContentView(mView!!)
|
|
|
fishImage = findViewById(R.id.fishImage)
|
|
|
ovlImage = findViewById(R.id.ovlImage)
|
|
|
setCanceledOnTouchOutside(false)
|
|
|
- setDialogLayout(context, window!!)
|
|
|
+ setDialogLayout(window!!)
|
|
|
init()
|
|
|
}
|
|
|
|
|
|
@@ -45,7 +47,7 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
.into(fishImage!!)
|
|
|
}
|
|
|
|
|
|
- private fun setDialogLayout(context: Context, dialogWindow: Window) {
|
|
|
+ private fun setDialogLayout(dialogWindow: Window) {
|
|
|
dialogWindow.setLayout(
|
|
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
|
ViewGroup.LayoutParams.MATCH_PARENT
|