diff --git a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java index afeb88fd0..a06f1801b 100644 --- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java +++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java @@ -166,7 +166,18 @@ public class ImgLoader { .apply(RequestOptions.bitmapTransform(sBlurTransformation)) .into(imageView); } - + /** + * 显示模糊的毛玻璃图片 + */ + public static void displayBlurLive(Context context, String url, ImageView imageView) { + if (!contextIsExist(context)) { + return; + } + Glide.with(context).asDrawable().load(url) + .skipMemoryCache(SKIP_MEMORY_CACHE) + .apply(RequestOptions.bitmapTransform(new BlurTransformation(95))) + .into(imageView); + } private static boolean contextIsExist(Context context) { if (context == null) { return false; diff --git a/config.gradle b/config.gradle index 3f66756b1..492fa93ba 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index ba78e8cf5..84c740d57 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -352,14 +352,14 @@ public class LiveAudienceActivity extends LiveActivity { enterRoom(); //直播页面背景 liveBack = findViewById(R.id.live_back); - ImgLoader.displayBlur(mContext, liveBean.getAvatar(), liveBack); + ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), liveBack); //侧边栏 drawerLayout = findViewById(R.id.drawer_layout); sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList); sidebarBack = findViewById(R.id.sidebar_back); - ImgLoader.displayBlur(mContext, liveBean.getAvatar(), sidebarBack); + ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), sidebarBack); //禁止滑动打开侧边栏 drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); sidebarList.setEmptyLayoutId(R.layout.view_no_data_live); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index dca0a8cc1..23880e41e 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -645,7 +645,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } }); findViewById(R.id.hot_btn).setOnClickListener(this); - Glide.with(mContext).asDrawable().load(R.drawable.fans_medal).into(mViewMedal); + Glide.with(mContext).asGif().load(R.drawable.fans_medal).into(mViewMedal); //用户头像列表 mUserRecyclerView = (RecyclerView) findViewById(R.id.user_recyclerView); diff --git a/live/src/main/res/drawable/fans_medal.gif b/live/src/main/res/drawable/fans_medal.gif index 97226e5ea..21ccd48dc 100644 Binary files a/live/src/main/res/drawable/fans_medal.gif and b/live/src/main/res/drawable/fans_medal.gif differ