增加直播间高斯模糊度
This commit is contained in:
parent
8297237b8e
commit
b98e3a874a
@ -166,7 +166,18 @@ public class ImgLoader {
|
|||||||
.apply(RequestOptions.bitmapTransform(sBlurTransformation))
|
.apply(RequestOptions.bitmapTransform(sBlurTransformation))
|
||||||
.into(imageView);
|
.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) {
|
private static boolean contextIsExist(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
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",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
|
@ -352,14 +352,14 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
enterRoom();
|
enterRoom();
|
||||||
//直播页面背景
|
//直播页面背景
|
||||||
liveBack = findViewById(R.id.live_back);
|
liveBack = findViewById(R.id.live_back);
|
||||||
ImgLoader.displayBlur(mContext, liveBean.getAvatar(), liveBack);
|
ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), liveBack);
|
||||||
|
|
||||||
|
|
||||||
//侧边栏
|
//侧边栏
|
||||||
drawerLayout = findViewById(R.id.drawer_layout);
|
drawerLayout = findViewById(R.id.drawer_layout);
|
||||||
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
|
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
|
||||||
sidebarBack = findViewById(R.id.sidebar_back);
|
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);
|
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||||
sidebarList.setEmptyLayoutId(R.layout.view_no_data_live);
|
sidebarList.setEmptyLayoutId(R.layout.view_no_data_live);
|
||||||
|
@ -645,7 +645,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
findViewById(R.id.hot_btn).setOnClickListener(this);
|
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);
|
mUserRecyclerView = (RecyclerView) findViewById(R.id.user_recyclerView);
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 100 KiB |
Loading…
Reference in New Issue
Block a user