This commit is contained in:
zlzw 2024-05-08 11:19:51 +08:00
parent dc652050ac
commit b2da6e4ea1
86 changed files with 1932 additions and 110 deletions

View File

@ -268,7 +268,6 @@ repositories {
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
//implementation platform('com.google.firebase:firebase-bom:30.5.0')
//implementation 'com.google.firebase:firebase-crashlytics'

View File

@ -278,6 +278,18 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keep class tech.sud.mgp.hello.ui.main.settings.model.** {*;}
-keep class tech.sud.mgp.hello.ui.main.nft.model.** {*;}
-keep class tech.sud.mgp.hello.common.event.model.** {*;}
-keep class tech.sud.mgp.**{*;}
-keep class bitter.jnibridge.** { *; }
-keep class com.google.androidgamesdk.** { *; }
-keep class com.unity3d.** { *; }
-keep class do.do.do.** { *; }
-keep class do.if.do.** { *; }
-keep class for.do.** { *; }
-keep class if.do.do.do.** { *; }
-keep class org.fmod.** { *; }
-keep class tech.sud.** { *; }
-keep class tech.unity3d.** { *; }
-keep class com.yunbao.common.sud.** {*;}

View File

@ -211,9 +211,7 @@ dependencies {
//
api 'com.makeramen:roundedimageview:2.3.0'
// SDK
api 'com.umeng.umsdk:common:9.6.3'//
api 'com.umeng.umsdk:asms:1.8.0'//
api 'com.umeng.umsdk:uyumao:1.1.2'
api(name: 'umeng-common-9.6.8+000', ext: 'aar')
//使使common需搭配v9.6.3asms需搭配v1.7.0
// SudMGP SDK
api 'tech.sud.mgp:SudMGP:1.3.3.1158'

View File

@ -274,6 +274,8 @@ public class Constants {
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
public static final String SOCKET_LIVE_ANCHOR_PK_DIALOG="GuildCompetitionNotice";//公会赛弹窗
//视频举报获取位置
public static int xIndex = 0;
public static int yindex = 0;

View File

@ -39,7 +39,7 @@ public class HtmlConfig {
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
//在线商城
public static final String SHOP = CommonAppConfig.HOST + "/h5/shoppingMall.html";
public static final String SHOP = CommonAppConfig.HOST + "/h5/shop/index.html";
//社区
public static final String ENCOURAGE = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ";

View File

@ -6,6 +6,7 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
@ -30,7 +31,6 @@ 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;
@ -92,7 +92,8 @@ public abstract class AbsActivity extends AppCompatActivity {
protected void main() {
}
protected void create(){
protected void create() {
}
@ -107,6 +108,17 @@ public abstract class AbsActivity extends AppCompatActivity {
}
}
protected void setTitleBold(boolean bold) {
TextView titleView = (TextView) findViewById(R.id.titleView);
if (titleView != null) {
if (bold) {
titleView.setTypeface(Typeface.DEFAULT_BOLD);
} else {
titleView.setTypeface(Typeface.DEFAULT);
}
}
}
public void backClick(View v) {
if (v.getId() == R.id.btn_back) {
onBackPressed();
@ -181,14 +193,14 @@ public abstract class AbsActivity extends AppCompatActivity {
//友盟统计
// MobclickAgent.onResume(this);
MobclickAgent.onPageStart(this.mTag);
Log.e("MobclickAgent","MobclickAgent:_onResume_"+this.mTag);
Log.e("MobclickAgent", "MobclickAgent:_onResume_" + this.mTag);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPageEnd(this.mTag);
Log.e("MobclickAgent","MobclickAgent:_onPause_"+this.mTag);
Log.e("MobclickAgent", "MobclickAgent:_onPause_" + this.mTag);
if (mLifeCycleListeners != null) {
for (LifeCycleListener listener : mLifeCycleListeners) {
listener.onPause();
@ -382,11 +394,12 @@ public abstract class AbsActivity extends AppCompatActivity {
break;
}
}
public boolean isKefu(String url){
if(url.contains("kefu")){
public boolean isKefu(String url) {
if (url.contains("kefu")) {
return true;
}
if(url.contains("https://newkf.yaoulive.com/")){
if (url.contains("https://newkf.yaoulive.com/")) {
return true;
}
return url.startsWith("https://kefu.yaoulive.com");

View File

@ -29,6 +29,7 @@ import com.lxj.xpopup.XPopup;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.R;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
@ -100,7 +101,6 @@ public class WebViewActivity extends AbsActivity {
ft_title = (FrameLayout) findViewById(R.id.ft_title);
v_spacing = (View) findViewById(R.id.v_spacing);
mWebView = findViewById(R.id.webView);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
// mWebView.setLayoutParams(params);
@ -136,11 +136,17 @@ public class WebViewActivity extends AbsActivity {
if (url.contains("for")) {
mWebView.loadUrl("javascript:goAnchorTab()");
}
if(url.startsWith(HtmlConfig.SHOP)){
//商店页不做动态变换
return;
}
//真实屏幕高度-(ft_title的高度+导航栏高度)
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
if (!navigationGestureEnabled(mContext)) {
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
// view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
}
}
@ -194,6 +200,8 @@ public class WebViewActivity extends AbsActivity {
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setUseWideViewPort(true); // 关键点
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
mWebView.setHorizontalScrollBarEnabled(false);
mWebView.setVerticalScrollBarEnabled(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
@ -213,6 +221,9 @@ public class WebViewActivity extends AbsActivity {
ft_title.setVisibility(View.VISIBLE);
v_spacing.setVisibility(View.GONE);
}
if(!StringUtil.isEmpty(url)&&url.startsWith(HtmlConfig.SHOP)){
ft_title.setVisibility(View.GONE);
}
}

View File

@ -2,7 +2,7 @@ package com.yunbao.common.adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.TextureView;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@ -12,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.DebugViewHolder> {
@ -24,6 +23,7 @@ public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.
}
public void setParamMap(TreeMap<String, String> paramMap) {
Log.i("debug弹窗", "setParamMap: 添加值到view " + paramMap.size());
this.paramMap = paramMap;
notifyDataSetChanged();
}
@ -37,11 +37,13 @@ public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.
@Override
public void onBindViewHolder(@NonNull DebugViewHolder holder, int position) {
List<String> list = new ArrayList<>(paramMap.keySet());
Log.i("debug弹窗", "onBindViewHolder: 添加值到view " + list.size() + "|" + paramMap.size());
holder.setData(list.get(position), paramMap.get(list.get(position)));
}
@Override
public int getItemCount() {
Log.i("debug弹窗", "getItemCount: " + paramMap.size());
return paramMap.size();
}
@ -52,6 +54,7 @@ public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.
}
public void setData(String tag, String msg) {
Log.i("debug弹窗", "setData: 添加值到view " + tag + "|" + msg);
((TextView) itemView).setText(tag + ":" + msg);
((TextView) itemView).setTextColor(Color.BLACK);
}

View File

@ -18,10 +18,14 @@ import com.yunbao.common.views.InteractionGamesChildViewHolder;
import java.util.ArrayList;
import java.util.List;
/**
* 侧边栏游戏列表适配器改游戏列表数量在这里改
*/
public class InteractionGamesAdapter extends RecyclerView.Adapter {
private Context mContext;
private boolean rigts;
private List<CustomSidebarChildModel> child = new ArrayList<>();
private List<CustomSidebarChildModel> srcChild = new ArrayList<>();
public InteractionGamesAdapter(Context mContext, boolean rigts) {
this.mContext = mContext;
@ -46,7 +50,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
long activityID = TextUtils.isEmpty(model.getSrc()) ? 0 : Long.parseLong(model.getSrc());
if (activityID != 0) {
Bus.get().post(new CustomDrawerPopupEvent()
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(child));
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(srcChild));
}
@ -61,6 +65,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
public void updateData(List<CustomSidebarChildModel> mChild) {
child.clear();
srcChild.clear();
if (mChild.size() > 8) {
for (int i = 0; i < 8; i++) {
child.add(mChild.get(i));
@ -68,6 +73,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
} else {
child.addAll(mChild);
}
srcChild.addAll(mChild);
notifyDataSetChanged();
}

View File

@ -67,13 +67,14 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
public void updateData(List<CustomSidebarChildModel> mChild) {
child.clear();
if (mChild.size() > 8) {
/* if (mChild.size() > 8) {
for (int i = 0; i < 8; i++) {
child.add(mChild.get(i));
}
} else {
child.addAll(mChild);
}
}*/
child.addAll(mChild);
notifyDataSetChanged();
}

View File

@ -1,6 +1,9 @@
package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
/**
* 机器人助手IM消息
@ -21,6 +24,9 @@ public class AiAutomaticSpeechModel extends BaseModel {
//标签图片
@SerializedName("icon")
private String icon;
@SerializedName("icon_en")
@JSONField(name = "icon_en")
private String iconEn;
//气泡背景
@SerializedName("system_bubble")
private String systemBubble;
@ -35,7 +41,7 @@ public class AiAutomaticSpeechModel extends BaseModel {
}
public String getAiName() {
return aiName+":";
return aiName + ":";
}
public AiAutomaticSpeechModel setAiName(String aiName) {
@ -43,6 +49,15 @@ public class AiAutomaticSpeechModel extends BaseModel {
return this;
}
public String getIconEn() {
return iconEn;
}
public AiAutomaticSpeechModel setIconEn(String iconEn) {
this.iconEn = iconEn;
return this;
}
public String getContent() {
return content;
}
@ -62,6 +77,9 @@ public class AiAutomaticSpeechModel extends BaseModel {
}
public String getIcon() {
if (!WordUtil.isNewZh() && !StringUtil.isEmpty(iconEn)) {
return iconEn;
}
return icon;
}

View File

@ -7,12 +7,21 @@ import java.util.Map;
public class LiveBattlePassRewardsBean extends BaseModel{
private int level;
private int is_received;
private List<BattlePassType> live_battle_pass_type;
private Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards;
public LiveBattlePassRewardsBean() {
}
public int getIs_received() {
return is_received;
}
public void setIs_received(int is_received) {
this.is_received = is_received;
}
public int getLevel() {
return level;
}

View File

@ -49,6 +49,16 @@ public class RedPacketInfoModel extends BaseModel {
//超级红包ID
@SerializedName("super_jackpot_id")
private String superJackpotId;
@SerializedName("red_packet_type")
private int redPacketType;// 1.普通红包 2.特殊红包
public int getRedPacketType() {
return redPacketType;
}
public void setRedPacketType(int redPacketType) {
this.redPacketType = redPacketType;
}
public String getSuperJackpotId() {
return superJackpotId;

View File

@ -934,11 +934,20 @@ public class UserBean implements Parcelable {
private String medal;
private String bubble;
private String medal_new;
private String medal_new_en;
public String getMedal_new() {
return medal_new;
}
public String getMedal_new_en() {
return medal_new_en;
}
public void setMedal_new_en(String medal_new_en) {
this.medal_new_en = medal_new_en;
}
public void setMedal_new(String medal_new) {
this.medal_new = medal_new;
}

View File

@ -45,6 +45,9 @@ import java.util.List;
import java.util.Locale;
import java.util.Random;
/**
* 半屏创建游戏房间
*/
public class CreateSudGamePopup extends BottomPopupView {
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
private TextView createGameType, selectCurrencyType;
@ -312,20 +315,50 @@ public class CreateSudGamePopup extends BottomPopupView {
animator.setDuration(animDuration);
animator.setInterpolator(new LinearInterpolator());
animator.start();
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
builder.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)
.popupPosition(PopupPosition.Bottom)
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
closeAnimSudGameListEvent();
}
})
)
.show();
if (hasMoveUp) {
InputMethodManager imm = getSystemService(getContext(), InputMethodManager.class);
if (imm != null) {
imm.hideSoftInputFromWindow(roomName.getWindowToken(), 0);
imm.hideSoftInputFromWindow(gameSill.getWindowToken(), 0);
}
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
builder.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)
.popupPosition(PopupPosition.Bottom)
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
closeAnimSudGameListEvent();
}
})
)
.show();
}
}, 500);
}else {
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
builder.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)
.popupPosition(PopupPosition.Bottom)
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
closeAnimSudGameListEvent();
}
})
)
.show();
}
}
});
}

View File

@ -3,6 +3,10 @@ package com.yunbao.common.dialog;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -11,10 +15,12 @@ import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.enums.ShowPattern;
import com.lzf.easyfloat.interfaces.OnPermissionResult;
import com.lzf.easyfloat.permission.PermissionUtils;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.adapter.DebugDialogAdapter;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.ToastUtil;
import java.util.Timer;
import java.util.TimerTask;
import java.util.TreeMap;
@ -25,9 +31,9 @@ public class DebugDialog {
private static DebugDialog debugDialog;
Context mContext;
public static DebugDialog getInstance(Activity mainActivity) {
public static DebugDialog getInstance() {
if (debugDialog == null) {
debugDialog = new DebugDialog(mainActivity);
debugDialog = new DebugDialog();
}
return debugDialog;
}
@ -38,14 +44,25 @@ public class DebugDialog {
}
public void setParams(String tag, String msg) {
Log.i("debug弹窗", "setParams: "+tag+"|"+msg);
params.put(tag, msg);
if (adapter != null)
adapter.setParamMap(params);
}
private DebugDialog(Context mContext) {
this.mContext = mContext;
params = new TreeMap<>();
private DebugDialog() {
if(params==null) {
Log.i("debug弹窗", "DebugDialog: 初始化参数");
params = new TreeMap<>();
}
init();
}
private void init(){
this.mContext = AppManager.getInstance().getMainActivity();
if (mContext == null) {
startWaitMainActivity();
return;
}
if (PermissionUtils.checkPermission(mContext)) {
createView();
} else {
@ -59,18 +76,44 @@ public class DebugDialog {
}
});
}
// createView();
}
private void startWaitMainActivity() {
new Timer().schedule(new TimerTask() {
@Override
public void run() {
Log.i("debug弹窗", "run: "+AppManager.getInstance().getMainActivity());
if (AppManager.getInstance().getMainActivity() != null) {
init();
cancel();
}
}
}, 0,1000);
}
protected void createView() {
recyclerView = new RecyclerView(mContext);
adapter = new DebugDialogAdapter(mContext);
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
recyclerView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT));
recyclerView.setAdapter(adapter);
recyclerView.setBackgroundColor(Color.WHITE);
EasyFloat.with(mContext)
.setTag("debug")
.setShowPattern(ShowPattern.ALL_TIME)
.setShowPattern(ShowPattern.FOREGROUND)
.setLayout(recyclerView)
.show();
if(!params.isEmpty()){
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
adapter.setParamMap(params);
}
},1000);
Log.i("debug弹窗", "createView: 有值");
}
Log.i("debug弹窗", "createView: 创建");
}
}

View File

@ -21,6 +21,7 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.List;
//游戏弹窗
public class LiveNewRolePopup extends BottomPopupView {
private boolean showRed = false;

View File

@ -19,6 +19,7 @@ import com.yunbao.common.event.LiveSudGameHistoryEvent;
import com.yunbao.common.event.RoomHolderTypeEvent;
import com.yunbao.common.event.SudGameListEvent;
import com.yunbao.common.event.SudGameListSillEvent;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@ -87,6 +88,11 @@ public class SudGameListSelectPopup extends AttachPopupView {
if (mType == 0 || mType == 4) {
topSelect.setText(getContext().getString(R.string.interactive_game_room_all));
for (int i = 0; i < customSidebarChildModels.size(); i++) {
/* if (!IMLoginManager.get(getContext()).getUserInfo().anchorUserType()) {
if ("1490944230389182466".equals(customSidebarChildModels.get(i).getSrc())) {//友尽闯关
continue;
}
}*/
selectString.add(customSidebarChildModels.get(i).getTitle());
if (TextUtils.equals(String.valueOf(interactionID), customSidebarChildModels.get(i).getSrc())) {
index = i;

View File

@ -115,6 +115,36 @@ public class SendBlindGiftEvent extends BaseModel {
private String liveGiftNotify;
@SerializedName("userNiceName")
private String userNiceName;
@SerializedName("special_gift")
private int specialGift;
@SerializedName("special_gift_name")
private String specialGiftName;
@SerializedName("special_gift_name_en")
private String specialGiftNameEn;
public int getSpecialGift() {
return specialGift;
}
public void setSpecialGift(int specialGift) {
this.specialGift = specialGift;
}
public String getSpecialGiftName() {
return specialGiftName;
}
public void setSpecialGiftName(String specialGiftName) {
this.specialGiftName = specialGiftName;
}
public String getSpecialGiftNameEn() {
return specialGiftNameEn;
}
public void setSpecialGiftNameEn(String specialGiftNameEn) {
this.specialGiftNameEn = specialGiftNameEn;
}
public String getUserNiceName() {
return userNiceName;

View File

@ -0,0 +1,44 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.HttpCallbackModel;
public class SubGameEvent {
int type;
HttpCallbackModel model;
String dataJson;
public SubGameEvent(int type, HttpCallbackModel model, String dataJson) {
this.type = type;
this.model = model;
this.dataJson = dataJson;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public HttpCallbackModel getModel() {
return model;
}
public void setModel(HttpCallbackModel model) {
this.model = model;
}
public String getDataJson() {
return dataJson;
}
@Override
public String toString() {
return "SubGameEvent{" +
"type=" + type +
", model=" + model +
", dataJson='" + dataJson + '\'' +
'}';
}
}

View File

@ -43,7 +43,6 @@ import java.util.Locale;
*/
public class CommonHttpUtil {
public static final String GET_UPLOAD_QI_NIU_TOKEN = "getUploadQiNiuToken";
/**
@ -643,7 +642,16 @@ public class CommonHttpUtil {
.params("ext", isImg ? ".jpeg" : ".mp4")
.execute(callback);
}
/**
* 上传文件 获取七牛云token的接口
*/
public static void getUploadQiNiuTokenNew(HttpCallback callback, boolean isImg) {
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken2", "Pdluserhome.getQiNiuToken2")
.params("uid", CommonAppConfig.getInstance().getUid())
.params("token", CommonAppConfig.getInstance().getToken())
.params("ext", isImg ? ".jpeg" : ".mp4")
.execute(callback);
}
/**
* 修改用户背景墙
*/

View File

@ -129,7 +129,7 @@ public interface PDLiveApi {
@Field("uuid_Device") String uuidDevice,
@Field("pushid") String pushid,
@Field("lastlogindevice") String lastlogindevice,
@Field("langue")String langue
@Field("langue") String langue
);
/**
@ -1329,11 +1329,43 @@ public interface PDLiveApi {
@GET("/api/public/?service=Guard.participateMoneyLong")
Observable<ResponseModel<String>> participateMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
@GET("/api/public/?service=Guard.endSendMoneyLong")
Observable<ResponseModel<SendMoneyLongModel>> endSendMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
@GET("/api/public/?service=Guard.checkUpgrades")
Observable<ResponseModel<CheckUpgradesModel>> checkUpgrades(@Query("liveuid") String liveUid);
@GET("/api/public/?service=Guard.getRewards")
Observable<ResponseModel<Object>> guardGetRewards(@Query("guard_level") String guardLevel,@Query("liveuid") String liveUid);
Observable<ResponseModel<Object>> guardGetRewards(@Query("guard_level") String guardLevel, @Query("liveuid") String liveUid);
@GET("/api/public/?service=User.userFeedback")
Observable<ResponseModel<List<BaseModel>>> feedback(@Query("problem_description") String content, @Query("problem_image") String images, @Query("contact_information") String ci);
@GET("/api/public/?service=User.userFeedbackRestrict")
Observable<ResponseModel<List<BaseModel>>> checkFeedback();
/**
*
* @param roomId 房间ID
* @param cmd 事件名称 生命值:addHeart 自动跳:hit
* @param value 价格
* @param gameId 游戏ID
* @param fromUid 付费用户uid
* @param toUid 目标用户uid
* @param payload 附加值
* @return
*/
@GET("/api/public/?service=Sudgameserver.createOrder")
Observable<ResponseModel<List<BaseModel>>> createGameOrder(
@Query("room_id")String roomId,
@Query("cmd")String cmd,
@Query("value")String value,
@Query("mg_id")String gameId,
@Query("from_uid")String fromUid,
@Query("to_uid")String toUid,
@Query("payload")String payload
);
}

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
@ -3159,6 +3160,97 @@ public class LiveNetManager {
}
public void feedback(
String content,
JSONArray images,
String ci
, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.feedback(content, images.toString(), ci)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<List<BaseModel>> responseModel) {
if (callback != null) {
HttpCallbackModel model = new HttpCallbackModel();
model.setCode(responseModel.getData().getCode());
model.setMsg(responseModel.getData().getMsg());
callback.onSuccess(model);
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
}
}
}).isDisposed();
}
public void checkFeedback(
HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.checkFeedback()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<List<BaseModel>> responseModel) {
if (callback != null) {
HttpCallbackModel model = new HttpCallbackModel();
model.setCode(responseModel.getData().getCode());
model.setMsg(responseModel.getData().getMsg());
callback.onSuccess(model);
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
}
}
}).isDisposed();
}
public void createGameOrder(
String roomId,
String cmd,
String value,
String gameId,
String fromUid,
String toUid,
String roundId,
String payload
, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.createGameOrder(roomId, cmd, value, gameId, fromUid, toUid,payload)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<List<BaseModel>> responseModel) {
if (callback != null) {
HttpCallbackModel model = new HttpCallbackModel();
model.setCode(responseModel.getData().getCode());
model.setMsg(responseModel.getData().getMsg());
callback.onSuccess(model);
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
}
}
}).isDisposed();
}
public void guardGetRewards(String guardLevel, String liveUid, HttpCallback<Object> callback) {
API.get().pdLiveApi(mContext)
.guardGetRewards("0", liveUid)

View File

@ -1,10 +1,17 @@
package com.yunbao.common.interfaces;
import android.content.Context;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.bean.AvatarBean;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.upload.UploadBean;
import com.yunbao.common.upload.UploadCallback;
import com.yunbao.common.upload.UploadQnImpl;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Created by cxf on 2018/9/29.
@ -35,4 +42,20 @@ public abstract class ImageResultCallback {
}
});
}
public void onSuccessToQiNiuUrl(Context mContext, File file, OnItemClickListener<String> listener) {
UploadQnImpl mUploadStrategy = new UploadQnImpl(mContext);
List<UploadBean> beans = new ArrayList<>();
beans.add(new UploadBean(file, UploadBean.IMG));
mUploadStrategy.upload(beans, true, new UploadCallback() {
@Override
public void onFinish(List<UploadBean> list, boolean success) {
if (success) {
listener.onItemClick("https://downs.yaoulive.com/" + list.get(0).getRemoteAccessUrl(), 0);
} else {
listener.onItemClick(null, -1);
}
}
}, true);
}
}

View File

@ -9,6 +9,7 @@ import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Toast;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.sud.decorator.SudFSMMGCache;
import com.yunbao.common.sud.decorator.SudFSMMGDecorator;
import com.yunbao.common.sud.decorator.SudFSMMGListener;
@ -16,7 +17,10 @@ import com.yunbao.common.sud.decorator.SudFSTAPPDecorator;
import com.yunbao.common.sud.model.GameConfigModel;
import com.yunbao.common.sud.model.GameViewInfoModel;
import com.yunbao.common.sud.state.MGStateResponse;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.SudJsonUtils;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import tech.sud.mgp.core.ISudFSMStateHandle;
import tech.sud.mgp.core.ISudFSTAPP;
@ -142,7 +146,10 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
// 给装饰类设置回调
sudFSMMGDecorator.setSudFSMMGListener(this);
sudFSMMGDecorator.setGameId(gameId);
sudFSMMGDecorator.setRoomId(gameRoomId);
sudFSMMGDecorator.setUserId(getUserId());
Log.i("游戏回调", code + " " + gameId + " " + gameRoomId + " ");
// 调用游戏sdk加载游戏
ISudFSTAPP iSudFSTAPP = SudMGP.loadMG(activity, getUserId(), gameRoomId, code, gameId, getLanguageCode(), sudFSMMGDecorator);
@ -282,6 +289,29 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
public void onGameLog(String str) {
SudFSMMGListener.super.onGameLog(str);
Log.e("onGameStarted", "游戏日志:" + str);
/*if (!StringUtil.isEmpty()) {
try {
JSONObject json = JSONObject.parseObject(str);
if ("error".equals(json.getString("level"))) {
String msg = json.getString("msg");
JSONObject error = JSONObject.parseObject(msg);
if (error.containsKey("msg")) {
int resultCode = error.getInteger("resultCode");
switch (resultCode) {
case 100503:
ToastUtil.show(WordUtil.isNewZh()?"有玩家未點擊準備":"There are players who haven't clicked \"Ready\" yet.");
break;
case 100504:
ToastUtil.show(WordUtil.isNewZh()?"小於遊戲最小開始人數":"The number of players is less than the minimum required to start the game.");
break;
}
}
}
} catch (Exception ignore) {
}
}*/
}
/**

View File

@ -59,7 +59,7 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
/**
* 游戏的语言代码
*/
public String languageCode = "zh-CN";
public String languageCode = "zh-TW";
public final MutableLiveData<View> gameViewLiveData = new MutableLiveData<>(); // 游戏View回调
@ -69,7 +69,7 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
@Override
protected void getCode(Activity activity, String userId, String appId, GameGetCodeListener listener) {
if (IMLoginManager.get(activity).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
languageCode = "zh-CN";
languageCode = "zh-TW";
}else {
languageCode = "en-US";
}

View File

@ -23,6 +23,10 @@ import tech.sud.mgp.core.ISudFSMStateHandle;
*/
public class SudFSMMGDecorator implements ISudFSMMG {
private static final String TAG = "游戏回调";
private long gameId;
private String gameRoomId;
private String userId;
// 回调
private SudFSMMGListener sudFSMMGListener;
@ -227,10 +231,10 @@ public class SudFSMMGDecorator implements ISudFSMMG {
}
break;
case SudMGPMGState.MG_COMMON_GAME_STATE: // 10. 游戏状态
Log.e("onGameStateChange", "mg_common_game_state:::::" + "dataJson:::::"+dataJson);
Log.e("onGameStateChange", "mg_common_game_state:::::" + "dataJson:::::" + dataJson);
SudMGPMGState.MGCommonGameState mgCommonGameState = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonGameState.class);
sudFSMMGCache.onGameMGCommonGameState(mgCommonGameState);
if (mgCommonGameState.gameState==2){
if (mgCommonGameState.gameState == 2) {
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_GAME_STATE));
}
if (listener == null) {
@ -354,6 +358,14 @@ public class SudFSMMGDecorator implements ISudFSMMG {
break;
case SudMGPMGState.MG_COMMON_GAME_CREATE_ORDER: // 25. 创建订单
SudMGPMGState.MGCommonGameCreateOrder mgCommonGameCreateOrder = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonGameCreateOrder.class);
if (mgCommonGameCreateOrder != null) {
mgCommonGameCreateOrder.gameId = gameId;
mgCommonGameCreateOrder.gameRoomId = gameRoomId;
mgCommonGameCreateOrder.userId = userId;
mgCommonGameCreateOrder.dataJson = dataJson;
}
Log.i(TAG, "onGameStateChange: " + dataJson);
if (listener == null) {
ISudFSMStateHandleUtils.handleSuccess(handle);
} else {
@ -1021,4 +1033,15 @@ public class SudFSMMGDecorator implements ISudFSMMG {
return sudFSMMGCache;
}
public void setGameId(long gameId) {
this.gameId = gameId;
}
public void setRoomId(String gameRoomId) {
this.gameRoomId = gameRoomId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}

View File

@ -5,6 +5,7 @@
package com.yunbao.common.sud.decorator;
import com.yunbao.common.sud.decorator.game.JumpEvent;
import com.yunbao.common.sud.state.SudMGPMGState;
import com.yunbao.common.utils.ISudFSMStateHandleUtils;
@ -271,7 +272,13 @@ public interface SudFSMMGListener {
* mg_common_game_create_order
*/
default void onGameMGCommonGameCreateOrder(ISudFSMStateHandle handle, SudMGPMGState.MGCommonGameCreateOrder model) {
ISudFSMStateHandleUtils.handleSuccess(handle);
if ("addHeart".equals(model.cmd)) {
JumpEvent.addHeart(model);
} else if ("hit".equals(model.cmd)) {
JumpEvent.hit(model);
} else {
ISudFSMStateHandleUtils.handleSuccess(handle);
}
}
/**

View File

@ -0,0 +1,55 @@
package com.yunbao.common.sud.decorator.game;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.event.SubGameEvent;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.sud.state.SudMGPMGState;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
public class JumpEvent {
private static long clickTimer = 0;
public static void addHeart(SudMGPMGState.MGCommonGameCreateOrder order) {
createOrder(order);
}
public static void hit(SudMGPMGState.MGCommonGameCreateOrder order) {
createOrder(order);
}
private synchronized static void createOrder(SudMGPMGState.MGCommonGameCreateOrder order) {
if (System.currentTimeMillis() - clickTimer < 500) {
//TODO 防止重复点击
HttpCallbackModel _data=new HttpCallbackModel(1001,"");
Bus.get().post(new SubGameEvent(0, _data,order.dataJson));
return;
}
clickTimer = System.currentTimeMillis();
LiveNetManager.get(AppManager.getInstance().getLastActivity())
.createGameOrder(order.gameRoomId,
order.cmd,
order.value + "",
order.gameId + "",
order.fromUid,
order.toUid,
order.gameRoomId,
order.payload,
new HttpCallback<HttpCallbackModel>() {
@Override
public void onSuccess(HttpCallbackModel data) {
if (data.getCode() != 0) {
ToastUtil.show(data.getMsg());
Bus.get().post(new SubGameEvent(0, data,order.dataJson));
}
}
@Override
public void onError(String error) {
}
});
}
}

View File

@ -496,6 +496,11 @@ public class SudMGPMGState implements Serializable {
public String toUid; // 目标用户uid
public long value; // 所属的游戏价值
public String payload; // 扩展数据 json 字符串, 特殊可选
public long gameId;
public String gameRoomId;
public String userId;
public String dataJson;
}
/**

View File

@ -3,14 +3,12 @@ package com.yunbao.common.upload;
import android.content.Context;
import android.text.TextUtils;
import com.alibaba.fastjson.JSON;
import com.qiniu.android.common.ServiceAddress;
import com.qiniu.android.common.Zone;
import com.qiniu.android.http.ResponseInfo;
import com.qiniu.android.storage.Configuration;
import com.qiniu.android.storage.UpCompletionHandler;
import com.qiniu.android.storage.UploadManager;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.L;
@ -23,8 +21,6 @@ import java.io.File;
import java.util.List;
import top.zibin.luban.Luban;
import top.zibin.luban.OnCompressListener;
import top.zibin.luban.OnRenameListener;
/**
* Created by cxf on 2019/4/16.
@ -131,7 +127,7 @@ public class UploadQnImpl implements UploadStrategy {
}
};
}
CommonHttpUtil.getUploadQiNiuToken(mGetUploadTokenCallback, isImg);
CommonHttpUtil.getUploadQiNiuTokenNew(mGetUploadTokenCallback, isImg);
}
@Override

View File

@ -11,6 +11,7 @@ public class AppManager {
private static Stack<Activity> activityStack;
public AppManager() {
activityStack=new Stack<>();
}
/**

View File

@ -358,6 +358,8 @@ public class DialogUitl {
private boolean mCancelable;
private boolean mBackgroundDimEnabled;//显示区域以外是否使用黑色半透明背景
private boolean mInput;//是否是输入框的
private boolean isShowCancelButton=true;
private boolean isSHowConfirmButton=true;
private String mHint;
private int mInputType;
private int mLength;
@ -454,6 +456,16 @@ public class DialogUitl {
return this;
}
public Builder setShowCancelButton(boolean showCancelButton) {
isShowCancelButton = showCancelButton;
return this;
}
public Builder setShowConfirmButton(boolean showConfirmButton) {
isSHowConfirmButton = showConfirmButton;
return this;
}
public Dialog build() {
final Dialog dialog = new Dialog(mContext, mBackgroundDimEnabled ? R.style.dialog : R.style.dialog2);
if (mView != 0) {
@ -493,10 +505,22 @@ public class DialogUitl {
TextView btnConfirm = (TextView) dialog.findViewById(R.id.btn_confirm);
if (!TextUtils.isEmpty(mConfirmString)) {
btnConfirm.setText(mConfirmString);
btnConfirm.setVisibility(View.VISIBLE);
}else if(mConfirmString==null){
// btnConfirm.setVisibility(View.GONE);
}
TextView btnCancel = (TextView) dialog.findViewById(R.id.btn_cancel);
if (!TextUtils.isEmpty(mCancelString)) {
btnCancel.setText(mCancelString);
btnCancel.setVisibility(View.VISIBLE);
}else if(mCancelString==null){
//btnCancel.setVisibility(View.GONE);
}
if(!isSHowConfirmButton){
btnConfirm.setVisibility(View.GONE);
}
if(!isShowCancelButton){
btnCancel.setVisibility(View.GONE);
}
View.OnClickListener listener = new View.OnClickListener() {
@Override

View File

@ -6,10 +6,12 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import androidx.fragment.app.FragmentActivity;
import androidx.core.content.FileProvider;
import com.yalantis.ucrop.UCrop;
import com.yalantis.ucrop.util.FileUtils;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R;
import com.yunbao.common.interfaces.ActivityResultCallback;
@ -36,6 +38,11 @@ public class ProcessImageUtil extends ProcessResultUtil {
private File mCorpResult;//裁剪后得到的图片
private ImageResultCallback mResultCallback;
private boolean mNeedCrop;//是否需要裁剪
private boolean mNeedGif;//允许gif图
public void setNeedGif(boolean mNeedGif) {
this.mNeedGif = mNeedGif;
}
public ProcessImageUtil(FragmentActivity activity) {
super(activity);
@ -101,6 +108,24 @@ public class ProcessImageUtil extends ProcessResultUtil {
mAlumbResultCallback = new ActivityResultCallback() {
@Override
public void onSuccess(Intent intent) {
if (!mNeedCrop) {
if (mResultCallback != null) {
if (intent.getData() == null) {
if (mResultCallback != null) {
mResultCallback.onFailure();
}
return;
}
String path = FileUtils.getPath(mContext, intent.getData());
File file = new File(path);
if (file.exists()) {
mResultCallback.onSuccess(file);
} else {
mResultCallback.onFailure();
}
}
return;
}
crop(intent.getData());
}
@ -152,6 +177,11 @@ public class ProcessImageUtil extends ProcessResultUtil {
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
}
public void getImageByAlumb(boolean needCrop) {
this.mNeedCrop = needCrop;
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
}
/**
* 开启摄像头执行照相
@ -172,7 +202,9 @@ public class ProcessImageUtil extends ProcessResultUtil {
}
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
startActivityForResult(intent, mCameraResultCallback);
}catch (Exception e){e.printStackTrace();}
} catch (Exception e) {
e.printStackTrace();
}
}
private File getNewFile() {
@ -189,9 +221,14 @@ public class ProcessImageUtil extends ProcessResultUtil {
* 打开相册选择文件
*/
private void chooseFile() {
String[] mimeTypes = {"image/png", "image/jpg", "image/jpeg"};
Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*");
intent.setType("*/*");
if (mNeedGif) {
mimeTypes = new String[]{"image/png", "image/jpg", "image/jpeg", "image/gif"};
}
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
if (Build.VERSION.SDK_INT < 19) {
intent.setAction(Intent.ACTION_GET_CONTENT);
} else {

View File

@ -59,6 +59,10 @@ public class RouteUtil {
public static final String PATH_VIDEO_NEW_PLAY = "/video/VideoPlayNewActivity";
public static final String PATH_FEEDBACK_SUCCESS_ACTIVITY = "/main/FeedbackSuccessActivity";
public static final String PATH_FEEDBACK_ACTIVITY = "/main/FeedbackActivity";
public static final String PATH_FEEDBACK_EDIT_ACTIVITY = "/main/FeedbackEditActivity";
public static void forwardVideoPlayNewActivity(ActiveBean bean) {
ARouter.getInstance().build(PATH_VIDEO_NEW_PLAY)
.withParcelable("ActiveBean", bean)

View File

@ -6,6 +6,7 @@ import java.io.File;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Random;
import java.util.UUID;
import java.util.regex.Pattern;
/**
@ -172,4 +173,5 @@ public class StringUtil {
DateFormatUtil.getVideoCurTimeString(),
String.valueOf(sRandom.nextInt(9999)));
}
}

View File

@ -9,7 +9,6 @@ import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.InteractionGamesAdapter;
import com.yunbao.common.adapter.LiveNewRoleInteractionGamesAdapter;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;

View File

@ -2,6 +2,7 @@ package com.yunbao.common.views;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
@ -9,6 +10,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.lifecycle.Observer;
import com.alibaba.fastjson.JSONObject;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
import com.makeramen.roundedimageview.RoundedImageView;
@ -17,16 +19,19 @@ import com.yunbao.common.bean.CheckRemainingBalance;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.dialog.DebugDialog;
import com.yunbao.common.event.CheckRemainingBalanceEvent;
import com.yunbao.common.event.HideShowEvent;
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
import com.yunbao.common.event.ShowHideEvent;
import com.yunbao.common.event.SubGameEvent;
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.sud.QuickStartGameViewModel;
import com.yunbao.common.sud.model.GameConfigModel;
import com.yunbao.common.sud.state.SudMGPAPPState;
import com.yunbao.common.sud.state.SudMGPMGState;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
@ -229,7 +234,7 @@ public class LiveSudGamePopup extends BottomPopupView {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Shortage of money");
ToastUtil.show("Insufficient number of currency");
}
}
@ -240,7 +245,7 @@ public class LiveSudGamePopup extends BottomPopupView {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Shortage of money");
ToastUtil.show("Insufficient number of currency");
}
}
});
@ -276,4 +281,16 @@ public class LiveSudGamePopup extends BottomPopupView {
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameStatus(SubGameEvent event) {
if (event.getType() == 0) {
Log.i("游戏回调", "onGameStateChange: event :" + event.toString());
if (event.getModel().getCode() == 1001 || event.getModel().getCode() == 1002) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("result", 0);
gameViewModel.sudFSTAPPDecorator.notifyStateChange(SudMGPAPPState.APP_COMMON_GAME_CREATE_ORDER_RESULT, jsonObject.toString());
}
}
}
}

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -15,6 +16,7 @@
android:id="@+id/ft_title"
android:layout_width="match_parent"
android:layout_height="72dp"
android:paddingTop="24dp"
android:background="@color/white">
@ -67,6 +69,5 @@
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_marginBottom="15dp"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -6,7 +6,7 @@
android:layout_marginTop="12dp"
android:gravity="center"
android:orientation="vertical">
<!--身份特权-->
<RelativeLayout
android:layout_width="40dp"

View File

@ -46,12 +46,21 @@
<TextView
android:id="@+id/fun_game_name"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:gravity="center"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:textSize="14sp" />
</LinearLayout>

View File

@ -1379,11 +1379,11 @@ Limited ride And limited avatar frame</string>
<string name="sud_in_game_game_game_peer_user">"Paired Users "</string>
<string name="sud_in_game_game_game_peer_user_nodata">" Currently No Records~"</string>
<string name="sud_in_game_game_game_peer_today">"Today "</string>
<string name="sud_in_game_rule_hint1">1. Interactive games are a new section provided by PDLIVE for users, who can participate in the game section on the homepage or in the live room;</string>
<string name="sud_in_game_rule_hint2">2. Currently, we have launched \'GoBang\',\' Bumper car \',\' Flying Chess\', \'Minesweeping\', \'Dart Master\', and \'Monster Eliminating\'. We will provide more game types in the future. Stay tuned;</string>
<string name="sud_in_game_rule_hint1">1.Interactive games are a new section provided by PDLIVE for users, who can participate in the game section on the homepage or in the live room;</string>
<string name="sud_in_game_rule_hint2">2.Currently, [Backgammon], [Flying Chess], [Bumper Im the Strongest], [Monster Match], [Jump], [Friendly Challenge], [Magic Battle], [American 8 Ball] More game types will be provided in the future, so stay tuned;</string>
<string name="sud_in_game_rule_hint3">3.Users can customize the game threshold, which must be between 100 to 50000 gold beans , and the amount must be a multiple of 10;</string>
<string name="sud_in_game_rule_hint4">4.At the beginning of the game, chips from participating users will be collected. After the game ends, 10% of the chips will be collected as tickets, and all remaining chips will be given to the winning users.In a draw, the corresponding chips will be deducted from the tickets and returned to the users;</string>
<string name="sud_in_game_rule_hint5">5. The final interpretation right of the event belongs to PDLIVE.</string>
<string name="sud_in_game_rule_hint5">5.The final interpretation right of the event belongs to PDLIVE.</string>
<string name="sud_in_game_game_currency_item">Currency</string>
<string name="sud_in_game_game_currency">Currency:</string>
<string name="sud_in_game_game_time">Time:</string>

View File

@ -1374,7 +1374,7 @@
<string name="sud_in_game_game_game_peer_user_nodata">暫無記錄~</string>
<string name="sud_in_game_game_game_peer_today">今日</string>
<string name="sud_in_game_rule_hint1">1、互動遊戲是PDLIVE為用戶提供的全新板塊用戶可以在首頁【遊戲專區】或直播間內參與</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【碰碰我最強】、【飛行棋】、【扫雷】、【飞镖达人】、【怪兽消消乐】,後續將會提供更多遊戲種類,敬請期待;</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【飛行棋】、【碰碰我最強】、【怪物消消樂】、【跳一跳】、【友情闖關】、【魔法大樂鬥】、【美式8球】後續將會提供更多遊戲種類敬請期期待;</string>
<string name="sud_in_game_rule_hint3">3、用戶可自定義設定遊戲門檻要求在100~50000金豆之間數額必須為10的倍數</string>
<string name="sud_in_game_rule_hint4">4、 遊戲開始時將會收取參與遊戲用戶的籌碼在遊戲結束後將收取10%的籌碼作為門票,剩餘籌碼將全部給予勝利用戶,平局時將會扣除相應籌碼门票後返還給用戶;</string>
<string name="sud_in_game_rule_hint5">5、活動最終解釋權歸PDLIVE所有。</string>

View File

@ -1373,7 +1373,7 @@
<string name="sud_in_game_game_game_peer_user_nodata">暫無記錄~</string>
<string name="sud_in_game_game_game_peer_today">今日</string>
<string name="sud_in_game_rule_hint1">1、互動遊戲是PDLIVE為用戶提供的全新板塊用戶可以在首頁【遊戲專區】或直播間內參與</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【碰碰我最強】、【飛行棋】、【扫雷】、【飞镖达人】、【怪兽消消乐】,後續將會提供更多遊戲種類,敬請期待;</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【飛行棋】、【碰碰我最強】、【怪物消消樂】、【跳一跳】、【友情闖關】、【魔法大樂鬥】、【美式8球】後續將會提供更多遊戲種類敬請期期待;</string>
<string name="sud_in_game_rule_hint3">3、用戶可自定義設定遊戲門檻要求在100~50000金豆之間數額必須為10的倍數</string>
<string name="sud_in_game_rule_hint4">4、 遊戲開始時將會收取參與遊戲用戶的籌碼在遊戲結束後將收取10%的籌碼作為門票,剩餘籌碼將全部給予勝利用戶,平局時將會扣除相應籌碼门票後返還給用戶;</string>
<string name="sud_in_game_rule_hint5">5、活動最終解釋權歸PDLIVE所有。</string>

View File

@ -1373,7 +1373,7 @@
<string name="sud_in_game_game_game_peer_user_nodata">暫無記錄~</string>
<string name="sud_in_game_game_game_peer_today">今日</string>
<string name="sud_in_game_rule_hint1">1、互動遊戲是PDLIVE為用戶提供的全新板塊用戶可以在首頁【遊戲專區】或直播間內參與</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【碰碰我最強】、【飛行棋】、【扫雷】、【飞镖达人】、【怪兽消消乐】,後續將會提供更多遊戲種類,敬請期待;</string>
<string name="sud_in_game_rule_hint2">2、目前已上線【五子棋】、【飛行棋】、【碰碰我最強】、【怪物消消樂】、【跳一跳】、【友情闖關】、【魔法大樂鬥】、【美式8球】後續將會提供更多遊戲種類敬請期期待;</string>
<string name="sud_in_game_rule_hint3">3、 用戶可自定義設定遊戲門檻要求在100~50000金豆之間數額必須為10的倍數</string>
<string name="sud_in_game_rule_hint4">4、 遊戲開始時將會收取參與遊戲用戶的籌碼在遊戲結束後將收取10%的籌碼作為門票,剩餘籌碼將全部給予勝利用戶,平局時將會扣除相應籌碼门票後返還給用戶;</string>
<string name="sud_in_game_rule_hint5">5、活動最終解釋權歸PDLIVE所有。</string>

View File

@ -1385,9 +1385,9 @@ Limited ride And limited avatar frame</string>
<string name="sud_in_game_game_game_peer_today">"Today "</string>
<string name="sud_in_game_game_game_peer_today_7">"≤7 days "</string>
<string name="sud_in_game_game_game_peer_today_30">≤ 30 days</string>
<string name="sud_in_game_rule_hint1">1. Interactive games are a new section provided by PDLIVE for users, who can participate in the game section on the homepage or in the live room;</string>
<string name="sud_in_game_rule_hint2">2.Currently, we have launched \'GoBang\',\' Bumper car \',\' Flying Chess\', \'Minesweeping\', \'Dart Master\', and \'Monster Eliminating\'. We will provide more game types in the future. Stay tuned;</string>
<string name="sud_in_game_rule_hint3">3.. Users can customize the game threshold, which must be between 100 to 50000 gold beans , and the amount must be a multiple of 10;</string>
<string name="sud_in_game_rule_hint1">1.Interactive games are a new section provided by PDLIVE for users, who can participate in the game section on the homepage or in the live room;</string>
<string name="sud_in_game_rule_hint2">2.Currently, [Backgammon], [Flying Chess], [Bumper Im the Strongest], [Monster Match], [Jump], [Friendly Challenge], [Magic Battle], [American 8 Ball] More game types will be provided in the future, so stay tuned;</string>
<string name="sud_in_game_rule_hint3">3. Users can customize the game threshold, which must be between 100 to 50000 gold beans , and the amount must be a multiple of 10;</string>
<string name="sud_in_game_rule_hint4">4.At the beginning of the game, chips from participating users will be collected. After the game ends, 10% of the chips will be collected as tickets, and all remaining chips will be given to the winning users.In a draw, the corresponding chips will be deducted from the tickets and returned to the users;</string>
<string name="sud_in_game_rule_hint5">5. The final interpretation right of the event belongs to PDLIVE.</string>
<string name="room_sill0_100">0-100 coins</string>

View File

@ -4,15 +4,15 @@ ext {
buildToolsVersion: "29.0.2",
minSdkVersion : 23,
targetSdkVersion : 33,
versionCode : 523,
versionName : "6.6.7",
versionCode : 524,
versionName : "6.6.8",
namespace : "com.pandoralive.shayu"
]
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
// serverHost : " https://ceshi.yaoulive.com",
serverHost : " https://ceshi.yaoulive.com",
//
baiduAppId : "23774720",

Binary file not shown.

View File

@ -1712,6 +1712,15 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
liveInputDialogFragment.setArguments(liveInputBundle);
liveInputDialogFragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
break;
case LIVE_DIALOG_ANCHOR_TIPS:
new DialogUitl.Builder(mContext)
.setContent(event.getObject().toString())
.setConfirmString(WordUtil.isNewZh() ? "確定" : "confirm")
.setCancelable(true)
.setShowCancelButton(false)
.build()
.show();
break;
}
}
@ -1850,6 +1859,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
.setIcon("https://downs.yaoulive.com/xzs_tab.png")
.setNameColor("#f19ec2")
.setSystemBubble("https://downs.yaoulive.com/xzs_qipao.9.png")
.setIconEn("https://downs.yaoulive.com/Robot_en.png")
.setUserName("")
.setContent(content);
SocketSendBean msg =

View File

@ -5,6 +5,7 @@ import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
@ -15,6 +16,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.Constants;
@ -32,6 +34,7 @@ import com.yunbao.common.bean.SudGameChatImModel;
import com.yunbao.common.bean.SudGameUserModel;
import com.yunbao.common.dialog.SudGameInputPopupWindow;
import com.yunbao.common.event.CheckRemainingBalanceEvent;
import com.yunbao.common.event.SubGameEvent;
import com.yunbao.common.event.SudGameSocketImEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
@ -39,8 +42,10 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.imrongcloud.GameMicManager;
import com.yunbao.common.sud.QuickStartGameViewModel;
import com.yunbao.common.sud.decorator.SudFSMMGDecorator;
import com.yunbao.common.sud.model.GameConfigModel;
import com.yunbao.common.sud.model.GameViewInfoModel;
import com.yunbao.common.sud.state.SudMGPAPPState;
import com.yunbao.common.sud.state.SudMGPMGState;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DpUtil;
@ -460,7 +465,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Shortage of money");
ToastUtil.show("Insufficient number of currency");
}
}
@ -473,7 +478,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("貨幣数量不足 ");
} else {
ToastUtil.show("Shortage of money");
ToastUtil.show("Insufficient number of currency");
}
}
@ -679,4 +684,16 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameStatus(SubGameEvent event) {
if (event.getType() == 0) {
Log.i("游戏回调", "onGameStateChange: event :" + event.toString());
if (event.getModel().getCode() == 1001 || event.getModel().getCode() == 1002) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("result", 0);
gameViewModel.sudFSTAPPDecorator.notifyStateChange(SudMGPAPPState.APP_COMMON_GAME_CREATE_ORDER_RESULT, jsonObject.toString());
}
}
}
}

View File

@ -2,8 +2,11 @@ package com.yunbao.live.bean;
import android.text.TextUtils;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -30,8 +33,21 @@ public class ImUserBean extends BaseModel {
String _method_ = "";//融雲消息類型
@SerializedName("new_image")
private String newImage;
@JSONField(name = "en_image")
private String newImageEn;
public String getNewImageEn() {
return newImageEn;
}
public void setNewImageEn(String newImageEn) {
this.newImageEn = newImageEn;
}
public String getNewImage() {
if (!WordUtil.isNewZh() && !StringUtil.isEmpty(newImageEn)) {
return newImageEn;
}
return newImage;
}

View File

@ -4,6 +4,7 @@ import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.MsgModel;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
/**
@ -28,7 +29,7 @@ public class LiveChatBean {
public static final int XYD_COMPLETE = 207;//心愿单完成通知
public static final int WISH_LIST_PROGRESS = 307;//心愿单进度通知
public static final int BLIND_BOX = 409;//盲盒礼物消息
public static final int TYPE_TO_USER_MSG=500;//指定信息
public static final int TYPE_TO_USER_MSG = 500;//指定信息
private String id;
@ -47,6 +48,7 @@ public class LiveChatBean {
private String bubble;//气泡
private String medal;//勋章
private String medal_new;
private String medal_new_en;
private String medal_honor;//荣誉勋章
private String hot_num;
private String good_nub;
@ -63,7 +65,7 @@ public class LiveChatBean {
}
public String getGiftName() {
return WordUtil.isNewZh()?giftName:giftname_en;
return WordUtil.isNewZh() ? giftName : giftname_en;
}
public LiveChatBean setGiftName(String giftName) {
@ -215,6 +217,9 @@ public class LiveChatBean {
}
public String getMedal_new() {
if (!WordUtil.isNewZh() && !StringUtil.isEmpty(medal_new_en)) {
return medal_new_en;
}
return medal_new;
}
@ -222,6 +227,10 @@ public class LiveChatBean {
this.medal_new = medal_new;
}
public void setMedal_new_en(String medal_new_en) {
this.medal_new_en = medal_new_en;
}
public String getPrankIcon() {
return prankIcon;
}

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
@ -97,6 +98,12 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
.getString(R.string.together_to_achieve_goal),
redPacketInfoModel.getUserNicename()));
}
if(redPacketInfoModel.getRedPacketType()==2){
((ImageView)findViewById(R.id.value_icon)).setImageResource(R.mipmap.gold_coin);
redPacketValue.setText(redPacketInfoModel.getRedPacketMoney());
findViewById(R.id.red_packet_list).setVisibility(View.INVISIBLE);
findViewById(R.id.tips).setVisibility(View.INVISIBLE);
}
userID = redPacketInfoModel.getUserId();

View File

@ -2,7 +2,9 @@ package com.yunbao.live.dialog;
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.text.Editable;
import android.text.TextUtils;
@ -19,10 +21,12 @@ import com.lxj.xpopup.core.CenterPopupView;
import com.umeng.analytics.MobclickAgent;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
import com.yunbao.live.event.LiveAudienceEvent;
public class SendRendPacketPopup extends CenterPopupView {
private Button thereIsNo, followingAnchor, joinFansGroup;
@ -31,6 +35,8 @@ public class SendRendPacketPopup extends CenterPopupView {
private FrameLayout redPacketIllustrate;
private ImageView iconInstructions, illustrateClose;
private String mLiveID, conditions = "0";
private DialogInterface onDismissListener;
private boolean sendSuccess;
public SendRendPacketPopup(@NonNull Context context, String liveID) {
super(context);
@ -51,6 +57,23 @@ public class SendRendPacketPopup extends CenterPopupView {
initView();
}
public void setOnDismissListener(DialogInterface onDismissListener) {
this.onDismissListener = onDismissListener;
}
@Override
protected void onDismiss() {
super.onDismiss();
if (sendSuccess) {
// onDismissListener.dismiss();
} else {
// onDismissListener.cancel();
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP));
}
}
private void initView() {
thereIsNo = findViewById(R.id.there_is_no);
followingAnchor = findViewById(R.id.following_anchor);
@ -222,6 +245,7 @@ public class SendRendPacketPopup extends CenterPopupView {
MobclickAgent.onEvent(getContext(), "gif_list_redpk_seed", "用户发送红包");
ToastUtil.show(getContext().getString(R.string.red_envelope_released_successfully));
sendSuccess = true;
dismiss();
}

View File

@ -489,7 +489,8 @@ public class LiveAudienceEvent extends BaseModel {
UPDATE_FANS_TASK_STATUS(74, "更新粉丝任务状态"),
SUD_GAME_CREATE_ROOM(75, "主播创建sud游戏"),
PK_RANK_START(76, "PK排位赛开始"),
GuardSpecialEffect(77, "PK排位赛开始");
GuardSpecialEffect(77, "PK排位赛开始"),
LIVE_DIALOG_ANCHOR_TIPS(78, "主播公会赛tips");
private int type;
private String name;

View File

@ -101,6 +101,7 @@ import pl.droidsonroids.gif.GifImageView;
/**
* Created by cxf on 2018/10/13.
* 产品让改礼物效果
* 全服通知效果实现
*/
public class LiveGiftAnimPresenter {
@ -382,7 +383,12 @@ public class LiveGiftAnimPresenter {
}
}, 1000);
} else {
changeLiveRoom();
if (mIvLook.getTag()!=null&&mIvLook.getTag()instanceof LiveReceiveGiftBean){
changeLiveRoom((LiveReceiveGiftBean) mIvLook.getTag());
}else {
changeLiveRoom();
}
}
}
@ -430,12 +436,57 @@ public class LiveGiftAnimPresenter {
}
});
}
private void changeLiveRoom(LiveReceiveGiftBean mTempGifGiftBean) {
if (mTempGifGiftBean != null) {
String uid = mTempGifGiftBean.getUid();
String userId = CommonAppConfig.getInstance().getUid();
if (!TextUtils.isEmpty(mLiveUid)) {
userId = mLiveUid;
}
if (userId.equals(uid)) {
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
return;
}
}
if (mTempGifGiftBean.getRoomnum() == null || mTempGifGiftBean.getRoomnum().isEmpty()) {
return;
}
LiveHttpUtil.getLiveInfo(mTempGifGiftBean.getRoomnum(), new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
if (liveBean == null) {
return;
}
if (MicStatusManager.getInstance().isMic(liveUid)) {
MicStatusManager.getInstance().showDownMicDialog(mContext);
return;
}
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
}
@Override
public void onCheckError(String contextError) {
}
});
}
}
});
}
private void changeLiveRoom() {
if (mTempGifGiftBean != null) {
String uid = mTempGifGiftBean.getUid();
String userId = CommonAppConfig.getInstance().getUid();
if (!TextUtils.isEmpty(mLiveUid)) {
userId = mLiveUid;
}
if (userId.equals(uid)) {
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
return;
@ -1008,11 +1059,13 @@ public class LiveGiftAnimPresenter {
superNotice.setBackgroundResource(R.mipmap.super_notice);
mIvLook.setText(R.string.live_onlookers);
mAncherName = mTempGifGiftBean.getAncherName();
mRoomNum = bean.getRoomnum();
mGifGiftTipAllServer.setSelected(false);
mGifGiftTipGroupAllServer.setAlpha(1f);
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
textRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
mIvLook.setVisibility(View.VISIBLE);
mIvLook.setTag(bean);
mGifGiftTipShowAnimatorAllServer.start();
}
@ -1137,12 +1190,12 @@ public class LiveGiftAnimPresenter {
int unameSize = textMsg.length();
builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
if (!showB){
if (!showB) {
iv_look_full_service_notice_new3.setVisibility(View.GONE);
}else {
if (TextUtils.equals(event.getJumpType(),"0")){
} else {
if (TextUtils.equals(event.getJumpType(), "0")) {
iv_look_full_service_notice_new3.setVisibility(View.GONE);
}else {
} else {
iv_look_full_service_notice_new3.setVisibility(View.VISIBLE);
}
}

View File

@ -99,6 +99,7 @@ public class SocketRyChatUtil {
.param("medal_honor", u.getMedal_no_display_src())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("uid", u.getId())
.param("liangname", u.getGoodName())
.param("vip_type", u.getVip().getType())
@ -180,6 +181,7 @@ public class SocketRyChatUtil {
.param("bubble", u.getDress().getBubble())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType())
.param("medal_name", u.getMedalName())
.param("medal_level", u.getMedalLevel())
@ -308,6 +310,7 @@ public class SocketRyChatUtil {
.param("bubble", u.getDress().getBubble())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("medal_name", u.getMedalName())
.param("medal_level", u.getMedalLevel())
.param("guard_type", guard_type + "")
@ -347,6 +350,7 @@ public class SocketRyChatUtil {
.param("bubble", u.getDress().getBubble())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("ct", giftToken)
.param("ancherName", ancherName)
.param("medal_name", u.getMedalName())
@ -712,6 +716,7 @@ public class SocketRyChatUtil {
.param("bubble", u.getDress().getBubble())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("uname", u.getUserNiceName())
.param("uhead", u.getAvatar())
.param("votestotal", votes)
@ -742,6 +747,7 @@ public class SocketRyChatUtil {
.param("bubble", u.getDress().getBubble())
.param("medal", u.getDress().getMedal())
.param("medal_new", u.getDress().getMedal_new())
.param("medal_new_en", u.getDress().getMedal_new_en())
.param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType());
msg.create();

View File

@ -52,6 +52,7 @@ import com.yunbao.common.manager.MicedUserManager;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.manager.RandomPkManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
@ -389,7 +390,7 @@ public class SocketRyClient {
receiveGiftBean.setSendtype(map.getIntValue("action"));
receiveGiftBean.setAllServerNotify(true);
mListener.onSys(receiveGiftBean);
} else if (action2 == 61) {//赠送礼物
} else if (action2 == 61) {//赠送礼物 超级头条
sendGiftByNotify(map);
} else if (action2 == 62) {//购买守护
// buyGuardByNotify(map);
@ -402,7 +403,7 @@ public class SocketRyClient {
buyZuoJiByNotify(map);
} else if (action2 == 66) {//购买贵族
buyVipByNotify(map);
} else if (action2 == 88) {
} else if (action2 == 88) {//盲盒
JSONObject mCt = map.getJSONObject("ct");
String boxType = map.getString("box_type");
String boxTypeName = "";
@ -445,7 +446,7 @@ public class SocketRyClient {
NewAllServerNotifyGuardEvent notifyGuardEvent = GsonUtils.fromJson(map.toString(), NewAllServerNotifyGuardEvent.class);
Bus.get().post(notifyGuardEvent);
buyGuardInSameRoom(map);
}else if (action2==91){
} else if (action2 == 91) {//通用模板
AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent = GsonUtils.fromJson(map.toString(), AllServerNotifyFFGGGDJANEvent.class);
Bus.get().post(notifyFFGGGDJANEvent);
}
@ -820,6 +821,13 @@ public class SocketRyClient {
case "SendMoneyLongEnd":
Bus.get().post(new SendMoneyLongEndEvent());
break;
case Constants.SOCKET_LIVE_ANCHOR_PK_DIALOG:
item = map.getJSONObject("ct");
//DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()?item.getString("text"):item.getString("text_en"),null);
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_DIALOG_ANCHOR_TIPS)
.setObject(WordUtil.isNewZh() ? item.getString("text") : item.getString("text_en")));
break;
}
}
@ -982,6 +990,7 @@ public class SocketRyClient {
chatBean.setBubble(map.getString("bubble"));
chatBean.setMedal(map.getString("medal"));
chatBean.setMedal_new(map.getString("medal_new"));
chatBean.setMedal_new_en(map.getString("medal_new_en"));
chatBean.setVipType(map.getIntValue("vip_type"));
chatBean.setVipType(map.getIntValue("vip_type"));
chatBean.setMedal_honor(map.getString("medal_honor"));
@ -1039,6 +1048,7 @@ public class SocketRyClient {
chatBean.setBubble(obj.getString("bubble"));
chatBean.setMedal(obj.getString("medal"));
chatBean.setMedal_new(obj.getString("medal_new"));
chatBean.setMedal_new_en(map.getString("medal_new_en"));
chatBean.setHot_num(obj.getString("hot_num"));
UserBean.DressBean dressBean = new UserBean.DressBean();
dressBean.setAvatar_frame(obj.getString("avatar_frame"));
@ -1154,6 +1164,7 @@ public class SocketRyClient {
chatBean.setBubble(map.getString("bubble"));
chatBean.setMedal(map.getString("medal"));
chatBean.setMedal_new(map.getString("medal_new"));
chatBean.setMedal_new_en(map.getString("medal_new_en"));
chatBean.setGood_nub(map.getString("good_num"));
chatBean.setType(LiveChatBean.GIFT);
if (map.get("guard_type") != null && !"".equals(map.get("guard_type")) && !"null".equals(map.get("guard_type"))) {
@ -1201,16 +1212,26 @@ public class SocketRyClient {
chatBean.setBubble(map.getString("bubble"));
chatBean.setMedal(map.getString("medal"));
chatBean.setMedal_new(map.getString("medal_new"));
chatBean.setMedal_new_en(map.getString("medal_new_en"));
chatBean.setGood_nub(map.getString("good_num"));
chatBean.setType(LiveChatBean.GIFT);
if (map.get("guard_type") != null && !"".equals(map.get("guard_type")) && !"null".equals(map.get("guard_type"))) {
chatBean.setGuardType(map.getInteger("guard_type"));
}
if (WordUtil.isNewZh()) {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
String special = "";
if (sendBlindGiftEvent.getSpecialGift() == 1) {
if (WordUtil.isNewZh()) {
special = "送出" + receiveGiftBean.getGiftName() + sendBlindGiftEvent.getSpecialGiftName();
} else {
special = "Send " + receiveGiftBean.getGiftName() + sendBlindGiftEvent.getSpecialGiftNameEn();
}
chatBean.setContent(special);
} else {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());
if (WordUtil.isNewZh()) {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName() + special);
} else {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen() + special);
}
}
//增加粉丝徽章信息
chatBean.setMedalNmae(map.getString("medal_name"));

View File

@ -1637,6 +1637,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private Runnable timeRunnable = new Runnable() {
@Override
public void run() {
Log.i("红包", "run: 红包倒计时 "+redTimeCountdown);
if (redTimeCountdown > 1) {
timeHandler.postDelayed(timeRunnable, 1000);
redPacketCountdown.setText(String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(redTimeCountdown)));
@ -1662,6 +1663,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private Runnable anchorTimeRunnable = new Runnable() {
@Override
public void run() {
Log.i("红包", "anchorTimeRunnable run: "+mCountdown);
if (mCountdown > 0) {
mCountdown = mCountdown - 1;
anchorTimeHandler.postDelayed(anchorTimeRunnable, 1000);
@ -3990,6 +3992,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (mLiveGiftAnimPresenter == null) {
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
}
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid,mStream);
mLiveGiftAnimPresenter.showGiftAnim(bean, isAncher);
}

View File

@ -99,7 +99,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/hor_recycler"
android:layout_width="wrap_content"
android:layout_height="120dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:scrollbars="none" />

View File

@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="100dp"
android:layout_height="180dp"
android:minHeight="180dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal|top"
android:paddingTop="10dp"
android:orientation="vertical"

View File

@ -1206,12 +1206,14 @@
</LinearLayout>
</FrameLayout>
<!--全服通知 通用模板-->
<FrameLayout
android:id="@+id/full_service_notice_new"
android:layout_width="match_parent"
android:layout_height="51dp"
android:translationX="500dp"
tools:translationX="0dp"
tools:visibility="visible"
android:visibility="invisible">
<ImageView
android:id="@+id/full_service_notice_new_bg"
@ -2317,7 +2319,7 @@
android:layout_width="40dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:visibility="gone">
android:visibility="invisible">
<View
android:layout_width="41dp"

View File

@ -70,6 +70,7 @@
android:textSize="12sp" />
<ImageView
android:id="@+id/value_icon"
android:layout_width="16dp"
android:layout_height="14dp"
android:layout_marginStart="15dp"
@ -145,6 +146,7 @@
</LinearLayout>
<TextView
android:id="@+id/tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/red_packet_list"

View File

@ -181,6 +181,10 @@
android:name=".activity.UserHomeActivity"
android:screenOrientation="portrait" />
<activity android:name=".activity.FeedbackActivity" android:screenOrientation="portrait" />
<activity android:name=".activity.FeedbackSuccessActivity" android:screenOrientation="portrait"/>
<activity android:name=".activity.FeedbackEditActivity" android:screenOrientation="portrait"/>
</application>
</manifest>

View File

@ -6,6 +6,7 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
@ -21,6 +22,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.BattlePassUserInfoBean;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow;
import com.yunbao.common.dialog.ActivityEndPopupWindow;
@ -69,6 +71,7 @@ public class BattlePassActivity extends AbsActivity {
Button moreIntegralButton;
String enjoySpendMoney = "";
String quintessenceSpendMoney = "";
Button allGet;
BattlePassUserInfoBean data;
@ -99,6 +102,7 @@ public class BattlePassActivity extends AbsActivity {
tab3 = findViewById(R.id.tab_3);
expText = findViewById(R.id.exp_text);
viewPager = findViewById(R.id.context_layout);
allGet = findViewById(R.id.all_get);
fragments.add(new BattlePassRewardFragment(() -> data));
fragments.add(new BattlePassMissionFragment(() -> data));
fragments.add(new BattlePassExchangeFragment(() -> data));
@ -171,21 +175,44 @@ public class BattlePassActivity extends AbsActivity {
.show();
}
});
ViewClicksAntiShake.clicksAntiShake(allGet, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
LiveNetManager.get(mContext)
.getRewards("0", "0", new HttpCallback<HttpCallbackModel>() {
@Override
public void onSuccess(HttpCallbackModel data) {
ToastUtil.show(data.getMsg());
initData();
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
});
}
private void clickView(int position) {
switch (position) {
case 0:
if (allGet.getTag() != null) {
allGet.setVisibility(View.VISIBLE);
}
tab1.setImageResource(R.mipmap.ic_zl_tab1);
tab2.setImageResource(R.mipmap.ic_zl_tab2_unselect);
tab3.setImageResource(R.mipmap.ic_zl_tab3_unselect);
break;
case 1:
event(new BattlePassTypeEvent(2));
tab1.setImageResource(R.mipmap.ic_zl_tab1_unselect);
tab2.setImageResource(R.mipmap.ic_zl_tab2);
tab3.setImageResource(R.mipmap.ic_zl_tab3_unselect);
break;
case 2:
event(new BattlePassTypeEvent(2));
tab1.setImageResource(R.mipmap.ic_zl_tab1_unselect);
tab2.setImageResource(R.mipmap.ic_zl_tab2_unselect);
tab3.setImageResource(R.mipmap.ic_zl_tab3);
@ -210,8 +237,8 @@ public class BattlePassActivity extends AbsActivity {
levelView.setText("Lv." + data.getLevel());
expText.setText(data.getBattlePassExp() + "/" +
(data.getNextLevelExp() == 0 ? data.getBattlePassExp() : data.getNextLevelExp()));
levelProgressView.setMax(data.getNextLevelExp()-data.getLastLevelExp());
levelProgressView.setProgress(data.getBattlePassExp()-data.getLastLevelExp());
levelProgressView.setMax(data.getNextLevelExp() - data.getLastLevelExp());
levelProgressView.setProgress(data.getBattlePassExp() - data.getLastLevelExp());
integralView.setText(String.format(WordUtil.getNewString(R.string.battlepass_user_my_integral), data.getPoints()));
for (LiveBattlePassRewardsBean.BattlePassType passType : data.getLive_battle_pass_type()) {
@ -251,6 +278,11 @@ public class BattlePassActivity extends AbsActivity {
public void event(BattlePassTypeEvent event) {
if (event.getType() == 0) {
initData();
} else if (event.getType() == 1) {
allGet.setVisibility(View.VISIBLE);
allGet.setTag(event.getBean());
} else if (event.getType() == 2) {
allGet.setVisibility(View.GONE);
}
}
}

View File

@ -636,7 +636,7 @@ public class EntryActivity extends AppCompatActivity {
Contexts.startActivity(new Intent(Contexts, BindUserActivity.class).putExtra("uid", uid).putExtra("token", token));
}
} else {
ToastUtil.show(msg + "11212");
ToastUtil.show(msg);
}
}

View File

@ -0,0 +1,82 @@
package com.yunbao.main.activity;
import android.app.Dialog;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import com.yunbao.main.http.MainHttpUtil;
@Route(path = RouteUtil.PATH_FEEDBACK_ACTIVITY)
public class FeedbackActivity extends AbsActivity {
@Override
protected int getLayoutId() {
return R.layout.activity_feedback;
}
@Override
protected void main() {
super.main();
setTitle(WordUtil.getNewString(R.string.activity_feedback_top_title));
setTitleBold(true);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_cs), new ViewClicksAntiShake.ViewClicksCallBack() {
Dialog loading;
@Override
public void onViewClicks() {
//TODO 客服
loading= DialogUitl.loadingDialog(mContext);
loading.show();
MainHttpUtil.getCustomerService(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
loading.dismiss();
loading=null;
if (info.length == 1) {
String url = info[0];
RouteUtil.forwardCustomerService(url);
}
}
@Override
public void onError() {
super.onError();
loading.dismiss();
loading=null;
}
});
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_feedback), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
//TODO 意见反馈
LiveNetManager.get(mContext)
.checkFeedback(new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
@Override
public void onSuccess(HttpCallbackModel data) {
if (data.getCode() == 0) {
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_EDIT_ACTIVITY);
} else {
ToastUtil.show(R.string.activity_feedback_edit_submit_tip3);
}
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
});
}
}

View File

@ -0,0 +1,396 @@
package com.yunbao.main.activity;
import android.app.Dialog;
import android.graphics.Color;
import android.text.Editable;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextWatcher;
import android.util.SparseArray;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSONArray;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.dialog.ImagePreviewDialog;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import java.io.File;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Route(path = RouteUtil.PATH_FEEDBACK_EDIT_ACTIVITY)
public class FeedbackEditActivity extends AbsActivity {
EditText feedbackEdit;
ImageView img1, img2, img3;
EditText ciEdit;
Button submit;
TextView editNumber;
ProcessImageUtil imageUtil;
Dialog loadingDialog = null;
int clickImage = 0;
View img1Layout, img2Layout, img3Layout;
View img1Del, img2Del, img3Del;
@Override
protected int getLayoutId() {
return R.layout.activity_feedback_edit;
}
@Override
protected void main() {
super.main();
setTitle(WordUtil.getNewString(R.string.activity_feedback_edit_feedback_top));
setTitleBold(true);
initView();
imageUtil = new ProcessImageUtil(this);
feedbackEdit.setFilters(new InputFilter[]{new InputFilter.LengthFilter(501)});
ciEdit.setFilters(new InputFilter[]{new InputFilter.LengthFilter(30), new InputFilter() {
@Override
public CharSequence filter(CharSequence charSequence, int i, int i1, Spanned spanned, int i2, int i3) {
/* String regex = "[A-Za-z0-9]+"; // 正则表达式
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(charSequence.toString());
if (matcher.matches()) {
return null;
}
return "";*/
return null;
}
}});
feedbackEdit.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (charSequence.length() >= 500) {
editNumber.setTextColor(Color.parseColor("#FF5656"));
} else {
editNumber.setTextColor(Color.parseColor("#333333"));
}
editNumber.setText(String.format(Locale.getDefault(), "%d", charSequence.length()));
}
@Override
public void afterTextChanged(Editable editable) {
if (editable.length() > 500) {
ToastUtil.show(R.string.activity_feedback_edit_submit_tip2);
feedbackEdit.setText(editable.toString().substring(0, 500));
feedbackEdit.setSelection(feedbackEdit.getText().length());
}
}
});
ViewClicksAntiShake.clicksAntiShake(img1, () -> {
clickImage = 101;
if (img1.getTag() == null) {
uploadImage(img1);
} else {
showImage(img1);
}
});
ViewClicksAntiShake.clicksAntiShake(img2, () -> {
clickImage = 201;
if (img2.getTag() == null) {
uploadImage(img2);
} else {
showImage(img2);
}
});
ViewClicksAntiShake.clicksAntiShake(img3, () -> {
clickImage = 301;
if (img3.getTag() == null) {
uploadImage(img3);
} else {
showImage(img3);
}
});
ViewClicksAntiShake.clicksAntiShake(img1Del, () -> {
deleteImage(1);
});
ViewClicksAntiShake.clicksAntiShake(img2Del, () -> {
deleteImage(2);
});
ViewClicksAntiShake.clicksAntiShake(img3Del, () -> {
deleteImage(3);
});
ViewClicksAntiShake.clicksAntiShake(submit, () -> {
if (feedbackEdit.getText().length() == 0) {
ToastUtil.show(R.string.activity_feedback_edit_submit_tip1);
return;
}
JSONArray images = new JSONArray();
if (img1.getTag() != null) {
images.add(((String) img1.getTag()).replace("https://downs.yaoulive.com/" ,""));
}
if (img2.getTag() != null) {
images.add(((String) img2.getTag()).replace("https://downs.yaoulive.com/" ,""));
}
if (img3.getTag() != null) {
images.add(((String) img3.getTag()).replace("https://downs.yaoulive.com/" ,""));
}
LiveNetManager.get(mContext)
.feedback(feedbackEdit.getText().toString(),
images,
ciEdit.getText().toString(),
new HttpCallback<HttpCallbackModel>() {
@Override
public void onSuccess(HttpCallbackModel data) {
finish();
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_SUCCESS_ACTIVITY);
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
}
);
});
img1.setOnLongClickListener(view -> {
ToastUtil.showDebug("1");
return true;
});
img2.setOnLongClickListener(view -> {
ToastUtil.showDebug("2");
return true;
});
img3.setOnLongClickListener(view -> {
ToastUtil.showDebug("3");
return true;
});
imageUtil.setImageResultCallback(new ImageResultCallback() {
@Override
public void onSuccess(File file) {
ToastUtil.showDebug("图片地址:" + file.getAbsolutePath());
onSuccessToQiNiuUrl(mContext, file, new OnItemClickListener<String>() {
@Override
public void onItemClick(String bean, int position) {
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
switch (clickImage) {
case 101:
case 112:
setShowImage(img1, img1Del, bean);
if (img2.getTag() == null) {
setDefImage(img2, img2Del, img2Layout);
} else if (img3.getTag() == null) {
setDefImage(img3, img3Del, img3Layout);
}
break;
case 201:
case 212:
setShowImage(img2, img2Del, bean);
if (img3.getTag() == null) {
setDefImage(img3, img3Del, img3Layout);
}
break;
case 301:
case 312:
setShowImage(img3, img3Del, bean);
break;
}
}
});
}
@Override
public void onFailure() {
super.onFailure();
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
}
});
}
private void showImage(ImageView iv) {
ImagePreviewDialog dialog = new ImagePreviewDialog();
dialog.setImageInfo(1, 1, false, new ImagePreviewDialog.ActionListener() {
@Override
public void loadImage(ImageView imageView, int position) {
ImgLoader.display(mContext, (String) iv.getTag(), imageView);
}
@Override
public void onDeleteClick(int position) {
}
});
dialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "ImagePreviewDialog");
}
private void showUploadImage(SparseArray<String> list) {
DialogUitl.showStringArrayDialog(mContext, list, new DialogUitl.StringArrayDialogCallback() {
@Override
public void onItemClick(String text, int tag) {
clickImage = tag;
switch (tag) {
case 101:
uploadImage(img1);
break;
case 201:
uploadImage(img2);
break;
case 301:
uploadImage(img3);
break;
case 111:
deleteImage(1);
break;
case 211:
deleteImage(2);
break;
case 311:
deleteImage(3);
break;
case 112:
changeImage(img1);
break;
case 212:
changeImage(img2);
break;
case 312:
changeImage(img3);
break;
}
}
});
}
private void uploadImage(ImageView imageView) {
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
SparseArray<String> array = new SparseArray<>();
array.put(1, WordUtil.getNewString(R.string.activity_feedback_edit_img_select));
array.put(2, WordUtil.getNewString(R.string.activity_feedback_edit_img_camera));
DialogUitl.showStringArrayDialog(mContext, array, new DialogUitl.StringArrayDialogCallback() {
@Override
public void onItemClick(String text, int tag) {
loadingDialog = DialogUitl.loadingDialog(mContext);
loadingDialog.show();
if (tag == 1) {
imageUtil.getImageByAlumb(false);
} else {
imageUtil.getImageByCamera(false);
}
}
});
}
private void deleteImage(int index) {
if (index == 1) {
if (img2.getTag() != null) {
img1.setTag(img2.getTag());
ImgLoader.display(mContext, (String) img1.getTag(), img1);
if (img3.getTag() != null) {
img2.setTag(img3.getTag());
ImgLoader.display(mContext, (String) img2.getTag(), img2);
setDefImage(img3, img3Del, img3Layout);
} else {
setDefImage(img2, img2Del, img2Layout);
setGoneImage(img3, img3Del, img3Layout);
}
} else {
setDefImage(img1, img1Del, img1Layout);
setGoneImage(img2, img2Del, img2Layout);
setGoneImage(img3, img3Del, img3Layout);
}
} else if (index == 2) {
if (img3.getTag() != null) {
img2.setTag(img3.getTag());
ImgLoader.display(mContext, (String) img2.getTag(), img2);
setDefImage(img3, img3Del, img3Layout);
} else {
setDefImage(img2, img2Del, img2Layout);
setGoneImage(img3, img3Del, img3Layout);
}
} else if (index == 3) {
setDefImage(img3, img3Del, img3Layout);
}
}
private void setDefImage(ImageView iv, View ivDel, View ivLayout) {
iv.setTag(null);
ivDel.setVisibility(View.GONE);
iv.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
ivLayout.setVisibility(View.VISIBLE);
}
private void setGoneImage(ImageView iv, View ivDel, View ivLayout) {
iv.setTag(null);
ivDel.setVisibility(View.GONE);
ivLayout.setVisibility(View.GONE);
}
private void setShowImage(ImageView iv, View ivDel, String url) {
iv.setTag(url);
ImgLoader.display(mContext, url, iv);
ivDel.setVisibility(View.VISIBLE);
}
private void changeImage(ImageView imageView) {
uploadImage(imageView);
}
private SparseArray<String> getImageType1(int key) {
SparseArray<String> array = new SparseArray<>();
array.put(key + 1, WordUtil.getNewString(R.string.activity_feedback_edit_img_type1_upload));
return array;
}
private SparseArray<String> getImageType2(int key) {
SparseArray<String> array = new SparseArray<>();
array.put(key + 1, WordUtil.getNewString(R.string.activity_feedback_edit_img_type2_delete));
array.put(key + 2, WordUtil.getNewString(R.string.activity_feedback_edit_img_type2_change));
return array;
}
private void initView() {
feedbackEdit = findViewById(R.id.tv_feedback);
ciEdit = findViewById(R.id.edit_ci);
img1 = findViewById(R.id.img1);
img2 = findViewById(R.id.img2);
img3 = findViewById(R.id.img3);
img1Layout = findViewById(R.id.img1Layout);
img2Layout = findViewById(R.id.img2Layout);
img3Layout = findViewById(R.id.img3Layout);
img1Del = findViewById(R.id.img1_del);
img2Del = findViewById(R.id.img2_del);
img3Del = findViewById(R.id.img3_del);
submit = findViewById(R.id.btn_sub);
editNumber = findViewById(R.id.tv_number);
editNumber.setTextColor(Color.parseColor("#333333"));
}
}

View File

@ -0,0 +1,29 @@
package com.yunbao.main.activity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
@Route(path = RouteUtil.PATH_FEEDBACK_SUCCESS_ACTIVITY)
public class FeedbackSuccessActivity extends AbsActivity {
@Override
protected int getLayoutId() {
return R.layout.activity_feedback_success;
}
@Override
protected void main() {
super.main();
setTitleBold(true);
setTitle(WordUtil.getNewString(R.string.activity_feedback_edit_feedback_top));
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sub), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
finish();
}
});
}
}

View File

@ -285,9 +285,9 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
} else {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
}
if(IMLoginManager.get(mContext).isLiveNotifySettings()){
if (IMLoginManager.get(mContext).isLiveNotifySettings()) {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, liveNotifySettings);
}else{
} else {
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, liveNotifySettings);
}
}
@ -316,12 +316,16 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
.show();
}
} else if (bean.getId() == 17 || bean.getId() == 26) {
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
}
} else {
if (bean.getId() == 17) {//意见反馈要在url上加版本号和设备号
if (bean.getId() == 17 || bean.getId() == 26) {//意见反馈要在url上加版本号和设备号
href += "&version=" + android.os.Build.VERSION.RELEASE + "&model=" + android.os.Build.MODEL;
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
} else {
WebViewActivity.forward(mContext, href, false);
}
WebViewActivity.forward(mContext, href,false);
}
}

View File

@ -34,6 +34,7 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
@ -49,6 +50,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.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.main.R;
@ -86,6 +88,7 @@ public class ZhuangBanActivity extends AbsActivity {
if (!"".equals(Constants.myPackageUrl)) {
url = Constants.myPackageUrl;
}
v_spacing = (View) findViewById(R.id.v_spacing);
lt_title = (LinearLayout) findViewById(R.id.lt_title);
LinearLayout rootView = (LinearLayout) findViewById(com.yunbao.live.R.id.rootView);
@ -102,13 +105,12 @@ public class ZhuangBanActivity extends AbsActivity {
}
L.e("H5---5>" + url);
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
svga = (SVGAImageView) findViewById(R.id.svga);
mWebView = new WebView(mContext);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
params.bottomMargin = DpUtil.dp2px(15);
//params.bottomMargin = DpUtil.dp2px(15);
mWebView.setLayoutParams(params);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
rootView.addView(mWebView);
@ -194,6 +196,9 @@ public class ZhuangBanActivity extends AbsActivity {
}
mWebView.loadUrl(url);
AndroidBug5497Workaround.assistActivity(this);
if(!StringUtil.isEmpty(url)&&url.startsWith(HtmlConfig.SHOP)){
lt_title.setVisibility(View.GONE);
}
}

View File

@ -6,6 +6,16 @@ import java.util.List;
public class BattlePassTypeEvent {
int type;
LiveBattlePassRewardsBean bean;
public LiveBattlePassRewardsBean getBean() {
return bean;
}
public BattlePassTypeEvent setBean(LiveBattlePassRewardsBean bean) {
this.bean = bean;
return this;
}
public BattlePassTypeEvent(int liveBattlePassType) {
this.type=liveBattlePassType;

View File

@ -190,6 +190,11 @@ public class BattlePassRewardFragment extends BaseFragment {
}
}
if(data.getIs_received()>=2){
Bus.get().post(new BattlePassTypeEvent(1).setBean(data));
}else{
Bus.get().post(new BattlePassTypeEvent(2).setBean(data));
}
Collection<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> values = data.getLive_battle_pass_rewards().values();
List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> list = new ArrayList<>(values);
/* list.get(1).get(1).setReceived(2);

View File

@ -357,7 +357,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal());
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico,R.mipmap.icon_vip_gold);
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.icon_vip_gold);
} else {
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
}
@ -470,6 +470,10 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
MobclickAgent.onEvent(mContext, "my_room", "个人中心点房间管理");
forwardRoomManage();
break;
case 26:
case 17:
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
break;
}
} else {
//21 在线客服
@ -508,7 +512,10 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
if (bean.getId() == 24) {
MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹");
}
WebViewActivity.forward(mContext, url, false);
if (bean.getId() == 17 || bean.getId() == 26) {
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
} else
WebViewActivity.forward(mContext, url, false);
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="345dp" android:height="145dp">
<shape android:shape="rectangle">
<solid android:color="#fff7f7f7" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="132dp" android:height="50dp">
<shape android:shape="rectangle">
<solid android:color="#ffffe34f" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>
</item>
</selector>

View File

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#140F1F"
android:layout_height="match_parent">
@ -112,6 +113,20 @@
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<Button
android:id="@+id/all_get"
android:text="@string/activity_battle_pass_all_get"
android:layout_width="120dp"
android:visibility="gone"
tools:visibility="visible"
android:layout_height="34dp"
android:textColor="#ff6c00"
android:textAllCaps="false"
android:layout_marginBottom="50dp"
android:layout_marginEnd="50dp"
android:background="@mipmap/icon_battle_all_get"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF">
<include
android:id="@+id/include4"
layout="@layout/view_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp"
android:text="@string/activity_feedback_title"
android:textColor="#777777"
android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include4">
<Button
android:id="@+id/btn_cs"
android:layout_width="165dp"
android:layout_height="match_parent"
android:layout_marginEnd="15dp"
android:layout_weight="1"
android:background="#F7F7F7"
android:text="@string/activity_feedback_customer_service"
android:textAllCaps="false"
android:textColor="#333333"
android:textSize="13sp" />
<Button
android:id="@+id/btn_feedback"
android:layout_width="165dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textAllCaps="false"
android:background="#F7F7F7"
android:text="@string/activity_feedback_feedback"
android:textColor="#333333"
android:textSize="13sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/include4"
layout="@layout/view_title" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/activity_feedback_edit_feedback_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="*"
android:textColor="#FF5656"
android:textSize="15sp" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="145dp"
android:background="@drawable/bg_btn_feedback_edit_tv_edit"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp">
<EditText
android:id="@+id/tv_feedback"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_btn_feedback_edit_tv_edit"
android:ems="10"
android:gravity="start"
android:hint="@string/activity_feedback_edit_feedback_hint"
android:inputType="text|textMultiLine"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:textSize="11sp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="0"
android:textColor="#333333" />
<TextView
android:id="@+id/tv_max"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="/500"
android:textColor="#333333" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:text="@string/activity_feedback_edit_feedback_img_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/imgLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/img1Layout"
android:layout_width="105dp"
android:layout_height="105dp"
android:layout_marginEnd="10dp">
<ImageView
android:id="@+id/img1"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@mipmap/icon_activity_feedback_edit_img_add"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/img1_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_feedback_edit_image_del"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/img2Layout"
android:layout_width="105dp"
android:layout_height="105dp"
android:layout_marginEnd="10dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/img2"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@mipmap/icon_activity_feedback_edit_img_add"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/img2_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_feedback_edit_image_del"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/img3Layout"
android:layout_width="105dp"
android:layout_height="105dp"
android:layout_marginEnd="10dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/img3"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@mipmap/icon_activity_feedback_edit_img_add"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/img3_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_feedback_edit_image_del"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:text="@string/activity_feedback_edit_feedback_ci_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<EditText
android:id="@+id/edit_ci"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:background="@drawable/bg_btn_feedback_edit_tv_edit"
android:ems="10"
android:hint="@string/activity_feedback_edit_feedback_ci_hint"
android:inputType="text"
android:padding="15dp"
android:textSize="11sp" />
<Button
android:id="@+id/btn_sub"
android:layout_width="132dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="80dp"
android:background="@drawable/bg_btn_feedback_success"
android:text="@string/activity_feedback_edit_feedback_btn"
android:textAllCaps="false" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="11dp"
android:layout_marginBottom="130dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="*"
android:textColor="#FF5656"
android:textSize="11sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/activity_feedback_edit_feedback_btn_tips"
android:textColor="#777777"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"
android:gravity="center"
android:maxLines="2"
android:text="@string/activity_feedback_success_tips"
android:textColor="#333333"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="19dp"
app:layout_constraintBottom_toTopOf="@+id/textView14"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@mipmap/icon_activity_feedback_success" />
<TextView
android:id="@+id/textView15"
android:textSize="24sp"
android:textColor="#777777"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_marginBottom="19dp"
android:text="@string/activity_feedback_success_title"
app:layout_constraintBottom_toTopOf="@+id/imageView11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/sub"
android:layout_width="132dp"
android:layout_height="50dp"
android:text="@string/activity_feedback_success_sub"
android:textAllCaps="false"
android:background="@drawable/bg_btn_feedback_success"
android:layout_marginTop="70dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView14" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -82,4 +82,29 @@
<string name="edit_profile_hobby_save">完成</string>
<string name="edit_profile_hobby_cancel">退出</string>
<string name="complete_user_info_username_hint">請輸入暱稱</string>
<string name="activity_feedback_top_title">幫助與反饋</string>
<string name="activity_feedback_title">有什麼可以幫到您?</string>
<string name="activity_feedback_customer_service">智能客服</string>
<string name="activity_feedback_feedback">意見反餽</string>
<string name="activity_feedback_success_title">提交成功</string>
<string name="activity_feedback_success_tips">感謝您的反饋,我們將盡快進行處理!</string>
<string name="activity_feedback_success_sub">確定</string>
<string name="activity_feedback_edit_feedback_top">意見反饋</string>
<string name="activity_feedback_edit_feedback_title">問題描述</string>
<string name="activity_feedback_edit_feedback_hint">請描述您需要解決的問題</string>
<string name="activity_feedback_edit_feedback_img_title">問題圖片</string>
<string name="activity_feedback_edit_feedback_ci_title">聯繫方式</string>
<string name="activity_feedback_edit_feedback_ci_hint">留下您的電話或郵箱,方便我們與您聯繫</string>
<string name="activity_feedback_edit_feedback_btn">提交</string>
<string name="activity_feedback_edit_feedback_btn_tips">為必填項</string>
<string name="activity_feedback_edit_img_type1_upload">上傳圖片</string>
<string name="activity_feedback_edit_img_type2_delete">刪除</string>
<string name="activity_feedback_edit_img_type2_change">更換圖片</string>
<string name="activity_feedback_edit_submit_tip1">請描述您的問題</string>
<string name="activity_feedback_edit_submit_tip2">超過字數要求</string>
<string name="activity_feedback_edit_submit_tip3">今日反饋次數已用完</string>
<string name="activity_feedback_edit_img_select">從相冊選取</string>
<string name="activity_feedback_edit_img_camera">拍照</string>
<string name="activity_battle_pass_all_get">一鍵領取</string>
</resources>

View File

@ -83,4 +83,29 @@
<string name="edit_profile_hobby_save">Save</string>
<string name="edit_profile_hobby_cancel">Cancel</string>
<string name="complete_user_info_username_hint">Please enter a nickname</string>
<string name="activity_feedback_top_title">Help And Feedback</string>
<string name="activity_feedback_title">May I Help You?</string>
<string name="activity_feedback_customer_service">Intelligent\nCustomer Service</string>
<string name="activity_feedback_feedback">Feedback</string>
<string name="activity_feedback_success_title">Submitted\nSuccessfully</string>
<string name="activity_feedback_success_tips">Thank you for your feedback, we will process it as soon as possible!</string>
<string name="activity_feedback_success_sub">Confirm</string>
<string name="activity_feedback_edit_feedback_top">Feedback</string>
<string name="activity_feedback_edit_feedback_title">Problem Description</string>
<string name="activity_feedback_edit_feedback_hint">Please describe the problem you need to solve</string>
<string name="activity_feedback_edit_feedback_img_title">Problem Pictures</string>
<string name="activity_feedback_edit_feedback_ci_title">Contact Information</string>
<string name="activity_feedback_edit_feedback_ci_hint">Leave Your Phone Or Email For Us To Contact You</string>
<string name="activity_feedback_edit_feedback_btn">Submit</string>
<string name="activity_feedback_edit_feedback_btn_tips">required items</string>
<string name="activity_feedback_edit_img_type1_upload">Upload images</string>
<string name="activity_feedback_edit_img_type2_delete">Delete</string>
<string name="activity_feedback_edit_img_type2_change">Replace image</string>
<string name="activity_feedback_edit_submit_tip1">Please describe your problem</string>
<string name="activity_feedback_edit_submit_tip2">Exceeding the word count requirement</string>
<string name="activity_feedback_edit_submit_tip3">Today\'s feedback count has been used up</string>
<string name="activity_feedback_edit_img_select">Select from album</string>
<string name="activity_feedback_edit_img_camera">Photo shoot</string>
<string name="activity_battle_pass_all_get">Receive all</string>
</resources>