diff --git a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java
index 48ae294b0..307c5023c 100644
--- a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java
+++ b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java
@@ -209,6 +209,18 @@ public class IMLoginModel extends BaseModel {
//礼物特效开关
@SerializedName("gift_effect")
private boolean giftEffect = false;
+ //坐骑特效开关
+ @SerializedName("mount_effect")
+ private boolean mountEffect = false;
+
+ public boolean isMountEffect() {
+ return mountEffect;
+ }
+
+ public IMLoginModel setMountEffect(boolean mountEffect) {
+ this.mountEffect = mountEffect;
+ return this;
+ }
public boolean isGiftEffect() {
return giftEffect;
diff --git a/common/src/main/java/com/yunbao/common/dialog/EffectsSettingsDialog.java b/common/src/main/java/com/yunbao/common/dialog/EffectsSettingsDialog.java
index f882aa612..f2de3925d 100644
--- a/common/src/main/java/com/yunbao/common/dialog/EffectsSettingsDialog.java
+++ b/common/src/main/java/com/yunbao/common/dialog/EffectsSettingsDialog.java
@@ -16,8 +16,8 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
* 特效设置页面
*/
public class EffectsSettingsDialog extends AbsDialogFragment {
- private ImageView specialSwitch;
- private boolean giftEffect;
+ private ImageView specialSwitch, specialMountSwitch;
+ private boolean giftEffect, mountEffect;
@Override
protected int getLayoutId() {
@@ -39,12 +39,19 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
super.onActivityCreated(savedInstanceState);
IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo();
specialSwitch = (ImageView) findViewById(R.id.special_switch);
+ specialMountSwitch = (ImageView) findViewById(R.id.special_mount_switch);
giftEffect = userInfo.isGiftEffect();
+ mountEffect = userInfo.isMountEffect();
if (giftEffect) {
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
} else {
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialSwitch);
}
+ if (mountEffect) {
+ ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialMountSwitch);
+ } else {
+ ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialMountSwitch);
+ }
//礼物特效开关
ViewClicksAntiShake.clicksAntiShake(specialSwitch, () -> {
giftEffect = !giftEffect;
@@ -57,6 +64,18 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setGiftEffect(giftEffect));
}
);
+ //坐骑特效开关
+ ViewClicksAntiShake.clicksAntiShake(specialMountSwitch, () -> {
+ mountEffect = !mountEffect;
+ if (mountEffect) {
+ ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialMountSwitch);
+ } else {
+ ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialMountSwitch);
+ }
+ //更新特效开关
+ IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setMountEffect(mountEffect));
+ }
+ );
}
@Override
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 a06f1801b..b18655118 100644
--- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java
+++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java
@@ -166,6 +166,7 @@ public class ImgLoader {
.apply(RequestOptions.bitmapTransform(sBlurTransformation))
.into(imageView);
}
+
/**
* 显示模糊的毛玻璃图片
*/
@@ -175,9 +176,11 @@ public class ImgLoader {
}
Glide.with(context).asDrawable().load(url)
.skipMemoryCache(SKIP_MEMORY_CACHE)
- .apply(RequestOptions.bitmapTransform(new BlurTransformation(95)))
+ .apply(RequestOptions.bitmapTransform(new BlurTransformation(100)))
+ .placeholder(R.mipmap.live_bg)
.into(imageView);
}
+
private static boolean contextIsExist(Context context) {
if (context == null) {
return false;
diff --git a/common/src/main/res/layout/view_effects_settings.xml b/common/src/main/res/layout/view_effects_settings.xml
index 381d0e138..dc2fbea48 100644
--- a/common/src/main/res/layout/view_effects_settings.xml
+++ b/common/src/main/res/layout/view_effects_settings.xml
@@ -38,4 +38,29 @@
android:src="@mipmap/special_icon_off" />
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/mipmap-xxhdpi/live_bg.jpg b/common/src/main/res/mipmap-xxhdpi/live_bg.jpg
new file mode 100644
index 000000000..6d9899eb1
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/live_bg.jpg differ
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 7357524e8..e513747e8 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -879,4 +879,5 @@
基础工具
特效設置
屏蔽礼物特效
+ 屏蔽坐骑特效
diff --git a/config.gradle b/config.gradle
index 492fa93ba..3f66756b1 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 84c740d57..3a4a38df9 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
@@ -66,6 +66,7 @@ import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.pay.PayCallback;
import com.yunbao.common.pay.PayPresenter;
import com.yunbao.common.utils.Bus;
+import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ProcessResultUtil;
@@ -357,6 +358,10 @@ public class LiveAudienceActivity extends LiveActivity {
//侧边栏
drawerLayout = findViewById(R.id.drawer_layout);
+ FrameLayout leftDrawer = findViewById(R.id.left_drawer);
+ DrawerLayout.LayoutParams layoutParams = (DrawerLayout.LayoutParams) leftDrawer.getLayoutParams();
+ layoutParams.width = DeviceUtils.getScreenWidth(this) / 3 * 2;
+ leftDrawer.setLayoutParams(layoutParams);
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
sidebarBack = findViewById(R.id.sidebar_back);
ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), sidebarBack);
diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java
index 79ecf186c..46b6a4096 100644
--- a/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java
+++ b/live/src/main/java/com/yunbao/live/presenter/LiveEnterRoomAnimPresenter.java
@@ -414,7 +414,7 @@ public class LiveEnterRoomAnimPresenter {
colocNow = "#" + car.getCar_colour();
playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room);
}
- if (IMLoginManager.get(mContext).getUserInfo().isGiftEffect()){
+ if (IMLoginManager.get(mContext).getUserInfo().isMountEffect()){
GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback);
}
diff --git a/live/src/main/res/layout/activity_live_audience.xml b/live/src/main/res/layout/activity_live_audience.xml
index 2d8e8cee0..9a6b5d465 100644
--- a/live/src/main/res/layout/activity_live_audience.xml
+++ b/live/src/main/res/layout/activity_live_audience.xml
@@ -53,7 +53,7 @@