修复测试反馈内容

This commit is contained in:
zlzw 2024-07-25 15:00:05 +08:00
parent 96a6b05d03
commit c20a9804e9
43 changed files with 555 additions and 297 deletions

View File

@ -252,11 +252,13 @@ android {
String tskReqStr = gradle.getStartParameter().getTaskRequests().args.toString()
println("处理ndk 版本 = " + tskReqStr)
def isLink = tskReqStr.contains("Link")
if (isLink) {
if (isLink) {//32so库可以有效降低包体大小
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
//abiFilters "arm64-v8a", "x86_64"
println("打包ndk 链接")
} else {
abiFilters "armeabi-v7a", "arm64-v8a"
//abiFilters "arm64-v8a"
println("打包ndk其他")
}
}

View File

@ -96,6 +96,9 @@
<queries>
<package android:name="com.twitter.android" />
<package android:name="jp.naver.line.android" />
<package android:name="th.co.truemoney.wallet" />
<package android:name="com.eg.android.AlipayGphone" />
<package android:name="my.com.tngdigital.ewallet" />
</queries>
<application

View File

@ -12,25 +12,30 @@ import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.view.DisplayCutout;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.R;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.LifeCycleListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ClickUtil;
import com.yunbao.common.utils.ToastUtil;
import java.util.ArrayList;
import java.util.List;
@ -301,6 +306,25 @@ public abstract class AbsActivity extends AppCompatActivity {
return getCurrentNavigationBarHeight(((Activity) context));
}
public static int getNavigationStatusBarHeight(Context context) {
int notchHeight = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
WindowInsets windowInsets = ((Activity) context).getWindow().getDecorView().getRootWindowInsets();
if (windowInsets != null) {
DisplayCutout displayCutout = windowInsets.getDisplayCutout();
if (displayCutout != null) {
notchHeight = displayCutout.getSafeInsetTop();
}
}
}
if (notchHeight != 0) {
return notchHeight;
}
Rect rect = new Rect();
((Activity) context).getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
return rect.top;
}
/**
* 全面屏是否开启全面屏开关 0 关闭 1 开启
*

View File

@ -88,6 +88,7 @@ public class WebViewActivity extends AbsActivity {
@Override
public void setStatusBar() {
super.setStatusBar();
// getWindow().setStatusBarColor(Color.parseColor("#FFFFFF"));
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
@ -147,8 +148,7 @@ public class WebViewActivity extends AbsActivity {
if (url.contains("for")) {
mWebView.loadUrl("javascript:goAnchorTab()");
}
view.loadUrl("javascript:setTop(" + DpUtil.dp2px(15) + ")");
if(url.startsWith(HtmlConfig.SHOP)){
//商店页不做动态变换
return;

View File

@ -107,12 +107,12 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
tv_rename.setText("");
user_name.setTextColor(Color.parseColor("#A2A2A2"));
avatar.setVisibility(View.GONE);
if (giftStatus != 1) {
user_name.setText(WordUtil.getNewString(R.string.dialog_gift_wall_tab2_list_wait));
if (list_type == 1) {
user_name.setText(WordUtil.getNewString(R.string.dialog_gift_wall_assistance_wait));
} else if (!isStar) {
user_name.setText(WordUtil.getNewString(R.string.dialog_gift_wall_classic_wait));
} else {
user_name.setText(WordUtil.getNewString(R.string.dialog_gift_wall_assistance_wait));
user_name.setText(WordUtil.getNewString(R.string.dialog_gift_wall_tab2_list_wait));
}
return;
}
@ -120,7 +120,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
if (isStar && list_type == 2) {
ImgLoader.display(itemView.getContext(), data.getLive_avatar(), avatar);
anchor_name.setText(data.getLive_user_name());
if (data.getActive_rank_hide() == 1) {
if (data.getGift_hall_rank_hide() == 1 && !data.getUser_id().equals(IMLoginManager.get(itemView.getContext()).getUserInfo().getId() + "")) {
avatar2.setImageResource(R.mipmap.hide);
user_name.setText(WordUtil.getNewString(R.string.mystery_man));
} else {
@ -132,7 +132,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
} else {
avatar2.setVisibility(View.INVISIBLE);
anchor_name.setVisibility(View.GONE);
if (data.getActive_rank_hide() == 1) {
if (data.getGift_hall_rank_hide() == 1&& !data.getUser_id().equals(IMLoginManager.get(itemView.getContext()).getUserInfo().getId() + "")) {
avatar.setImageResource(R.mipmap.hide);
user_name.setText(WordUtil.getNewString(R.string.mystery_man));
} else {

View File

@ -47,6 +47,7 @@ public class GiftWallMainTab1List2Adapter extends RecyclerView.Adapter<GiftWallM
boolean isStar;
SVGAVideoEntity drawable;
String toUid;
String anchorId;
boolean isAnchor;
private boolean isLiveRoom;
@ -63,6 +64,10 @@ public class GiftWallMainTab1List2Adapter extends RecyclerView.Adapter<GiftWallM
isAnchor = anchor;
}
public void setAnchorId(String anchorId) {
this.anchorId = anchorId;
}
public void setList(List<GiftWallBean.Gift> list) {
if (list == null) {
list = new ArrayList<>();
@ -118,7 +123,7 @@ public class GiftWallMainTab1List2Adapter extends RecyclerView.Adapter<GiftWallM
if (list == null) {
list = new ArrayList<>();
}
int index=list.size()-1;
int index = list.size() - 1;
list.addAll(gifts);
notifyItemRangeChanged(index, gifts.size());
}
@ -172,6 +177,7 @@ public class GiftWallMainTab1List2Adapter extends RecyclerView.Adapter<GiftWallM
new GiftWallGiftInfoDialog(mContext, gift.getGift_id() + "", toUid, isAnchor)
.setFullWindows(!isLiveRoom)
.setLiveRoom(isLiveRoom)
.setAnchorId(anchorId)
.setStar(isStar)
.showDialog();
}

View File

@ -38,6 +38,7 @@ import com.yunbao.common.event.ClosePopupDialogEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@ -50,6 +51,7 @@ public class GiftWallMainTab2ListAdapter extends RecyclerView.Adapter<GiftWallMa
List<GiftWallTab2Bean.Gift> list;
boolean isStar;
String toUid;
String anchorId;
boolean isAnchor;
private boolean isLiveRoom;
boolean isNowRank;
@ -71,6 +73,10 @@ public class GiftWallMainTab2ListAdapter extends RecyclerView.Adapter<GiftWallMa
isAnchor = anchor;
}
public void setAnchorId(String anchorId) {
this.anchorId = anchorId;
}
public void setList(List<GiftWallTab2Bean.Gift> list) {
if (list == null) {
list = new ArrayList<>();
@ -169,11 +175,21 @@ public class GiftWallMainTab2ListAdapter extends RecyclerView.Adapter<GiftWallMa
user2Avatar.setVisibility(View.VISIBLE);
imageView8.setVisibility(View.VISIBLE);
tv_wait.setVisibility(View.GONE);
gift_number.setText(String.format(Locale.getDefault(), "%d", giftData.getNeedCoinTotal()));
display(mContext, giftData.getNamingLiveAvatar(), user1Avatar, 35, 35);
display(mContext, giftData.getNamingUserAvatar(), user2Avatar, 35, 35);
anchor_nickname.setText(giftData.getNamingLiveNicename());
user_nickname.setText(giftData.getNamingUserNicename());
gift_number.setText(String.format(Locale.getDefault(), "%d", giftData.getGiftHallSendNum()));
if (giftData.getNamingLiveActiveRankHide() == 1) {
user1Avatar.setImageResource(R.mipmap.hide);
anchor_nickname.setText(WordUtil.getNewString(R.string.mystery_man));
} else {
display(mContext, giftData.getNamingLiveAvatar(), user1Avatar, 35, 35);
anchor_nickname.setText(giftData.getNamingLiveNicename());
}
if (giftData.getNamingUserActiveRankHide() == 1) {
user2Avatar.setImageResource(R.mipmap.hide);
user_nickname.setText(WordUtil.getNewString(R.string.mystery_man));
} else {
display(mContext, giftData.getNamingUserAvatar(), user2Avatar, 35, 35);
user_nickname.setText(giftData.getNamingUserNicename());
}
} else {
user1Avatar.setVisibility(View.GONE);
user2Avatar.setVisibility(View.GONE);
@ -187,12 +203,14 @@ public class GiftWallMainTab2ListAdapter extends RecyclerView.Adapter<GiftWallMa
ViewClicksAntiShake.clicksAntiShake(itemView, () -> {
if (isStar) {
if (isNowRank) {
if (StringUtil.isEmpty(giftData.getNamingLiveNicename(), giftData.getNamingUserNicename())&&isLiveRoom) {
if (StringUtil.isEmpty(giftData.getNamingLiveNicename(), giftData.getNamingUserNicename()) && isLiveRoom) {
Bus.get().post(new JsWishBean(giftData.getGiftId() + ""));
Bus.get().post(new ClosePopupDialogEvent());
} else {
new GiftWallGiftInfoDialog(mContext, giftData.getGiftId() + "", toUid, isAnchor)
.setFullWindows(!isLiveRoom)
.setAnchorId(anchorId)
.setTab2Enter(true)
.setLiveRoom(isLiveRoom)
.setStar(isStar)
.showDialog();
@ -201,7 +219,17 @@ public class GiftWallMainTab2ListAdapter extends RecyclerView.Adapter<GiftWallMa
new GiftWallMainTab2ClassicInfoDialog(mContext, giftData, isAnchor).setFullWindows(!isLiveRoom).showDialog();
}
} else {
new GiftWallTab2List2Dialog(mContext).setGift(giftData).showDialog();
if (isNowRank) {
new GiftWallGiftInfoDialog(mContext, giftData.getGiftId() + "", toUid, isAnchor)
.setFullWindows(!isLiveRoom)
.setAnchorId(anchorId)
.setTab2Enter(true)
.setLiveRoom(isLiveRoom)
.setStar(isStar)
.showDialog();
} else {
new GiftWallTab2List2Dialog(mContext).setGift(giftData).showDialog();
}
}
});
}

View File

@ -14,7 +14,9 @@ import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallInfoBean;
import com.yunbao.common.bean.GiftWallMainTab2ClassicInfoBean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import java.util.ArrayList;
import java.util.List;
@ -24,8 +26,11 @@ public class GiftWallTab2GiftInfoListItemAdapter extends RecyclerView.Adapter<Gi
List<GiftWallMainTab2ClassicInfoBean.GiftData> data = new ArrayList<>();
public void setData(List<GiftWallMainTab2ClassicInfoBean.GiftData> data) {
if (data == null) {
if (data == null || data.isEmpty()) {
data = new ArrayList<>();
GiftWallMainTab2ClassicInfoBean.GiftData giftData=new GiftWallMainTab2ClassicInfoBean.GiftData();
giftData.setUserId("-1");
data.add(giftData);
}
this.data = data;
notifyDataSetChanged();
@ -72,6 +77,14 @@ public class GiftWallTab2GiftInfoListItemAdapter extends RecyclerView.Adapter<Gi
user_name.setText(data.getUserName());
ImgLoader.display(itemView.getContext(), data.getAvatar(), avatar);
}
ViewClicksAntiShake.clicksAntiShake(avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if(data.getActiveRankHide()==0){
RouteUtil.forwardUserHome(itemView.getContext(), String.valueOf(data.getUserId()), 0);
}
}
});
}
}

View File

@ -1,5 +1,6 @@
package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
public class GiftNamingInfoModel extends BaseModel {
@ -68,6 +69,28 @@ public class GiftNamingInfoModel extends BaseModel {
private String namingLiveCoin;
@SerializedName("isweek")
private String isweek;
@JSONField(name = "naming_user_gift_hall_rank_hide")
@SerializedName("naming_user_gift_hall_rank_hide")
private int naming_user_gift_hall_rank_hide;
@JSONField(name = "naming_live_gift_hall_rank_hide")
@SerializedName("naming_live_gift_hall_rank_hide")
private int naming_live_gift_hall_rank_hide;
public int getNaming_user_gift_hall_rank_hide() {
return naming_user_gift_hall_rank_hide;
}
public void setNaming_user_gift_hall_rank_hide(int naming_user_gift_hall_rank_hide) {
this.naming_user_gift_hall_rank_hide = naming_user_gift_hall_rank_hide;
}
public int getNaming_live_gift_hall_rank_hide() {
return naming_live_gift_hall_rank_hide;
}
public void setNaming_live_gift_hall_rank_hide(int naming_live_gift_hall_rank_hide) {
this.naming_live_gift_hall_rank_hide = naming_live_gift_hall_rank_hide;
}
public String getId() {
return id;

View File

@ -1,13 +1,12 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.utils.StringUtil;
import java.util.List;
public class GiftWallBean extends BaseModel {
private IlluminateData illuminate_data;
private int active_rank_hide;
private int gift_hall_rank_hide;
public GiftWallBean() {
@ -21,12 +20,12 @@ public class GiftWallBean extends BaseModel {
this.illuminate_data = illuminate_data;
}
public int getActive_rank_hide() {
return active_rank_hide;
public int getGift_hall_rank_hide() {
return gift_hall_rank_hide;
}
public void setActive_rank_hide(int active_rank_hide) {
this.active_rank_hide = active_rank_hide;
public void setGift_hall_rank_hide(int gift_hall_rank_hide) {
this.gift_hall_rank_hide = gift_hall_rank_hide;
}
public static class IlluminateData {

View File

@ -2,11 +2,8 @@ package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.utils.RandomUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
import java.util.ArrayList;
import java.util.List;
public class GiftWallInfoBean extends BaseModel {
@ -71,7 +68,7 @@ public class GiftWallInfoBean extends BaseModel {
@SerializedName("need_coin")
private int needcoin;
@SerializedName("needcoin_total")
private int needcoin_total;
private String needcoin_total;
@SerializedName("gift_hall_send_num")
private String gift_hall_send_num;
@SerializedName("illuminate_num")
@ -88,6 +85,16 @@ public class GiftWallInfoBean extends BaseModel {
private String gift_hall_end;
@SerializedName("user_gift_hall_send_num")
private int user_gift_hall_send_num;
@SerializedName("gift_status")
private int gift_status;
public int getGift_status() {
return gift_status;
}
public void setGift_status(int gift_status) {
this.gift_status = gift_status;
}
public int getUser_gift_hall_send_num() {
return user_gift_hall_send_num;
@ -154,11 +161,11 @@ public class GiftWallInfoBean extends BaseModel {
this.needcoin = needcoin;
}
public int getNeedcoin_total() {
public String getNeedcoin_total() {
return needcoin_total;
}
public void setNeedcoin_total(int needcoin_total) {
public void setNeedcoin_total(String needcoin_total) {
this.needcoin_total = needcoin_total;
}
@ -211,8 +218,9 @@ public class GiftWallInfoBean extends BaseModel {
private int gift_hall_send_num;
private String user_name;
private String avatar;
String user_id;
private int id;
private int active_rank_hide;
private int gift_hall_rank_hide;
private String create_time;
private String live_id;
private String live_user_name;
@ -221,6 +229,14 @@ public class GiftWallInfoBean extends BaseModel {
// 同样地这里省略getter和setter方法
public String getUser_id() {
return user_id;
}
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getLive_id() {
return live_id;
}
@ -249,8 +265,8 @@ public class GiftWallInfoBean extends BaseModel {
return gift_hall_send_num;
}
public String getGift_hall_send_numForString() {
if(gift_hall_send_num>99999){
return "99999+";
if(gift_hall_send_num>999999){
return "999999+";
}else{
return String.valueOf(gift_hall_send_num);
}
@ -283,12 +299,12 @@ public class GiftWallInfoBean extends BaseModel {
this.id = id;
}
public int getActive_rank_hide() {
return active_rank_hide;
public int getGift_hall_rank_hide() {
return gift_hall_rank_hide;
}
public void setActive_rank_hide(int active_rank_hide) {
this.active_rank_hide = active_rank_hide;
public void setGift_hall_rank_hide(int gift_hall_rank_hide) {
this.gift_hall_rank_hide = gift_hall_rank_hide;
}
public String getCreate_time() {

View File

@ -103,7 +103,7 @@ public class GiftWallMainTab2ClassicInfoBean extends BaseModel{
@SerializedName("naming_live_avatar")
private String namingLiveAvatar;
@SerializedName("naming_live_active_rank_hide")
@SerializedName("naming_live_gift_hall_rank_hide")
private int namingLiveActiveRankHide;
@SerializedName("naming_user_id")
@ -115,7 +115,7 @@ public class GiftWallMainTab2ClassicInfoBean extends BaseModel{
@SerializedName("naming_user_avatar")
private String namingUserAvatar;
@SerializedName("naming_user_active_rank_hide")
@SerializedName("naming_user_gift_hall_rank_hide")
private int namingUserActiveRankHide;
// 如果需要可以添加无参构造器getter和setter这里省略

View File

@ -127,11 +127,11 @@ public class GiftWallTab2Bean extends BaseModel{
@SerializedName("naming_user_avatar")
public String namingUserAvatar;
@SerializedName("naming_user_active_rank_hide")
@SerializedName("naming_user_gift_hall_rank_hide")
public int namingUserActiveRankHide;
@SerializedName("needcoin_total")
public int needCoinTotal;
public long needCoinTotal;
public int getGiftId() {
return giftId;
@ -301,11 +301,11 @@ public class GiftWallTab2Bean extends BaseModel{
this.namingUserActiveRankHide = namingUserActiveRankHide;
}
public int getNeedCoinTotal() {
public long getNeedCoinTotal() {
return needCoinTotal;
}
public void setNeedCoinTotal(int needCoinTotal) {
public void setNeedCoinTotal(long needCoinTotal) {
this.needCoinTotal = needCoinTotal;
}
}

View File

@ -74,6 +74,28 @@ public class LiveGiftBean {
private int blindBoxTicket;
@JSONField(name = "blind_box_ticket_id")
private int blindBoxTicketId;
@JSONField(name = "naming_user_gift_hall_rank_hide")
@SerializedName("naming_user_gift_hall_rank_hide")
private int naming_user_gift_hall_rank_hide;
@JSONField(name = "naming_live_gift_hall_rank_hide")
@SerializedName("naming_live_gift_hall_rank_hide")
private int naming_live_gift_hall_rank_hide;
public int getNaming_user_gift_hall_rank_hide() {
return naming_user_gift_hall_rank_hide;
}
public void setNaming_user_gift_hall_rank_hide(int naming_user_gift_hall_rank_hide) {
this.naming_user_gift_hall_rank_hide = naming_user_gift_hall_rank_hide;
}
public int getNaming_live_gift_hall_rank_hide() {
return naming_live_gift_hall_rank_hide;
}
public void setNaming_live_gift_hall_rank_hide(int naming_live_gift_hall_rank_hide) {
this.naming_live_gift_hall_rank_hide = naming_live_gift_hall_rank_hide;
}
public boolean isPageGift() {
return isPageGift;

View File

@ -3,6 +3,7 @@ package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -122,7 +123,7 @@ public class OpenAdModel extends BaseModel {
if (!url.startsWith("http://") && !url.startsWith("https://")) {
url = CommonAppConfig.HOST + (url.startsWith("/") ? url : "/" + url);
}
return url;
return url+"&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
}
public String getOriginalUrl() {

View File

@ -48,17 +48,19 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
private ViewPager2 mViewPager;
private LinearLayout mIvTabsLayout;
private List<BaseFragment> fragments = new ArrayList<>();
private String anchorId;
private boolean isFullWindows;
String toUserId;
String userName;
boolean isAnchor;
public GiftWallDialog(@NonNull Context context, String toUserId, String userName, boolean isAnchor) {
public GiftWallDialog(@NonNull Context context, String toUserId, String userName, String anchorId, boolean isAnchor) {
super(context);
this.toUserId = toUserId;
this.isAnchor = isAnchor;
this.userName = userName;
this.anchorId=anchorId;
}
public GiftWallDialog setFullWindows(boolean fullWindows) {
@ -101,7 +103,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
WordUtil.isNewZh() ? "的禮物展館" : "'s Gift Hall"
));
fragments.add(new GiftWallMainTab1Fragment().setToUserId(toUserId).setAnchor(isAnchor).setLiveRoom(!isFullWindows).setOnItemClickListener(new OnItemClickListener<GiftWallBean>() {
fragments.add(new GiftWallMainTab1Fragment().setToUserId(toUserId).setAnchor(isAnchor).setAnchorId(anchorId).setLiveRoom(!isFullWindows).setOnItemClickListener(new OnItemClickListener<GiftWallBean>() {
@Override
public void onItemClick(GiftWallBean bean, int position) {
if (position == 1) {
@ -115,7 +117,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
}
}
}));
fragments.add(new GiftWallMainTab2Fragment().setToUserId(toUserId).setAnchor(isAnchor).setLiveRoom(!isFullWindows));
fragments.add(new GiftWallMainTab2Fragment().setToUserId(toUserId).setAnchorId(anchorId).setAnchor(isAnchor).setLiveRoom(!isFullWindows));
mViewPager.setAdapter(new FragmentStateAdapter((FragmentActivity) mContext) {
@NonNull
@Override

View File

@ -72,12 +72,14 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
String giftId;
String toUserId;
String anchorId;
boolean isAnchor;
int gift_hall_type = 1;
int list_type = 2;
private boolean isLiveRoom;
String time;
private boolean isStar;
private boolean isTab2Enter = false;
public GiftWallGiftInfoDialog(Context context, String giftId, String toUserId, boolean isAnchor) {
@ -92,6 +94,15 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
return this;
}
public GiftWallGiftInfoDialog setTab2Enter(boolean tab2Enter) {
isTab2Enter = tab2Enter;
return this;
}
public GiftWallGiftInfoDialog setAnchorId(String anchorId) {
this.anchorId = anchorId;
return this;
}
public GiftWallGiftInfoDialog setLiveRoom(boolean isLiveRoom) {
this.isLiveRoom = isLiveRoom;
@ -161,17 +172,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
recyclerView.setAdapter(adapter);
recyclerView.addItemDecoration(new ItemDecoration(mContext, 0x00000000, 0, 10));
if (isStar) {
tab2.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_star));
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename1));
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value1));
tv_list_title.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_star));
} else {
tab2.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_champion));
tv_list_title.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_champion));
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename));
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value));
}
initTabText();
findViewById(R.id.item_anchor_name).setVisibility(View.GONE);
ViewClicksAntiShake.clicksAntiShake(tab1, () -> {
@ -185,7 +186,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
tab2.setBackgroundResource(R.drawable.gift_wall_gift_info_list_btn_down);
tab2.setTextColor(Color.parseColor("#FFFFFF"));
list_type = 1;
adapter.setList_type(list_type);
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_assistance_user));
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_assistance_star));
initData();
@ -200,6 +201,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
tab1.setBackgroundResource(R.drawable.gift_wall_gift_info_list_btn_down);
tab1.setTextColor(Color.parseColor("#FFFFFF"));
list_type = 2;
adapter.setList_type(list_type);
initTabText();
initData();
});
XPopup.Builder builder = new XPopup.Builder(getContext())
@ -248,6 +251,20 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
resetWindows();
}
private void initTabText() {
if (isStar) {
tab2.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_star));
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename1));
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value1));
tv_list_title.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_star));
} else {
tab2.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_champion));
tv_list_title.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_title_champion));
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename));
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value));
}
}
private void resetWindows() {
if (isFullWindows) {
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.gift_name).getLayoutParams();
@ -300,8 +317,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
diamond_text.setText(String.format(Locale.getDefault(), "%d", giftBean.getGift_info().getNeedcoin()));
gift_tv_max.setText(String.format(Locale.getDefault(), "/%s", giftBean.getGift_info().getIlluminate_num()));
gift_tv_progress.setText(String.format(Locale.getDefault(), "%s", giftBean.getGift_info().getGift_hall_send_num()));
gift_progress.setMax(Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num()));
gift_progress.setProgress(giftBean.getGift_info().getNeedcoin_total());
gift_progress.setMax(giftBean.getGift_info().getIlluminate_num());
gift_progress.setProgress(Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num()));
if (giftBean.getGift_info().getIlluminate_status() == 1) {
gift_btn.setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_top_btn_continue));
btn_lighten.setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_spinner_up));
@ -316,6 +333,12 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
tab_layout.setVisibility(View.VISIBLE);
bottom_layout.setVisibility(View.VISIBLE);
tv_list_title.setVisibility(View.GONE);
if (isTab2Enter) {
tab_layout.setVisibility(View.GONE);
bottom_layout.setVisibility(View.GONE);
tv_list_title.setVisibility(View.VISIBLE);
gift_progress.setVisibility(View.GONE);
}
} else {
tab_layout.setVisibility(View.GONE);
bottom_layout.setVisibility(View.GONE);
@ -326,20 +349,20 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
gift_progress.setVisibility(View.GONE);
}
}
if (!isLiveRoom || (IMLoginManager.get(mContext).getUserInfo().getId() + "").equals(toUserId) && isAnchor) {
if (!isLiveRoom || giftBean.getGift_info().getGift_status() == 0) {
gift_btn.setEnabled(false);
btn_one.setEnabled(false);
gift_btn.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un);
btn_one.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un);
}
adapter.setData(giftBean.getData());
time = (WordUtil.isNewZh() ? "榜單結算時間" : "Settlement time") + giftBean.getGift_info().getGift_hall_start() + " - " + giftBean.getGift_info().getGift_hall_end();
time = (WordUtil.isNewZh() ? "榜單結算時間:" : "Settlement time:") + giftBean.getGift_info().getGift_hall_start() + " - " + giftBean.getGift_info().getGift_hall_end();
ImgLoader.display(mContext, IMLoginManager.get(mContext).getUserInfo().getAvatar(), avatar);
user_name.setText(IMLoginManager.get(mContext).getUserInfo().getUserNicename());
send_num.setText(String.format(Locale.getDefault(), "%s", giftBean.getGift_info().getUser_gift_hall_send_num()));
String tmp = "";
if (giftBean.getGift_info().getIlluminate_status() == 0) {//未點亮
if (giftBean.getGift_info().getIlluminate_status() != 1) {//未點亮
btn_one.setText(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_light);
tmp = String.format(Locale.getDefault(), "%s", (giftBean.getGift_info().getIlluminate_num() - Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num())));
setTips(tmp);
@ -350,7 +373,10 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
loadChampion(giftBean);
}
}
if (!isAnchor) {
gift_schedule.setVisibility(View.GONE);
gift_progress.setVisibility(View.GONE);
}
initAnim();
}
@ -364,31 +390,31 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
private void loadChampion(GiftWallInfoBean giftBean) {
int tmp = 0;
int mySend = Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num());
int mySend = giftBean.getGift_info().getUser_gift_hall_send_num();
if (giftBean.getData() != null && !giftBean.getData().isEmpty()) {
tmp = giftBean.getData().get(0).getGift_hall_send_num() - Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num()) + 1;
tmp = giftBean.getData().get(0).getGift_hall_send_num() - giftBean.getGift_info().getUser_gift_hall_send_num() + 1;
}
if (mySend > tmp) {
if (mySend > tmp || giftBean.getData().get(0).getUser_id().equals(IMLoginManager.get(mContext).getUserInfo().getId() + "")) {
btn_one.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get));
btn_one_tips.setVisibility(View.GONE);
} else {
btn_one.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion));
setTips(String.valueOf(tmp + 1));
setTips(String.valueOf(tmp));
}
}
private void loadStar(GiftWallInfoBean giftBean) {
int tmp = 0;
int mySend = Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num());
int mySend = giftBean.getGift_info().getUser_gift_hall_send_num();
if (giftBean.getData() != null && !giftBean.getData().isEmpty()) {
tmp = giftBean.getData().get(0).getGift_hall_send_num() - Integer.parseInt(giftBean.getGift_info().getGift_hall_send_num()) + 1;
tmp = giftBean.getData().get(0).getGift_hall_send_num() - giftBean.getGift_info().getUser_gift_hall_send_num() + 1;
}
if (mySend > tmp) {
if (mySend > tmp || giftBean.getData().get(0).getUser_id().equals(IMLoginManager.get(mContext).getUserInfo().getId() + "")) {
btn_one.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_star_get));
btn_one_tips.setVisibility(View.GONE);
} else {
btn_one.setText(WordUtil.getNewString(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_star));
setTips(String.valueOf(tmp + 1));
setTips(String.valueOf(tmp));
}
}

View File

@ -30,7 +30,9 @@ import com.yunbao.common.fragment.GiftWallMainTab2Fragment;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
@ -113,10 +115,14 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow {
void initData(GiftWallMainTab2ClassicInfoBean data) {
ImgLoader.display(mContext, data.getGiftInfo().getGiftIcon(), mIvGift);
ImgLoader.display(mContext, data.getGiftInfo().getNamingLiveAvatar(), user_avatar);
if (data.getGiftInfo().getNamingLiveActiveRankHide() == 0 || data.getGiftInfo().getNamingUserId() == IMLoginManager.get(mContext).getUserInfo().getId()) {
ImgLoader.display(mContext, data.getGiftInfo().getNamingLiveAvatar(), user_avatar);
} else {
user_avatar.setImageResource(R.mipmap.hide);
}
gift_name.setText(WordUtil.isNewZh() ? data.getGiftInfo().getGiftName() : data.getGiftInfo().getGiftNameEn());
mTvUserName.setText(data.getGiftInfo().getNamingLiveNicename());
star_value.setText(String.format(Locale.getDefault(), "%d", data.getGiftInfo().getNeedcoinTotal()));
star_value.setText(String.format(Locale.getDefault(), "%d", data.getGiftInfo().getGiftHallSendNum()));
int max = data.getData().size() > 3 ? 3 : 0;
if (max != 0) {
adapter.setData(data.getData().subList(max, data.getData().size()));
@ -134,13 +140,28 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow {
break;
}
}
ViewClicksAntiShake.clicksAntiShake(user_avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (data.getGiftInfo().getNamingLiveActiveRankHide() == 0) {
RouteUtil.forwardUserHome(mContext, String.valueOf(data.getGiftInfo().getNamingLiveId()), 0);
}
}
});
}
void setTopData(GiftWallMainTab2ClassicInfoBean.GiftData data, ImageView avatar, TextView name, TextView value) {
ImgLoader.display(mContext, data.getAvatar(), avatar);
name.setText(data.getUserName());
value.setText(String.format(Locale.getDefault(), "%d", data.getGiftHallSendNum()));
ViewClicksAntiShake.clicksAntiShake(avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (data.getActiveRankHide() == 0) {
RouteUtil.forwardUserHome(mContext, String.valueOf(data.getUserId()), 0);
}
}
});
}
void initView() {

View File

@ -11,7 +11,9 @@ import com.makeramen.roundedimageview.RoundedImageView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallTab2Bean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import java.util.Locale;
@ -55,11 +57,41 @@ public class GiftWallTab2List2Dialog extends AbsDialogCenterPopupWindow {
giftName = findViewById(R.id.gift_name);
ImgLoader.display(mContext, gift.getGiftIcon(), giftImage);
ImgLoader.display(mContext, gift.getNamingUserAvatar(), user1Avatar);
ImgLoader.display(mContext, gift.getNamingLiveAvatar(), user2Avatar);
user1Name.setText(gift.getNamingUserNicename());
user2Name.setText(gift.getNamingLiveNicename());
if (gift.getNamingLiveActiveRankHide() == 0) {
ImgLoader.display(mContext, gift.getNamingLiveAvatar(), user2Avatar);
user2Name.setText(gift.getNamingLiveNicename());
} else {
user2Avatar.setImageResource(R.mipmap.hide);
user2Name.setText(WordUtil.getNewString(R.string.mystery_man));
}
if (gift.getNamingUserActiveRankHide() == 0) {
ImgLoader.display(mContext, gift.getNamingUserAvatar(), user1Avatar);
user1Name.setText(gift.getNamingUserNicename());
} else {
user1Avatar.setImageResource(R.mipmap.hide);
user1Name.setText(WordUtil.getNewString(R.string.mystery_man));
}
giftName.setText(WordUtil.isNewZh() ? gift.getGiftName() : gift.getGiftNameEn());
titleValue.setText(String.format(Locale.getDefault(), "%s", gift.getNeedCoinTotal()));
titleValue.setText(String.format(Locale.getDefault(), "%d", gift.getGiftHallSendNum()));
ViewClicksAntiShake.clicksAntiShake(user1Avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (gift.getNamingUserActiveRankHide() == 0) {
RouteUtil.forwardUserHome(mContext, String.valueOf(gift.getNamingUserId()), 0);
}
}
});
ViewClicksAntiShake.clicksAntiShake(user2Avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (gift.getNamingLiveActiveRankHide() == 0) {
RouteUtil.forwardUserHome(mContext, String.valueOf(gift.getNamingLiveId()), 0);
}
}
});
}
}

View File

@ -43,6 +43,7 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
int screen;
String toUserId;
String anchorId;
boolean isAnchor;
boolean isLiveRoom;
SVGAVideoEntity drawable;
@ -69,6 +70,11 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
return this;
}
public GiftWallMainTab1Fragment setAnchorId(String anchorId) {
this.anchorId = anchorId;
return this;
}
public GiftWallMainTab1Fragment setAnchor(boolean anchor) {
isAnchor = anchor;
return this;
@ -123,8 +129,8 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
}
private void initData(GiftWallBean bean) {
onItemClickListener.onItemClick(bean, bean.getActive_rank_hide());
if (bean.getActive_rank_hide() == 1 && !toUserId.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "")) {
onItemClickListener.onItemClick(bean, bean.getGift_hall_rank_hide());
if (bean.getGift_hall_rank_hide() == 1 && !toUserId.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "")) {
hideLayout.setVisibility(View.VISIBLE);
appbar.setVisibility(View.GONE);
classic_layout.setVisibility(View.GONE);
@ -183,13 +189,15 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
list2Adapter.setToUid(toUserId);
list1Adapter.setAnchor(isAnchor);
list2Adapter.setAnchor(isAnchor);
list1Adapter.setAnchorId(anchorId);
list2Adapter.setAnchorId(anchorId);
list1Adapter.setStar(true);
recyclerView1.setAdapter(list1Adapter);
recyclerView2.setAdapter(list2Adapter);
recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(10), DpUtil.dp2px(11)));
recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(11)));
recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(10), DpUtil.dp2px(5)));
recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(5)));
starGiftsTitle.getPaint().setShader(new LinearGradient(0, 0, 0, classicGiftsTitle.getPaint().getTextSize(),
Color.parseColor("#FEE8C6"), Color.parseColor("#FFD5A3"), Shader.TileMode.CLAMP));

View File

@ -50,6 +50,7 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
int screen;
int type = 1;
String toUserId;
String anchorId;
boolean isAnchor;
private boolean isLiveRoom;
@ -58,6 +59,11 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
return this;
}
public GiftWallMainTab2Fragment setAnchorId(String anchorId) {
this.anchorId = anchorId;
return this;
}
public GiftWallMainTab2Fragment setAnchor(boolean anchor) {
isAnchor = anchor;
return this;
@ -99,6 +105,8 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
list2Adapter.setToUid(toUserId);
list1Adapter.setAnchor(isAnchor);
list2Adapter.setAnchor(isAnchor);
list1Adapter.setAnchorId(anchorId);
list2Adapter.setAnchorId(anchorId);
list1Adapter.setLiveRoom(isLiveRoom);
list2Adapter.setLiveRoom(isLiveRoom);
list1Adapter.setStar(true);
@ -107,8 +115,8 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
recyclerView2.setAdapter(list2Adapter);
recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5)));
recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5)));
//recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(3), DpUtil.dp2px(5)));
//recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(3), DpUtil.dp2px(5)));
starGiftsTitle.getPaint().setShader(new LinearGradient(0, 0, 0, classicGiftsTitle.getPaint().getTextSize(),
Color.parseColor("#FEE8C6"), Color.parseColor("#FFD5A3"), Shader.TileMode.CLAMP));
@ -151,6 +159,7 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
setDslTabColor(fromIndex == 0 ? dslTab1 : dslTab2, fromIndex == 1 ? dslTab1 : dslTab2);
type = (fromIndex + 1);
list1Adapter.setNowRank(fromIndex == 0);
list2Adapter.setNowRank(fromIndex == 0);
screen = 0;
spinnerText.setText(R.string.dialog_gift_wall_list_spinner_all);
initData();
@ -207,6 +216,11 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
void initData() {
list1Adapter.clear();
list2Adapter.clear();
if(type==2){
spinner.setVisibility(View.INVISIBLE);
}else {
spinner.setVisibility(View.VISIBLE);
}
LiveNetManager.get(getContext())
.allGiftHall(String.valueOf(type), new HttpCallback<GiftWallTab2Bean>() {
@Override

View File

@ -1291,8 +1291,8 @@ public interface PDLiveApi {
@GET("/api/public/?service=Gift.getGiftHallMedalList")
Observable<ResponseModel<MedalAchievementModel>> getGiftHallMedalList(@Query("to_uid") String liveUid,@Query("type")String type);
@GET("/api/public/?service=Dress.userUseDress")
Observable<ResponseModel<List<BaseModel>>> userUseDress(@Query("users_dress_id")String users_dress_id);
@GET("/api/public/?service=Gift.useMedal")
Observable<ResponseModel<List<BaseModel>>> userUseDress(@Query("users_dress_id")String users_dress_id,@Query("dress_type")int dress_type);
/**
* 个人展馆

View File

@ -3574,7 +3574,7 @@ public class LiveNetManager {
public void userUseDress( String usersDressId, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.userUseDress(usersDressId)
.userUseDress(usersDressId,3)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {

View File

@ -39,7 +39,6 @@ public class AndroidBug5497Workaround {
public void onGlobalLayout() {
possiblyResizeChildOfContent();
int heightDiff = mChildOfContent.getRootView().getHeight() - mChildOfContent.getHeight();
System.out.println("heightDiff = " + heightDiff);
if (heightDiff < 100) {
frameLayoutParams.height = defHeight;
mChildOfContent.requestLayout();

View File

@ -651,7 +651,7 @@ public class JavascriptInterfaceUtils {
@JavascriptInterface
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl, int isAnchor) {
// RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0, isAnchor == 1);
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid,mAnchorName, isAnchor==1).setFullWindows(true).showDialog();
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid,mAnchorName, null,isAnchor==1).setFullWindows(true).showDialog();
}
@JavascriptInterface

View File

@ -198,6 +198,7 @@
android:layout_marginTop="10dp"
android:layout_marginEnd="17dp"
android:layout_marginBottom="58dp"
android:paddingBottom="32dp"
android:background="@mipmap/gift_wall_gift_info_list"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -61,7 +61,6 @@
android:textColor="#FFD3A4"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="@+id/gift"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/gift"
app:layout_constraintTop_toBottomOf="@+id/gift" />
@ -81,11 +80,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFD3A4"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="@+id/user_avatar_container"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/user_avatar_container"
app:layout_constraintTop_toBottomOf="@+id/user_avatar_container" />
@ -208,7 +206,7 @@
android:id="@+id/user_avatar_2"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@mipmap/icon_avatar_placeholder"
tools:src="@mipmap/icon_avatar_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -233,7 +231,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/user_value_2"
@ -245,7 +243,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@+id/imageView17"
@ -295,7 +293,7 @@
android:id="@+id/user_avatar_1"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@mipmap/icon_avatar_placeholder"
tools:src="@mipmap/icon_avatar_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -325,7 +323,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/user_value_1"
@ -337,7 +335,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@+id/imageView9"
@ -386,7 +384,7 @@
android:id="@+id/user_avatar_3"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@mipmap/icon_avatar_placeholder"
tools:src="@mipmap/icon_avatar_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -411,7 +409,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/user_value_3"
@ -423,7 +421,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:text="TextView"
tools:text="TextView"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"

View File

@ -67,17 +67,17 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/star_layout"
android:layout_width="match_parent"
android:layout_height="275dp"
android:layout_marginBottom="20dp">
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/bg1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:translationY="1dp"
android:background="@mipmap/gift_wall_main_list_bg"
android:scaleType="fitXY"
android:translationY="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -157,7 +157,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/classic_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<ImageView

View File

@ -17,130 +17,129 @@
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"
app:toolbarId="@+id/toolbar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:visibility="gone">
<com.angcyo.tablayout.DslTabLayout
android:id="@+id/tab_layout"
<com.angcyo.tablayout.DslTabLayout
android:id="@+id/tab_layout"
android:layout_width="wrap_content"
android:layout_height="30dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tab_enable_text_bold="true"
app:tab_indicator_drawable="@drawable/gift_wall_man_tab2_dsl"
app:tab_indicator_height="2dp"
app:tab_indicator_width="16dp"
app:tab_indicator_y_offset="8dp"
app:tab_text_max_size="14sp"
app:tab_text_min_size="12sp">
<TextView
android:id="@+id/dsl_tab1"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:letterSpacing="0.1"
android:text="@string/dialog_gift_wall_tab2_dsl_tab1"
android:textSize="12dp"
app:gradient_angle="45" />
<TextView
android:id="@+id/dsl_tab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:letterSpacing="0.1"
android:text="@string/dialog_gift_wall_tab2_dsl_tab2"
android:textColor="#FFEED8"
android:textSize="12dp"
app:gradient_angle="45" />
</com.angcyo.tablayout.DslTabLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/show_time_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout">
<TextView
android:id="@+id/show_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#E5D2C0"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tab_enable_text_bold="true"
app:tab_indicator_drawable="@drawable/gift_wall_man_tab2_dsl"
app:tab_indicator_height="2dp"
app:tab_indicator_width="16dp"
app:tab_indicator_y_offset="8dp"
app:tab_text_max_size="14sp"
app:tab_text_min_size="12sp">
tools:text="本期展館時間 :000000" />
<TextView
android:id="@+id/dsl_tab1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:letterSpacing="0.1"
android:text="@string/dialog_gift_wall_tab2_dsl_tab1"
android:textSize="12dp"
app:gradient_angle="45" />
<TextView
android:id="@+id/dsl_tab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:letterSpacing="0.1"
android:text="@string/dialog_gift_wall_tab2_dsl_tab2"
android:textColor="#FFEED8"
android:textSize="12dp"
app:gradient_angle="45" />
</com.angcyo.tablayout.DslTabLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/show_time_layout"
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
app:layout_constraintBottom_toBottomOf="@+id/show_time"
app:layout_constraintStart_toEndOf="@+id/show_time"
app:layout_constraintTop_toTopOf="@+id/show_time"
app:srcCompat="@mipmap/ic_gift_wall_time2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/show_time"
app:layout_constraintEnd_toStartOf="@+id/show_time"
app:layout_constraintTop_toTopOf="@+id/show_time"
app:srcCompat="@mipmap/ic_gift_wall_time2" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/star_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<TextView
android:id="@+id/star_gifts_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="20dp"
android:text="@string/dialog_gift_wall_list1_title"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="20dp"
android:layout_marginTop="50dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout">
<TextView
android:id="@+id/show_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#E5D2C0"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="本期展館時間 :000000" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
app:layout_constraintBottom_toBottomOf="@+id/show_time"
app:layout_constraintStart_toEndOf="@+id/show_time"
app:layout_constraintTop_toTopOf="@+id/show_time"
app:srcCompat="@mipmap/ic_gift_wall_time2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/show_time"
app:layout_constraintEnd_toStartOf="@+id/show_time"
app:layout_constraintTop_toTopOf="@+id/show_time"
app:srcCompat="@mipmap/ic_gift_wall_time2" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/star_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/star_gifts_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="20dp"
android:text="@string/dialog_gift_wall_list1_title"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:spanCount="3"
tools:itemCount="6"
tools:listitem="@layout/item_gift_wall_man_tab2_list_1" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="10dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.49"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
app:spanCount="3"
tools:itemCount="6"
tools:listitem="@layout/item_gift_wall_man_tab2_list_1" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
@ -149,24 +148,22 @@
android:id="@+id/classic_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="10dp"
android:layout_marginStart="20dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="10dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:spanCount="3"
tools:itemCount="10"
tools:layoutManager="GridLayoutManager"

View File

@ -12,35 +12,38 @@
android:gravity="start"
android:text="@string/dialog_gift_wall_list_info_list_header_rank"
android:textColor="#FFFFFF"
tools:text="10"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar2"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentBottom="true"
android:scaleType="centerCrop"
android:layout_marginStart="32dp"
android:layout_marginStart="55dp"
android:src="@mipmap/icon_avatar_placeholder"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/tv_rank"
app:layout_constraintStart_toEndOf="@+id/tv_rank"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_rank"
app:riv_oval="true"
tools:visibility="visible" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentBottom="true"
android:layout_marginEnd="18dp"
android:scaleType="centerCrop"
android:layout_marginStart="10dp"
android:src="@mipmap/icon_avatar_placeholder"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tv_rank"
app:layout_constraintStart_toEndOf="@+id/tv_rank"
app:layout_constraintEnd_toEndOf="@+id/avatar2"
app:layout_constraintTop_toTopOf="@+id/tv_rank"
app:riv_oval="true"
tools:visibility="visible" />

View File

@ -118,7 +118,7 @@
android:layout_marginStart="20dp"
android:gravity="center"
android:layout_marginEnd="20dp"
android:text="@string/dialog_gift_wall_tab2_list_wait"
android:text="@string/dialog_gift_wall_classic_wait"
android:textColor="#A2A2A2"
android:textSize="14sp"
android:visibility="gone"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="10dp">
@ -21,7 +21,7 @@
<TextView
android:id="@+id/achieveName"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:layout_height="wrap_content"
android:layout_below="@+id/achieve_img"
android:layout_centerHorizontal="true"
android:clickable="true"

View File

@ -50,7 +50,7 @@ import io.rong.imlib.model.Message;
import io.rong.message.TextMessage;
/**
* 声网主播管理类
* 声网用户管理类
*/
public class SWAuManager extends BaseCacheManager {

View File

@ -25,6 +25,7 @@ import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils;
@ -946,27 +947,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
* 结束直播
*/
public void endLive() {
RCRTCEngine.getInstance().getDefaultVideoStream().stopCamera(new IRCRTCResultCallback() {
@Override
public void onSuccess() {
}
@Override
public void onFailed(RTCErrorCode errorCode) {
}
});
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
@Override
public void onSuccess() {
Log.i("ry", "退出成功");
}
@Override
public void onFailed(RTCErrorCode errorCode) {
Log.i("ry", "退出失败" + errorCode);
}
});
SWManager.get().exitChannelAll();
//请求关播的接口
LiveHttpUtil.stopLive(mStream, new HttpCallback() {
@Override

View File

@ -858,7 +858,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
.append(" ")
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
.append(" ")
.append(liveGiftModel.getNamingUserName());
.append(liveGiftModel.getNaming_user_gift_hall_rank_hide()==0?liveGiftModel.getNamingUserName():WordUtil.getNewString(R.string.mystery_man));
namingName.setText(namingNameText.toString());
} else {
namingLayout.setVisibility(View.GONE);
@ -934,6 +934,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
ToastUtil.show("显示");
namingLayout.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
StringBuffer namingNameText = new StringBuffer();
@ -949,7 +950,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
.append(liveGiftModel.getNamingLiveName())
.append(" ")
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
.append(liveGiftModel.getNamingUserName());
.append(liveGiftModel.getNaming_user_gift_hall_rank_hide()==0?liveGiftModel.getNamingUserName():WordUtil.getNewString(R.string.mystery_man));
namingName.setText(namingNameText.toString());
} else {
namingLayout.setVisibility(View.GONE);

View File

@ -288,7 +288,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
.setVoicePress(isAnchor)
.setUname(mToName)
.setAvatar(mAvatarUrl));*/
new com.yunbao.common.dialog.GiftWallDialog(mContext, mToUid + "",mToName, mToUid.equals(mLiveUid)).setFullWindows(false).showDialog();
new com.yunbao.common.dialog.GiftWallDialog(mContext, mToUid + "",mToName,mLiveUid, isAnchor).setFullWindows(false).showDialog();
dismiss();
}
});

View File

@ -122,7 +122,7 @@ public class SocketClient {
Log.i("tag", "1" + "礼物");
JSONObject map = received.getMsg().getJSONObject(0);
String ct="";
switch (map.getString("_method_")) {
case Constants.UP_USER_LIST:
mListener.onUpUserList(map.getJSONObject("ct"));
@ -131,17 +131,21 @@ public class SocketClient {
break;
case Constants.SOCKET_SYSTEM://系统消息
UserBean us = CommonAppConfig.getInstance().getUserBean();
ct=map.getString("ct");
if(map.containsKey("ct_en")&&!WordUtil.isNewZh()){
ct=map.getString("ct_en");
}
if (map.getString("uid") != null && map.getString("uid").equals(us.getId())) {
LiveAudienceActivity.is_fans = "1";
int num = LiveAudienceActivity.fansNum + 1;
LiveRoomViewHolder.setFansNum(num);
}
systemChatMessage(map.getString("ct"));
systemChatMessage(ct);
int action21 = map.getIntValue("action");
//主播離開
if (action21 == 13 && map.getString("ct").contains("離開")) {
if (action21 == 13 && ct.contains("離開")) {
LivePlayKsyViewHolder.leave.setVisibility(View.VISIBLE);
} else if (action21 == 13 && map.getString("ct").contains("回來")) {
} else if (action21 == 13 && ct.contains("回來")) {
LivePlayKsyViewHolder.leave.setVisibility(View.GONE);
}
break;
@ -150,7 +154,7 @@ public class SocketClient {
mListener.onKick(map.getString("touid"));
break;
case Constants.SOCKET_SHUT_UP://禁言
String ct = map.getString("ct");
ct = map.getString("ct");
systemChatMessage(ct);
mListener.onShutUp(map.getString("touid"), ct);
break;

View File

@ -200,7 +200,7 @@ public class SocketSwClient {
SocketReceiveBean received = JSON.parseObject(socketMsg, SocketReceiveBean.class);
JSONObject map = received.getMsg().getJSONObject(0);
String ct="";
switch (map.getString("_method_")) {
//用户连麦
case Constants.LIAN_MAI:
@ -248,7 +248,11 @@ public class SocketSwClient {
// LiveLinkMicPresenter.setHD(map.getString("ct"));
break;
case Constants.SOCKET_SYSTEM://系统消息
if (map.getString("ct").contains("甜蜜不停")) {
ct=map.getString("ct");
if(map.containsKey("ct_en")&&!WordUtil.isNewZh()){
ct=map.getString("ct_en");
}
if (ct.contains("甜蜜不停")) {
break;
}
UserBean us = CommonAppConfig.getInstance().getUserBean();
@ -256,27 +260,26 @@ public class SocketSwClient {
int num = LiveAudienceActivity.fansNum + 1;
LiveRoomViewHolder.setFansNum(num);
}
if (map.getString("ct").contains("堅決維護青少年群體精神文明健康") || map.getString("ct").contains("click to register if you like. pdlive conducts")) {
systemChatMessage(map.getString("ct"));
if (ct.contains("堅決維護青少年群體精神文明健康") ||ct.contains("click to register if you like. pdlive conducts")) {
systemChatMessage(ct);
} else {
if (!WordUtil.isNewZh() && map.getString("ct").contains("退出比賽") && map.getString("ct").contains("獲得勝利")) {
if (!WordUtil.isNewZh() && ct.contains("退出比賽") && ct.contains("獲得勝利")) {
String ctTmp = map.getString("ct");
ctTmp = ctTmp.replace("由於", "Due to").replace("退出比賽", "withdrawing from the competition").replace("獲得勝利", "won");
map.put("ct", ctTmp);
ct = ctTmp.replace("由於", "Due to").replace("退出比賽", "withdrawing from the competition").replace("獲得勝利", "won");
}
systemChatMessage2(map.getString("ct"));
systemChatMessage2(ct);
}
int action21 = map.getIntValue("action");
//主播離開
if (action21 == 13 && map.getString("ct").contains("離開")) {
if (action21 == 13 && ct.contains("離開")) {
if (LivePlayKsyViewHolder.leave != null) {
LivePlayKsyViewHolder.leave.setVisibility(View.VISIBLE);
}
if (LivePlaySwViewHolder.leave != null) {
LivePlaySwViewHolder.leave.setVisibility(View.VISIBLE);
}
} else if (action21 == 13 && map.getString("ct").contains("回來")) {
} else if (action21 == 13 && ct.contains("回來")) {
if (LivePlayKsyViewHolder.leave != null) {
LivePlayKsyViewHolder.leave.setVisibility(View.GONE);
}
@ -328,7 +331,7 @@ public class SocketSwClient {
mListener.onKick(map.getString("touid"));
break;
case Constants.SOCKET_SHUT_UP://禁言
String ct = map.getString("ct");
ct = map.getString("ct");
systemChatMessage2(ct);
mListener.onShutUp(map.getString("touid"), ct);
break;

View File

@ -30,6 +30,7 @@ import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.GiftCacheUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.MarqueeTextView;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
@ -100,8 +101,14 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
// } else {
giftName.setText(model.getName());
// }
naming_name.setText(model.getNamingUserName());
ImgLoader.display(mContext,model.getNamingUserAvatar(),avatar);
if (model.getNaming_user_gift_hall_rank_hide() == 1) {
avatar.setImageResource(com.yunbao.common.R.mipmap.hide);
naming_name.setText(WordUtil.getNewString(com.yunbao.common.R.string.mystery_man));
} else {
ImgLoader.display(mContext, model.getNamingUserAvatar(), avatar);
naming_name.setText(model.getNamingUserName());
}
//特殊礼物红包
if (model.getType() == 9999999) {
mPayIco.setVisibility(View.GONE);
@ -126,9 +133,9 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
} else {
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
}
if(model.isChecked()&& !StringUtil.isEmpty(model.getNamingUserName())){
if (model.isChecked() && !StringUtil.isEmpty(model.getNamingUserName())) {
namingLayout.setVisibility(View.VISIBLE);
}else{
} else {
namingLayout.setVisibility(View.GONE);
}

View File

@ -3722,7 +3722,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override
public void onViewClicks() {
//Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.GIFT_WALL).setUid(mLiveUid).setVoicePress(true).setAvatar(mAvatarUrl).setUname(mAnchorName));
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid, mAnchorName, true).setFullWindows(false).showDialog();
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid, mAnchorName, mLiveUid,true).setFullWindows(false).showDialog();
}
});
}

View File

@ -11,11 +11,13 @@ import android.content.pm.ResolveInfo;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
@ -27,6 +29,8 @@ import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.alibaba.android.arouter.facade.annotation.Route;
@ -55,6 +59,7 @@ import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
@ -82,8 +87,10 @@ public class ZhuangBanActivity extends AbsActivity {
private View v_spacing;
private LinearLayout lt_title;
private List<String> HTTP_SCHEMES = Arrays.asList("http", "https");
@Override
public void setStatusBar() {
super.setStatusBar();
// getWindow().setStatusBarColor(Color.parseColor("#FFFFFF"));
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
@ -94,6 +101,12 @@ public class ZhuangBanActivity extends AbsActivity {
return R.layout.activity_zhuang_ban;
}
@Override
protected void create() {
super.create();
}
@Override
protected void main() {
Bus.getOn(this);
@ -154,6 +167,7 @@ public class ZhuangBanActivity extends AbsActivity {
}
int height = view.getMeasuredHeight();
Log.e("网页高度", height + "");
view.loadUrl("javascript:setTop(" + DpUtil.dp2px(15) + ")");
}
@Override
@ -439,37 +453,38 @@ public class ZhuangBanActivity extends AbsActivity {
});
}
/**
* Parse the url and open it by system function.
* case 1: deal "intent://xxxx" url.
* case 2: deal custom scheme. url
* case 1: deal "intent://xxxx" url.
* case 2: deal custom scheme. url
*
* @param view: WebView
* @param url
* @return
*/
private boolean shouldOverrideUrlLoadingInner(WebView view, String url) {
if(!TextUtils.isEmpty(url)) {
if (!TextUtils.isEmpty(url)) {
Uri uri = Uri.parse(url);
if(uri != null) {
if (uri != null) {
if ("intent".equals(uri.getScheme())) {
try {
Intent intent = Intent.parseUri(uri.toString(), Intent.URI_INTENT_SCHEME);
if(intent != null) {
if (intent != null) {
PackageManager pm = mContext.getPackageManager();
ResolveInfo info = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
if(info != null) {
if (info != null) {
mContext.startActivity(Intent.parseUri(uri.toString(), Intent.URI_INTENT_SCHEME));
return true;
}
else {
} else {
String fallbackUrl = intent.getStringExtra("browser_fallback_url");
if (!TextUtils.isEmpty(fallbackUrl)) {
if(fallbackUrl.startsWith("market://"))
if (fallbackUrl.startsWith("market://"))
startAppMarketWithUrl(mContext, fallbackUrl, false);
else
view.loadUrl(fallbackUrl);
return true;
}else{
} else {
mContext.startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
}
@ -485,6 +500,7 @@ public class ZhuangBanActivity extends AbsActivity {
}
return false;
}
public static void startAppMarketWithUrl(Activity context, String url, boolean forceUseGoogle) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
@ -495,9 +511,11 @@ public class ZhuangBanActivity extends AbsActivity {
} catch (Exception e) {
try {
startUrl(context, url, true);
} catch (Exception e1) {}
} catch (Exception e1) {
}
}
}
public static boolean hasActivity(Context context, Intent intent, String packageName) {
PackageManager pm = context.getPackageManager();
List<ResolveInfo> appList = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
@ -507,11 +525,12 @@ public class ZhuangBanActivity extends AbsActivity {
}
return false;
}
public static void startUrl(Context context, String url, boolean isNewTask) {
if(context != null && !TextUtils.isEmpty(url)) {
if (context != null && !TextUtils.isEmpty(url)) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
if(isNewTask) {
if (isNewTask) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
context.startActivity(intent);

View File

@ -69,7 +69,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
@Override
public void run() {
new GiftWallDialog(mContext, IMLoginManager.get(mContext).getUserInfo().getId() + "",
IMLoginManager.get(mContext).getUserInfo().getUserNicename()
IMLoginManager.get(mContext).getUserInfo().getUserNicename(),null
, false).setFullWindows(true).showDialog();
}
});

View File

@ -23,6 +23,11 @@ public class TestWebViewClient extends WebViewClient {
private List<String> HTTP_SCHEMES = Arrays.asList("http", "https");
public TestWebViewClient(Activity context, WebView webView) {
this.mContext = context;
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {