|
|
@@ -15,6 +15,8 @@ import android.webkit.WebViewClient
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
|
import com.alibaba.android.arouter.launcher.ARouter
|
|
|
import com.bumptech.glide.Glide
|
|
|
+import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|
|
+import com.bumptech.glide.request.RequestOptions
|
|
|
import com.yingyangfly.baselib.db.VoicePlayerBean
|
|
|
import com.yingyangfly.baselib.ext.getEndAnimation
|
|
|
import com.yingyangfly.baselib.ext.getScaleAnimation
|
|
|
@@ -35,7 +37,6 @@ import com.yingyangfly.game.utils.AndroidToJs
|
|
|
import gorden.rxbus2.RxBus
|
|
|
import gorden.rxbus2.Subscribe
|
|
|
import gorden.rxbus2.ThreadMode
|
|
|
-import java.util.concurrent.ThreadFactory
|
|
|
|
|
|
/**
|
|
|
* 玩游戏页面
|
|
|
@@ -74,7 +75,11 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
initWebView(url)
|
|
|
}
|
|
|
if (TextUtils.isEmpty(gameBackgroundImage).not()) {
|
|
|
- binding.image = gameBackgroundImage
|
|
|
+ val options: RequestOptions = RequestOptions()
|
|
|
+ .placeholder(R.drawable.bg_game_settlement)
|
|
|
+ .error(R.drawable.bg_game_settlement)
|
|
|
+ .diskCacheStrategy(DiskCacheStrategy.ALL)
|
|
|
+ Glide.with(mContext).load(gameInbetweenImage).apply(options).into(binding.imageBg)
|
|
|
}
|
|
|
if (TextUtils.isEmpty(gameShortDesn).not()) {
|
|
|
binding.tvPlay.text = gameShortDesn
|