|
|
@@ -25,6 +25,7 @@ class CountdownDialog : DialogFragment() {
|
|
|
private var gameImage: AppCompatImageView? = null
|
|
|
private var imageCountdown: AppCompatImageView? = null
|
|
|
var onDialogClickListener: ((bean: String) -> Unit)? = null
|
|
|
+ private var loadingImage: AppCompatImageView? = null
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
super.onCreate(savedInstanceState)
|
|
|
@@ -65,6 +66,7 @@ class CountdownDialog : DialogFragment() {
|
|
|
private fun findId(rootView: View) {
|
|
|
imageCountdown = rootView.findViewById(R.id.imageCountdown)
|
|
|
gameImage = rootView.findViewById(R.id.gameImage)
|
|
|
+ loadingImage = rootView.findViewById(R.id.loadingImage)
|
|
|
val options: RequestOptions = RequestOptions()
|
|
|
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
|
|
Glide.with(requireActivity()).load(url).apply(options).into(gameImage!!)
|
|
|
@@ -92,6 +94,11 @@ class CountdownDialog : DialogFragment() {
|
|
|
dismiss()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ Glide.with(requireActivity())
|
|
|
+ .asGif()
|
|
|
+ .load(R.drawable.fish)
|
|
|
+ .into(loadingImage!!)
|
|
|
}
|
|
|
|
|
|
}
|