|
@@ -8,9 +8,11 @@ import android.view.LayoutInflater
|
|
|
import android.view.View
|
|
|
import android.view.Window
|
|
|
import android.view.WindowManager
|
|
|
+import android.view.animation.Animation
|
|
|
+import android.view.animation.AnimationUtils
|
|
|
import androidx.appcompat.widget.AppCompatImageView
|
|
|
-import com.bumptech.glide.Glide
|
|
|
import com.yingyangfly.baselib.R
|
|
|
+import com.yingyangfly.baselib.utils.AppUtil
|
|
|
|
|
|
/**
|
|
|
* Loading
|
|
@@ -19,6 +21,8 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
|
|
|
var mView: View? = null
|
|
|
private var fishImage: AppCompatImageView? = null
|
|
|
+ private var ovlImage: AppCompatImageView? = null
|
|
|
+ var animation: Animation? = null
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
super.onCreate(savedInstanceState)
|
|
@@ -30,9 +34,12 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
mView = inflater.inflate(R.layout.dialog_loading, null)
|
|
|
setContentView(mView!!)
|
|
|
fishImage = findViewById(R.id.fishImage)
|
|
|
- Glide.with(context)
|
|
|
- .load("file:///android_asset/fish.GIF")
|
|
|
- .into(fishImage!!)
|
|
|
+ ovlImage = findViewById(R.id.ovlImage)
|
|
|
+// Glide.with(context)
|
|
|
+// .load("file:///android_asset/fish.GIF")
|
|
|
+// .into(fishImage!!)
|
|
|
+ animation = AnimationUtils.loadAnimation(AppUtil.getContext(), R.anim.scale_anim)
|
|
|
+ ovlImage?.startAnimation(animation)
|
|
|
setCanceledOnTouchOutside(false)
|
|
|
setDialogLayout(context, window!!)
|
|
|
}
|