界面修改

This commit is contained in:
18401019693 2022-08-18 16:23:49 +08:00
parent b98e3a874a
commit f8ea294d6d
10 changed files with 72 additions and 7 deletions

View File

@ -209,6 +209,18 @@ public class IMLoginModel extends BaseModel {
//礼物特效开关 //礼物特效开关
@SerializedName("gift_effect") @SerializedName("gift_effect")
private boolean giftEffect = false; 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() { public boolean isGiftEffect() {
return giftEffect; return giftEffect;

View File

@ -16,8 +16,8 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
* 特效设置页面 * 特效设置页面
*/ */
public class EffectsSettingsDialog extends AbsDialogFragment { public class EffectsSettingsDialog extends AbsDialogFragment {
private ImageView specialSwitch; private ImageView specialSwitch, specialMountSwitch;
private boolean giftEffect; private boolean giftEffect, mountEffect;
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
@ -39,12 +39,19 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo(); IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo();
specialSwitch = (ImageView) findViewById(R.id.special_switch); specialSwitch = (ImageView) findViewById(R.id.special_switch);
specialMountSwitch = (ImageView) findViewById(R.id.special_mount_switch);
giftEffect = userInfo.isGiftEffect(); giftEffect = userInfo.isGiftEffect();
mountEffect = userInfo.isMountEffect();
if (giftEffect) { if (giftEffect) {
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch); ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
} else { } else {
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialSwitch); 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, () -> { ViewClicksAntiShake.clicksAntiShake(specialSwitch, () -> {
giftEffect = !giftEffect; giftEffect = !giftEffect;
@ -57,6 +64,18 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setGiftEffect(giftEffect)); 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 @Override

View File

@ -166,6 +166,7 @@ public class ImgLoader {
.apply(RequestOptions.bitmapTransform(sBlurTransformation)) .apply(RequestOptions.bitmapTransform(sBlurTransformation))
.into(imageView); .into(imageView);
} }
/** /**
* 显示模糊的毛玻璃图片 * 显示模糊的毛玻璃图片
*/ */
@ -175,9 +176,11 @@ public class ImgLoader {
} }
Glide.with(context).asDrawable().load(url) Glide.with(context).asDrawable().load(url)
.skipMemoryCache(SKIP_MEMORY_CACHE) .skipMemoryCache(SKIP_MEMORY_CACHE)
.apply(RequestOptions.bitmapTransform(new BlurTransformation(95))) .apply(RequestOptions.bitmapTransform(new BlurTransformation(100)))
.placeholder(R.mipmap.live_bg)
.into(imageView); .into(imageView);
} }
private static boolean contextIsExist(Context context) { private static boolean contextIsExist(Context context) {
if (context == null) { if (context == null) {
return false; return false;

View File

@ -38,4 +38,29 @@
android:src="@mipmap/special_icon_off" /> android:src="@mipmap/special_icon_off" />
</FrameLayout> </FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="21dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/shield_mount_effect"
android:textColor="#FF9A9A9A"
android:textSize="15sp" />
<ImageView
android:id="@+id/special_mount_switch"
android:layout_width="40.8dp"
android:layout_height="24.8dp"
android:layout_gravity="end|center_vertical"
android:src="@mipmap/special_icon_off" />
</FrameLayout>
</LinearLayout> </LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -879,4 +879,5 @@
<string name="basic_tools">基础工具</string> <string name="basic_tools">基础工具</string>
<string name="effects_settings">特效設置</string> <string name="effects_settings">特效設置</string>
<string name="shield_gift_effect">屏蔽礼物特效</string> <string name="shield_gift_effect">屏蔽礼物特效</string>
<string name="shield_mount_effect">屏蔽坐骑特效</string>
</resources> </resources>

View File

@ -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",

View File

@ -66,6 +66,7 @@ import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.pay.PayCallback; import com.yunbao.common.pay.PayCallback;
import com.yunbao.common.pay.PayPresenter; import com.yunbao.common.pay.PayPresenter;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ProcessResultUtil; import com.yunbao.common.utils.ProcessResultUtil;
@ -357,6 +358,10 @@ public class LiveAudienceActivity extends LiveActivity {
//侧边栏 //侧边栏
drawerLayout = findViewById(R.id.drawer_layout); 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); sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
sidebarBack = findViewById(R.id.sidebar_back); sidebarBack = findViewById(R.id.sidebar_back);
ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), sidebarBack); ImgLoader.displayBlurLive(mContext, liveBean.getAvatar(), sidebarBack);

View File

@ -414,7 +414,7 @@ public class LiveEnterRoomAnimPresenter {
colocNow = "#" + car.getCar_colour(); colocNow = "#" + car.getCar_colour();
playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room); 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); GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback);
} }

View File

@ -53,7 +53,7 @@
<FrameLayout <FrameLayout
android:id="@+id/left_drawer" android:id="@+id/left_drawer"
android:layout_width="240dp" android:layout_width="260dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="end" android:layout_gravity="end"
android:background="@mipmap/live_bg" android:background="@mipmap/live_bg"