|
@@ -35,11 +35,6 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
setContentView(mView!!)
|
|
|
fishImage = findViewById(R.id.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!!)
|
|
|
}
|
|
@@ -59,6 +54,10 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
val window = window
|
|
|
focusNotAle(window!!)
|
|
|
super.show()
|
|
|
+ if (ovlImage != null) {
|
|
|
+ animation = AnimationUtils.loadAnimation(AppUtil.getContext(), R.anim.scale_anim)
|
|
|
+ ovlImage?.startAnimation(animation)
|
|
|
+ }
|
|
|
hideNavigationBar(window)
|
|
|
clearFocusNotAle(window)
|
|
|
}
|
|
@@ -108,4 +107,11 @@ class LoadingDialog constructor(context: Context) : AlertDialog(context, R.style
|
|
|
window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
|
|
}
|
|
|
|
|
|
+ override fun dismiss() {
|
|
|
+ if (ovlImage != null) {
|
|
|
+ ovlImage?.clearAnimation()
|
|
|
+ }
|
|
|
+ super.dismiss()
|
|
|
+ }
|
|
|
+
|
|
|
}
|