Compare commits
60 Commits
dev_memory
...
dev_6.4.9_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f072a31fc | ||
|
|
420118b652 | ||
|
|
076008ce89 | ||
|
|
8455d1253c | ||
| 07f8f46f1f | |||
|
|
8b46c57482 | ||
|
|
db834caf00 | ||
| 5c1eef1419 | |||
| fe29d307a9 | |||
|
|
b8fea6366c | ||
| 06dddb5273 | |||
| d774296db9 | |||
|
|
077cc7fd80 | ||
|
|
fdf9d0aea2 | ||
| 92c38dc0dc | |||
|
|
d8c4b9dd04 | ||
|
|
342b2e9139 | ||
| 88ea48b6ca | |||
|
|
0726c5dc1c | ||
|
|
046adc9340 | ||
|
|
46fa2419d3 | ||
|
|
5c5114f808 | ||
|
|
7f2f7ea4d8 | ||
| a89c441555 | |||
| a1762bc791 | |||
| 34432e5ccf | |||
|
|
46f20c9663 | ||
|
|
e0753ebb29 | ||
|
|
d7d24904bf | ||
|
|
abbc2fc4ee | ||
| 07f0f39978 | |||
| 8d932a09e1 | |||
|
|
34c855fc8f | ||
|
|
824d431a63 | ||
| af63c4c8ac | |||
|
|
16ba71493e | ||
| 94f8ee7f3b | |||
| e7c97f2b55 | |||
|
|
a7e6efa0dc | ||
|
|
ea9807dcdc | ||
| fdd30aa52a | |||
|
|
ba23f720eb | ||
| 05ede89cba | |||
| d6eddeb130 | |||
| bf4710470f | |||
| 5d2a246916 | |||
| cca8f43f61 | |||
|
|
1d66a9b7fb | ||
|
|
c1c4a7a38b | ||
|
|
b8a91a85e4 | ||
|
|
7cb7258210 | ||
|
|
8d823f7a07 | ||
| 6d458d0c7f | |||
| eaed7e448b | |||
| b2f779f58a | |||
| 79ded6bff4 | |||
|
|
d86e16c9f5 | ||
| f2cff3b93f | |||
|
|
e97a4e607c | ||
| 4d86317ec8 |
@@ -82,6 +82,10 @@
|
|||||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||||
|
<queries>
|
||||||
|
<package android:name="com.twitter.android"/>
|
||||||
|
|
||||||
|
</queries>
|
||||||
<application
|
<application
|
||||||
android:name="com.shayu.phonelive.AppContext"
|
android:name="com.shayu.phonelive.AppContext"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|||||||
@@ -122,11 +122,11 @@ public class AppContext extends CommonAppContext {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
//注册全局异常捕获
|
|
||||||
if (!isMainProcess()) {
|
if (!isMainProcess()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||||
|
//注册全局异常捕获
|
||||||
registerError();
|
registerError();
|
||||||
registerFirebaseCrash();
|
registerFirebaseCrash();
|
||||||
LogUtils.start(this);
|
LogUtils.start(this);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class NeverCrashUtils {
|
|||||||
Log.e(TAG, "未捕获的主线程异常行为", e);
|
Log.e(TAG, "未捕获的主线程异常行为", e);
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
//Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
||||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||||
// return;
|
// return;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class LogUtils {
|
|||||||
String[] exec = new String[]{"logcat", "-c"};
|
String[] exec = new String[]{"logcat", "-c"};
|
||||||
Runtime.getRuntime().exec(exec).waitFor();
|
Runtime.getRuntime().exec(exec).waitFor();
|
||||||
|
|
||||||
exec = new String[]{"logcat", "-v", "UTC", "-D"};
|
exec = new String[]{"logcat", "-v", "color", "UTC-8"};
|
||||||
|
|
||||||
Process process = Runtime.getRuntime().exec(exec);
|
Process process = Runtime.getRuntime().exec(exec);
|
||||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||||
@@ -55,6 +55,7 @@ public class LogUtils {
|
|||||||
writer = new PrintWriter(os);
|
writer = new PrintWriter(os);
|
||||||
while ((line = bufferedReader.readLine()) != null) {
|
while ((line = bufferedReader.readLine()) != null) {
|
||||||
writer.append(line).write("\n");
|
writer.append(line).write("\n");
|
||||||
|
writer.flush();
|
||||||
}
|
}
|
||||||
writer.flush();
|
writer.flush();
|
||||||
writer.close();
|
writer.close();
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ import com.yunbao.common.http.CommonHttpUtil;
|
|||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
@@ -35,7 +33,6 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
|
|
||||||
public static CommonAppContext sInstance;
|
public static CommonAppContext sInstance;
|
||||||
public static WeakReference<Activity> activityWeakReference;
|
public static WeakReference<Activity> activityWeakReference;
|
||||||
public static List<WeakReference<Activity>> activityList=new ArrayList<>();
|
|
||||||
private int mCount;
|
private int mCount;
|
||||||
private boolean mFront;//是否前台
|
private boolean mFront;//是否前台
|
||||||
public static int jpushMsgNum;
|
public static int jpushMsgNum;
|
||||||
@@ -114,7 +111,6 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
jpushMsgNum = 0;
|
jpushMsgNum = 0;
|
||||||
CommonAppConfig.getInstance().setFrontGround(true);
|
CommonAppConfig.getInstance().setFrontGround(true);
|
||||||
}
|
}
|
||||||
activityList.add(activityWeakReference);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -135,12 +131,6 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
L.e("AppContext------->处于后台");
|
L.e("AppContext------->处于后台");
|
||||||
CommonAppConfig.getInstance().setFrontGround(false);
|
CommonAppConfig.getInstance().setFrontGround(false);
|
||||||
}
|
}
|
||||||
for (WeakReference<Activity> reference : activityList) {
|
|
||||||
if (reference.get() == activity) {
|
|
||||||
activityList.remove(reference);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.yunbao.common.bean.AnchorRecommendItemModel;
|
|||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
import com.yunbao.common.http.main.MainNetManager;
|
import com.yunbao.common.http.main.MainNetManager;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.DrawerRecommendViewHolder;
|
import com.yunbao.common.views.DrawerRecommendViewHolder;
|
||||||
import com.yunbao.common.views.DrawerTaskViewHolder;
|
import com.yunbao.common.views.DrawerTaskViewHolder;
|
||||||
import com.yunbao.common.views.FunGamesViewHolder;
|
import com.yunbao.common.views.FunGamesViewHolder;
|
||||||
@@ -121,6 +122,7 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.views.LiveSystemMessageViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播消息中心适配器
|
||||||
|
*/
|
||||||
|
public class LiveSystemMessageAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private LayoutInflater mInflater;
|
||||||
|
private List<ListInfoMessageModel> listInfoMessageModels = new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveSystemMessageAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
mInflater = LayoutInflater.from(mContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new LiveSystemMessageViewHolder(mInflater.inflate(R.layout.view_live_system_message, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
LiveSystemMessageViewHolder messageViewHolder = (LiveSystemMessageViewHolder) holder;
|
||||||
|
messageViewHolder.setViewData(listInfoMessageModels.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return listInfoMessageModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addData(List<ListInfoMessageModel> list) {
|
||||||
|
listInfoMessageModels.addAll(list);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class ListInfoMessageModel extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("title")
|
||||||
|
private String title;
|
||||||
|
@SerializedName("banner")
|
||||||
|
private String banner;
|
||||||
|
@SerializedName("content")
|
||||||
|
private String content;
|
||||||
|
@SerializedName("link")
|
||||||
|
private String link;
|
||||||
|
@SerializedName("addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBanner() {
|
||||||
|
return banner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setBanner(String banner) {
|
||||||
|
this.banner = banner;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLink() {
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setLink(String link) {
|
||||||
|
this.link = link;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会话列表展示时间
|
||||||
|
*/
|
||||||
|
public String getLastDate(String type) {
|
||||||
|
if (!TextUtils.isEmpty(addtime) && !TextUtils.equals(addtime, "0")) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
|
Date currenTimeZone;
|
||||||
|
if (TextUtils.equals(type, "-1")) {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime));
|
||||||
|
} else {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime + "000"));
|
||||||
|
}
|
||||||
|
return sdf.format(currenTimeZone);
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播数据
|
||||||
|
*/
|
||||||
|
public class LiveDataInfoModel extends BaseModel{
|
||||||
|
@SerializedName("totalCoin")
|
||||||
|
private long totalCoin;//钻石数量
|
||||||
|
@SerializedName("totalGold")
|
||||||
|
private long totalGold;//金币数量
|
||||||
|
@SerializedName("acceptNum")
|
||||||
|
private long acceptNum;//送礼人数
|
||||||
|
@SerializedName("enterNum")
|
||||||
|
private long enterNum;//进场人数
|
||||||
|
@SerializedName("attentionNum")
|
||||||
|
private long attentionNum;//关注人数
|
||||||
|
@SerializedName("fanGroupNum")
|
||||||
|
private long fanGroupNum;//粉丝团人数
|
||||||
|
@SerializedName("attentionNumRate")
|
||||||
|
private double attentionNumRate;//关注转化率
|
||||||
|
@SerializedName("fanGroupNumRate")
|
||||||
|
private double fanGroupNumRate;//粉丝团转化率
|
||||||
|
|
||||||
|
public LiveDataInfoModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalCoin() {
|
||||||
|
return totalCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalCoin(long totalCoin) {
|
||||||
|
this.totalCoin = totalCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalGold() {
|
||||||
|
return totalGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalGold(long totalGold) {
|
||||||
|
this.totalGold = totalGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAcceptNum() {
|
||||||
|
return acceptNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAcceptNum(long acceptNum) {
|
||||||
|
this.acceptNum = acceptNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getEnterNum() {
|
||||||
|
return enterNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterNum(long enterNum) {
|
||||||
|
this.enterNum = enterNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAttentionNum() {
|
||||||
|
return attentionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttentionNum(long attentionNum) {
|
||||||
|
this.attentionNum = attentionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFanGroupNum() {
|
||||||
|
return fanGroupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFanGroupNum(long fanGroupNum) {
|
||||||
|
this.fanGroupNum = fanGroupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAttentionNumRate() {
|
||||||
|
return attentionNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttentionNumRate(double attentionNumRate) {
|
||||||
|
this.attentionNumRate = attentionNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getFanGroupNumRate() {
|
||||||
|
return fanGroupNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFanGroupNumRate(double fanGroupNumRate) {
|
||||||
|
this.fanGroupNumRate = fanGroupNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveDataInfoModel{" +
|
||||||
|
"totalCoin=" + totalCoin +
|
||||||
|
", totalGold=" + totalGold +
|
||||||
|
", acceptNum=" + acceptNum +
|
||||||
|
", enterNum=" + enterNum +
|
||||||
|
", attentionNum=" + attentionNum +
|
||||||
|
", fanGroupNum=" + fanGroupNum +
|
||||||
|
", attentionNumRate=" + attentionNumRate +
|
||||||
|
", fanGroupNumRate=" + fanGroupNumRate +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
259
common/src/main/java/com/yunbao/common/bean/LiveTaskModel.java
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播任务
|
||||||
|
*/
|
||||||
|
public class LiveTaskModel extends BaseModel {
|
||||||
|
public static final int TASK_TYPE_TIP = 0;
|
||||||
|
public static final int TASK_TYPE_ITEM = 1;
|
||||||
|
|
||||||
|
int type;
|
||||||
|
@SerializedName("new")
|
||||||
|
NewUser user;
|
||||||
|
@SerializedName("list")
|
||||||
|
List<List<Task>> list;
|
||||||
|
|
||||||
|
public LiveTaskModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewUser getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(NewUser user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<List<Task>> getList() {
|
||||||
|
if (user != null && user.isNew()) {
|
||||||
|
for (List<Task> tasks : list) {
|
||||||
|
for (Task task : tasks) {
|
||||||
|
task.isNewUser = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<List<Task>> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveTaskModel{" +
|
||||||
|
"type=" + type +
|
||||||
|
", user=" + user +
|
||||||
|
", list=" + list +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class NewUser {
|
||||||
|
@SerializedName("isNew")
|
||||||
|
private int isNew;
|
||||||
|
@SerializedName("endTime")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
public NewUser() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNew() {
|
||||||
|
return isNew == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNew(int aNew) {
|
||||||
|
isNew = aNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
if (!StringUtil.isEmpty(endTime)) {
|
||||||
|
endTime = WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
|
||||||
|
}
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "NewUser{" +
|
||||||
|
"isNew=" + isNew +
|
||||||
|
", endTime='" + endTime + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Task implements Serializable {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("type")
|
||||||
|
private int type;
|
||||||
|
@SerializedName("task_type")
|
||||||
|
private int taskType;
|
||||||
|
@SerializedName("task_name")
|
||||||
|
private String taskName;
|
||||||
|
@SerializedName("task_num")
|
||||||
|
private int taskNum;
|
||||||
|
@SerializedName("hot")
|
||||||
|
private long hot;
|
||||||
|
@SerializedName("exp")
|
||||||
|
private long exp;
|
||||||
|
@SerializedName("new_hot")
|
||||||
|
private long newUserHot;
|
||||||
|
@SerializedName("new_exp")
|
||||||
|
private long newUserExp;
|
||||||
|
@SerializedName("sort")
|
||||||
|
private int sort;
|
||||||
|
@SerializedName("status")
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
@SerializedName("now_num")
|
||||||
|
private int nowValue;
|
||||||
|
|
||||||
|
private boolean isNewUser = false;
|
||||||
|
|
||||||
|
public Task() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskType() {
|
||||||
|
return taskType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskType(int taskType) {
|
||||||
|
this.taskType = taskType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskName() {
|
||||||
|
return taskName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskName(String taskName) {
|
||||||
|
this.taskName = taskName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskNum() {
|
||||||
|
return taskNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskNum(int taskNum) {
|
||||||
|
this.taskNum = taskNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getHot() {
|
||||||
|
if (isNewUser) {
|
||||||
|
hot = newUserHot;
|
||||||
|
}
|
||||||
|
return hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHot(long hot) {
|
||||||
|
this.hot = hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getExp() {
|
||||||
|
if (isNewUser) {
|
||||||
|
exp = newUserExp;
|
||||||
|
}
|
||||||
|
return exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExp(long exp) {
|
||||||
|
this.exp = exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getNewUserHot() {
|
||||||
|
return newUserHot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewUserHot(long newUserHot) {
|
||||||
|
this.newUserHot = newUserHot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getNewUserExp() {
|
||||||
|
return newUserExp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewUserExp(long newUserExp) {
|
||||||
|
this.newUserExp = newUserExp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(int sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getStatus() {
|
||||||
|
return status == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNowValue() {
|
||||||
|
return nowValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNowValue(int nowValue) {
|
||||||
|
this.nowValue = nowValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Task{" +
|
||||||
|
"id=" + id +
|
||||||
|
", type=" + type +
|
||||||
|
", taskType=" + taskType +
|
||||||
|
", taskName='" + taskName + '\'' +
|
||||||
|
", taskNum=" + taskNum +
|
||||||
|
", hot=" + hot +
|
||||||
|
", exp=" + exp +
|
||||||
|
", newUserHot=" + newUserHot +
|
||||||
|
", newUserExp=" + newUserExp +
|
||||||
|
", sort=" + sort +
|
||||||
|
", status=" + status +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
||||||
|
private final Context mContext;
|
||||||
|
|
||||||
|
public AbsDialogPopupWindow(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void buildDialog(XPopup.Builder builder);
|
||||||
|
public abstract int bindLayoutId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return bindLayoutId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showDialog() {
|
||||||
|
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||||
|
builder.isDestroyOnDismiss(true);
|
||||||
|
buildDialog(builder);
|
||||||
|
builder.asCustom(this).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
public class YoursystemisolderDialog extends AbsDialogFragment {
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.view_yoursystemisolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getDialogStyle() {
|
||||||
|
return R.style.dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canCancel() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setWindowAttributes(Window window) {
|
||||||
|
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = DpUtil.dp2px(277);
|
||||||
|
params.height = DpUtil.dp2px(134);
|
||||||
|
params.gravity = Gravity.CENTER;
|
||||||
|
window.setAttributes(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
TextView hint = (TextView) findViewById(R.id.hint);
|
||||||
|
TextView toSetUp = (TextView) findViewById(R.id.to_set_up);
|
||||||
|
TextView knowThe = (TextView) findViewById(R.id.know_the);
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.know_the), () -> dismiss());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||||
|
try {
|
||||||
|
super.show(manager, tag);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private YoursystemisolderDialog.HintListener listener;
|
||||||
|
|
||||||
|
public YoursystemisolderDialog setListener(YoursystemisolderDialog.HintListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HintListener {
|
||||||
|
void requestPermission();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -44,4 +44,14 @@ public class AnchorInfoEvent {
|
|||||||
public void setClear(boolean clear) {
|
public void setClear(boolean clear) {
|
||||||
this.clear = clear;
|
this.clear = clear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "AnchorInfoEvent{" +
|
||||||
|
"clear=" + clear +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,13 @@ import com.yunbao.common.bean.HourRank;
|
|||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
|
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||||
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||||
import com.yunbao.common.bean.NewPeopleInfo;
|
import com.yunbao.common.bean.NewPeopleInfo;
|
||||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||||
@@ -542,4 +545,34 @@ public interface PDLiveApi {
|
|||||||
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
||||||
@Query("roomid") String roomId,
|
@Query("roomid") String roomId,
|
||||||
@Query("uid") String uid);
|
@Query("uid") String uid);
|
||||||
|
|
||||||
|
@GET("/api/public/?service=Message.getListInfo")
|
||||||
|
Observable<ResponseModel<List<ListInfoMessageModel>>> getListInfo(
|
||||||
|
@Query("type") String type,
|
||||||
|
@Query("p") int p);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主播任务列表
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.getLiveTaskStatus")
|
||||||
|
Observable<ResponseModel<LiveTaskModel>> getLiveTaskList(
|
||||||
|
@Query("type") int type,
|
||||||
|
@Query("liveuid") String liveUid
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直播数据
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Live.getLiveStatisticalData")
|
||||||
|
Observable<ResponseModel<LiveDataInfoModel>> getLiveDataInfo(
|
||||||
|
@Query("liveuid") String liveUid
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直播数据
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Message.getAnchorMsg")
|
||||||
|
Observable<ResponseModel<List<ListInfoMessageModel>>> getAnchorMsg(
|
||||||
|
@Query("liveuid") String liveUid, @Query("page") int page, @Query("limit") int limit
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,13 @@ import com.yunbao.common.bean.EnterRoomNewModel;
|
|||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.bean.LinkMicUserBean;
|
import com.yunbao.common.bean.LinkMicUserBean;
|
||||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
|
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||||
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||||
import com.yunbao.common.bean.PkRankBean;
|
import com.yunbao.common.bean.PkRankBean;
|
||||||
@@ -1075,6 +1078,73 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getListInfo(String type, int p, HttpCallback<List<ListInfoMessageModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getListInfo(type, p)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直播任务
|
||||||
|
*
|
||||||
|
* @param type 1 直播任务 2粉丝任务
|
||||||
|
*/
|
||||||
|
public void getLiveTask(int type, String liveUid, HttpCallback<LiveTaskModel> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getLiveTaskList(type, liveUid)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直播数据
|
||||||
|
*/
|
||||||
|
public void getLiveData(String liveUid, HttpCallback<LiveDataInfoModel> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getLiveDataInfo(liveUid)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主播消息
|
||||||
|
*
|
||||||
|
* @param liveUid 直播间id
|
||||||
|
* @param page 页码
|
||||||
|
* @param callback 回调
|
||||||
|
*/
|
||||||
|
public void getAnchorMsg(String liveUid, int page, HttpCallback<List<ListInfoMessageModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getAnchorMsg(liveUid, page, 10)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}, throwable -> {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播间取消网络请求
|
* 直播间取消网络请求
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.yunbao.common.manager;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
@@ -40,7 +41,15 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final String IS_HINT2 = "is_hint2";
|
private final String IS_HINT2 = "is_hint2";
|
||||||
private final String SELECT_CLARITY = "selectClarity";
|
private final String SELECT_CLARITY = "selectClarity";
|
||||||
private final String CLARITY = "clarity";
|
private final String CLARITY = "clarity";
|
||||||
|
private final String xiaJBG = "xiaJBG";
|
||||||
|
|
||||||
|
public void setXiaJBG(boolean xjbg) {
|
||||||
|
put(xiaJBG, xjbg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean IsXiaJBG() {
|
||||||
|
return getBoolean(xiaJBG, false);
|
||||||
|
}
|
||||||
|
|
||||||
public void setClarity(String clarity) {
|
public void setClarity(String clarity) {
|
||||||
put(CLARITY, clarity);
|
put(CLARITY, clarity);
|
||||||
@@ -276,11 +285,12 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMountEffect() {
|
public boolean isMountEffect() {
|
||||||
return getBoolean(MountEffect, true);
|
|
||||||
|
return getBoolean(MountEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isGiftEffect() {
|
public boolean isGiftEffect() {
|
||||||
return getBoolean(GiftEffect, true);
|
return getBoolean(GiftEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.os.Looper;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.RankPkInfoBean;
|
import com.yunbao.common.bean.RankPkInfoBean;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
@@ -341,7 +342,7 @@ public class RandomPkManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class JavascriptInterfaceUtils {
|
|||||||
private boolean dialogClose = false;
|
private boolean dialogClose = false;
|
||||||
//同名activity跳转问题
|
//同名activity跳转问题
|
||||||
private boolean LiveZhuangBana = true;
|
private boolean LiveZhuangBana = true;
|
||||||
//private static JavascriptInterfaceUtils sInstance;
|
private static JavascriptInterfaceUtils sInstance;
|
||||||
|
|
||||||
public JavascriptInterfaceUtils setPageClose(boolean pageClose) {
|
public JavascriptInterfaceUtils setPageClose(boolean pageClose) {
|
||||||
this.pageClose = pageClose;
|
this.pageClose = pageClose;
|
||||||
@@ -67,9 +67,9 @@ public class JavascriptInterfaceUtils {
|
|||||||
|
|
||||||
synchronized (JavascriptInterfaceUtils.class) {
|
synchronized (JavascriptInterfaceUtils.class) {
|
||||||
|
|
||||||
// sInstance = new JavascriptInterfaceUtils();
|
sInstance = new JavascriptInterfaceUtils();
|
||||||
|
|
||||||
return new JavascriptInterfaceUtils();
|
return sInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.yunbao.common.utils;
|
package com.yunbao.common.utils;
|
||||||
|
|
||||||
import static android.provider.Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION;
|
import static android.provider.Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION;
|
||||||
import static androidx.core.content.PermissionChecker.PERMISSION_GRANTED;
|
|
||||||
import static java.text.DateFormat.DEFAULT;
|
import static java.text.DateFormat.DEFAULT;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.app.Dialog;
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -14,10 +12,10 @@ import android.os.Environment;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.core.app.ActivityCompat;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
import androidx.core.content.PermissionChecker;
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.callback.StringCallback;
|
import com.lzy.okgo.callback.StringCallback;
|
||||||
import com.lzy.okgo.model.Progress;
|
import com.lzy.okgo.model.Progress;
|
||||||
@@ -31,7 +29,6 @@ import com.yunbao.common.CommonAppConfig;
|
|||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -42,11 +39,20 @@ import java.nio.file.Files;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
import okhttp3.Call;
|
||||||
|
import okhttp3.Callback;
|
||||||
|
import okhttp3.MediaType;
|
||||||
|
import okhttp3.MultipartBody;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2019/6/20.
|
* Created by cxf on 2019/6/20.
|
||||||
*/
|
*/
|
||||||
@@ -150,13 +156,17 @@ public class LogUtil {
|
|||||||
|
|
||||||
|
|
||||||
public static void shareFile(Context context) {
|
public static void shareFile(Context context) {
|
||||||
if(true){
|
try {
|
||||||
|
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (PermissionChecker.checkCallingOrSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
|
} catch (Exception e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* if (PermissionChecker.checkCallingOrSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions((Activity) context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 100);
|
ActivityCompat.requestPermissions((Activity) context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 100);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||||
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||||
@@ -184,6 +194,17 @@ public class LogUtil {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (zip.exists()) {
|
if (zip.exists()) {
|
||||||
|
DialogUitl.showSimpleDialog(context, "上报日志", new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
uploadLog(zip);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
dialog.dismiss();
|
||||||
|
ToastUtil.show("OK");
|
||||||
Intent share = new Intent(Intent.ACTION_SEND);
|
Intent share = new Intent(Intent.ACTION_SEND);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
Uri contentUri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", zip);
|
Uri contentUri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", zip);
|
||||||
@@ -211,6 +232,52 @@ public class LogUtil {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static String TAG="Upload";
|
||||||
|
private static void uploadLog(File log) {
|
||||||
|
|
||||||
|
JSONObject body = new JSONObject();
|
||||||
|
|
||||||
|
MultipartBody requestBody = new MultipartBody.Builder()
|
||||||
|
.addFormDataPart("uid", CommonAppConfig.getInstance().getUid())
|
||||||
|
.addFormDataPart("time", new SimpleDateFormat("yyyy-DD-mm HH:mm:ss", Locale.getDefault()).format(new Date()))
|
||||||
|
.addFormDataPart("isGoogle", CommonAppConfig.IS_GOOGLE_PLAY+"")
|
||||||
|
.addFormDataPart("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||||
|
.addFormDataPart("file","file", RequestBody.create(MediaType.parse("application/octet-stream"),log)) //上报日志文件
|
||||||
|
.build();
|
||||||
|
|
||||||
|
body.put("uid", CommonAppConfig.getInstance().getUid());
|
||||||
|
body.put("time", new SimpleDateFormat("yyyy-DD-mm HH:mm:ss", Locale.getDefault()).format(new Date()));
|
||||||
|
body.put("isGoogle", CommonAppConfig.IS_GOOGLE_PLAY);
|
||||||
|
body.put("appVersion", CommonAppConfig.getInstance().getVersion());
|
||||||
|
|
||||||
|
OkHttpClient client = new OkHttpClient.Builder()
|
||||||
|
.connectTimeout(3, TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
|
Request request = new Request.Builder()
|
||||||
|
//.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
|
||||||
|
.url("https://tools.yutou233.cn/public/file/request.do")//临时上报地址,可接受文件
|
||||||
|
.post(requestBody)
|
||||||
|
.build();
|
||||||
|
client.newCall(request)
|
||||||
|
.enqueue(new Callback() {
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call call, @NonNull IOException e) {
|
||||||
|
Log.e(TAG, "error",e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call call, okhttp3.Response response) throws IOException {
|
||||||
|
String body = response.body().string();
|
||||||
|
Log.i(TAG, "onResponse: "+body);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,15 @@ public class RouteUtil {
|
|||||||
.withBoolean("forwardEntry", true)
|
.withBoolean("forwardEntry", true)
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 只回到登录页,不提示东西
|
||||||
|
*/
|
||||||
|
public static void forwardEntry2() {
|
||||||
|
ARouter.getInstance().build(PATH_ENTRY)
|
||||||
|
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||||
|
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转到个人主页
|
* 跳转到个人主页
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.adapter.LiveSystemMessageAdapter;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.OnRecyclerViewScrollListener;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播消息中心
|
||||||
|
*/
|
||||||
|
public class LiveAnchorMessageCustomPopup extends BottomPopupView {
|
||||||
|
private LiveSystemMessageAdapter adapter;
|
||||||
|
private RecyclerView liveMessage;
|
||||||
|
private String liveUid;
|
||||||
|
private int page = 1, size = 0;
|
||||||
|
|
||||||
|
public LiveAnchorMessageCustomPopup(@NonNull Context context, String liveUid) {
|
||||||
|
super(context);
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAnchorMessageCustomPopup(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回自定义弹窗的布局
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.dialog_live_anchor_message;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
initView();
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initDate() {
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getAnchorMsg(liveUid, page, new HttpCallback<List<ListInfoMessageModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<ListInfoMessageModel> data) {
|
||||||
|
size = data.size();
|
||||||
|
|
||||||
|
if (page == 1 && size == 0) {
|
||||||
|
liveMessage.setVisibility(GONE);
|
||||||
|
findViewById(R.id.img_no_new).setVisibility(VISIBLE);
|
||||||
|
} else {
|
||||||
|
findViewById(R.id.img_no_new).setVisibility(GONE);
|
||||||
|
liveMessage.setVisibility(VISIBLE);
|
||||||
|
adapter.addData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
liveMessage = findViewById(R.id.live_message);
|
||||||
|
liveMessage.setHasFixedSize(false);
|
||||||
|
liveMessage.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||||
|
adapter = new LiveSystemMessageAdapter(getContext());
|
||||||
|
liveMessage.setAdapter(adapter);
|
||||||
|
liveMessage.addOnScrollListener(new OnRecyclerViewScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onBottom() {
|
||||||
|
if (size > 0) {
|
||||||
|
page = page + 1;
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -142,7 +142,7 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.cardview.widget.CardView;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
|
||||||
|
public class LiveSystemMessageViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView titleText, timeText, contextLayout, toView;
|
||||||
|
private CardView bannerCard;
|
||||||
|
private ImageView bannerImage;
|
||||||
|
|
||||||
|
public LiveSystemMessageViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
titleText = itemView.findViewById(R.id.title_text);
|
||||||
|
timeText = itemView.findViewById(R.id.time_text);
|
||||||
|
contextLayout = itemView.findViewById(R.id.context_layout);
|
||||||
|
toView = itemView.findViewById(R.id.to_view);
|
||||||
|
bannerCard = itemView.findViewById(R.id.banner_card);
|
||||||
|
bannerImage = itemView.findViewById(R.id.banner_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViewData(ListInfoMessageModel model) {
|
||||||
|
titleText.setText(model.getTitle());
|
||||||
|
timeText.setText(model.getLastDate("1"));
|
||||||
|
if (TextUtils.isEmpty(model.getBanner())) {
|
||||||
|
bannerCard.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
bannerCard.setVisibility(View.VISIBLE);
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getBanner(), bannerImage);
|
||||||
|
}
|
||||||
|
contextLayout.setText(model.getContent());
|
||||||
|
if (TextUtils.isEmpty(model.getLink())) {
|
||||||
|
toView.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
toView.setVisibility(View.VISIBLE);
|
||||||
|
toView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
RouteUtil.forwardLiveZhuangBanActivity(model.getLink(), false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -44,7 +44,7 @@ public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
|||||||
@Override
|
@Override
|
||||||
public void onNetStatus(Bundle bundle) {
|
public void onNetStatus(Bundle bundle) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(magnetView.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(magnetView.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
|||||||
5
common/src/main/res/drawable/bg_live_anchor.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="13dp"/>
|
||||||
|
<solid android:color="#b3000000"/>
|
||||||
|
</shape>
|
||||||
7
common/src/main/res/drawable/bg_live_anchor_message.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="8dp"
|
||||||
|
android:topRightRadius="8dp" />
|
||||||
|
<solid android:color="#F4F7FC" />
|
||||||
|
</shape>
|
||||||
5
common/src/main/res/drawable/selector_protocol_check.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/icon_protocol_check" android:state_selected="true" />
|
||||||
|
<item android:drawable="@mipmap/icon_protocol_uncheck" android:state_selected="false" />
|
||||||
|
</selector>
|
||||||
30
common/src/main/res/layout/dialog_live_anchor_message.xml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="400dp"
|
||||||
|
android:background="@drawable/bg_live_anchor_message"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="18dp"
|
||||||
|
android:text="@string/message"
|
||||||
|
android:textColor="@color/black3"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/live_message"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_no_new"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:src="@mipmap/img_no_new" />
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,11 +1,112 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout 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:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="6dp"
|
||||||
|
android:layout_height="6dp"
|
||||||
|
app:cardBackgroundColor="#FF4E4E"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="0dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/live_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="00:00"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/broadcast_data"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@mipmap/live_icon_data" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:text="@string/broadcast_data"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/message_linear"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@mipmap/live_icon_news" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:text="@string/message"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_live_tota"
|
android:background="@drawable/bg_live_tota"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -28,10 +129,33 @@
|
|||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:paddingEnd="16dp">
|
android:paddingEnd="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/anchor_task"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_task" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/anchor_task"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/live_tool_wish"
|
android:id="@+id/live_tool_wish"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@@ -95,6 +219,7 @@
|
|||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/live_tool_robot"
|
android:id="@+id/live_tool_robot"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -213,6 +338,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -278,6 +404,7 @@
|
|||||||
android:textColor="#FF9A9A9A"
|
android:textColor="#FF9A9A9A"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/live_tool_random_pk"
|
android:id="@+id/live_tool_random_pk"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -325,5 +452,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
94
common/src/main/res/layout/view_live_system_message.xml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView 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="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
app:cardBackgroundColor="@color/white"
|
||||||
|
app:cardCornerRadius="15dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="通知標題標題通知標題標題"
|
||||||
|
android:textColor="#ff161616"
|
||||||
|
android:textSize="17sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/time_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="19dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:text="2-24 17:00"
|
||||||
|
android:textColor="#ff8c8c8c"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/banner_card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="102dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/banner_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="centerCrop" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/context_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:text="內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容。"
|
||||||
|
android:textColor="#B1B1B1"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/to_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:drawableEnd="@mipmap/icon_more"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/click_to_view"
|
||||||
|
android:textColor="#ff8c8c8c"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
56
common/src/main/res/layout/view_yoursystemisolder.xml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView 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="277dp"
|
||||||
|
android:layout_height="133.67dp"
|
||||||
|
app:cardBackgroundColor="@color/white"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:cardPreventCornerOverlap="true"
|
||||||
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/hint"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16.33dp"
|
||||||
|
android:layout_marginTop="24.67dp"
|
||||||
|
android:text="@string/yoursystemisolder"
|
||||||
|
android:textColor="#161616"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginEnd="33.67dp"
|
||||||
|
android:layout_marginBottom="23.67dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/to_set_up"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/to_set_up"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:textColor="#B1B1B1"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/know_the"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23.33dp"
|
||||||
|
android:text="@string/know_the"
|
||||||
|
android:textColor="#FFAF08"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
BIN
common/src/main/res/mipmap-xxhdpi/icon_protocol_check.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_protocol_uncheck.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_data.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_news.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_task.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@@ -168,6 +168,9 @@
|
|||||||
<string name="guard_buy_2">Open guard</string>
|
<string name="guard_buy_2">Open guard</string>
|
||||||
<string name="guard_buy_3">Renewal Guardian</string>
|
<string name="guard_buy_3">Renewal Guardian</string>
|
||||||
<string name="guard_my">My</string>
|
<string name="guard_my">My</string>
|
||||||
|
<string name="theguardianof">Become the guardian of %s</string>
|
||||||
|
<string name="favoriteanchor">Open a guard for your favorite anchor</string>
|
||||||
|
<string name="guardiandate">The guardian date expires at: %s</string>
|
||||||
<string name="get">GET</string>
|
<string name="get">GET</string>
|
||||||
<string name="only_one">Only one can be given away~</string>
|
<string name="only_one">Only one can be given away~</string>
|
||||||
<string name="guard_guard">Guard</string>
|
<string name="guard_guard">Guard</string>
|
||||||
@@ -845,8 +848,8 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="hurry_contact">Contact a mentor now!</string>
|
<string name="hurry_contact">Contact a mentor now!</string>
|
||||||
<string name="withdraw_success">Withdrawal succeeded</string>
|
<string name="withdraw_success">Withdrawal succeeded</string>
|
||||||
<string name="normal_barrage">normal barrage</string>
|
<string name="normal_barrage">normal barrage</string>
|
||||||
<string name="floating_screen">floating screen</string>
|
<string name="floating_screen">Float barrage</string>
|
||||||
<string name="whole_station_horn">Whole station horn</string>
|
<string name="whole_station_horn">Total speaker</string>
|
||||||
<string name="quote">quote</string>
|
<string name="quote">quote</string>
|
||||||
<string name="whole_station_horn_hint">Available times: %s Note: Update times at 4:00 am on the 1st of each month</string>
|
<string name="whole_station_horn_hint">Available times: %s Note: Update times at 4:00 am on the 1st of each month</string>
|
||||||
<string name="cannot_be_empty">Content cannot be empty</string>
|
<string name="cannot_be_empty">Content cannot be empty</string>
|
||||||
@@ -882,7 +885,8 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="system_notice">Notice</string>
|
<string name="system_notice">Notice</string>
|
||||||
<string name="online_service">Online Service</string>
|
<string name="online_service">Online Service</string>
|
||||||
<string name="popular_tickets">Hot Ticket</string>
|
<string name="popular_tickets">Hot Ticket</string>
|
||||||
|
<string name="register_and_log_in">Register and log in</string>
|
||||||
|
<string name="sign_up_for">Sign up for PD LIVE</string>
|
||||||
<string name="tell_the_world">Tell the world!</string>
|
<string name="tell_the_world">Tell the world!</string>
|
||||||
<string name="better_emperor_hint">Tell the world! %s recommends anchor %s to everyone!</string>
|
<string name="better_emperor_hint">Tell the world! %s recommends anchor %s to everyone!</string>
|
||||||
<string name="emperor_hint">Tell the world! %s recommends the anchor %s to everyone, and the splendid glance is amazing!</string>
|
<string name="emperor_hint">Tell the world! %s recommends the anchor %s to everyone, and the splendid glance is amazing!</string>
|
||||||
@@ -895,13 +899,13 @@ Limited ride And limited avatar frame</string>
|
|||||||
|
|
||||||
<string name="onlookers">onlookers</string>
|
<string name="onlookers">onlookers</string>
|
||||||
<string name="open_noble">The live broadcast studio was opened</string>
|
<string name="open_noble">The live broadcast studio was opened</string>
|
||||||
<string name="baron">baron</string>
|
<string name="baron">Baron</string>
|
||||||
<string name="viscount">viscount</string>
|
<string name="viscount">Viscount</string>
|
||||||
<string name="marquis">The marquis DE</string>
|
<string name="marquis">Marquis</string>
|
||||||
<string name="duke">The duke</string>
|
<string name="duke">Duke</string>
|
||||||
<string name="king">The king</string>
|
<string name="king">King</string>
|
||||||
<string name="emperor">The emperor</string>
|
<string name="emperor">Emperor</string>
|
||||||
<string name="better_emperor">Super huang</string>
|
<string name="better_emperor">Super king</string>
|
||||||
<string name="login_wait">Please wait...</string>
|
<string name="login_wait">Please wait...</string>
|
||||||
<string name="slide_settings">The slide set</string>
|
<string name="slide_settings">The slide set</string>
|
||||||
<string name="up_slide_settings">Slide up and down to switch the broadcast room</string>
|
<string name="up_slide_settings">Slide up and down to switch the broadcast room</string>
|
||||||
@@ -916,16 +920,26 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="star_change">%sStar challenge</string>
|
<string name="star_change">%sStar challenge</string>
|
||||||
<string name="star_success">Congratulations %s, completed %s %s star challenge, go to meet the host face!</string>
|
<string name="star_success">Congratulations %s, completed %s %s star challenge, go to meet the host face!</string>
|
||||||
<string name="star">star</string>
|
<string name="star">star</string>
|
||||||
|
<string name="favorite_host_fan">Join your favorite host fan club</string>
|
||||||
<string name="small_window_settings">Small window play Settings</string>
|
<string name="small_window_settings">Small window play Settings</string>
|
||||||
<string name="small_window">Small window to play</string>
|
<string name="small_window">Small window to play</string>
|
||||||
<string name="app_window">Minimize Play</string>
|
<string name="app_window">Minimize Play</string>
|
||||||
|
<string name="Continue_to_guard">Continue to guard</string>
|
||||||
|
<string name="Join_a_fan_club">Join Fan club</string>
|
||||||
|
<string name="daemon_list">Daemon list</string>
|
||||||
|
<string name="guard_tip_day1">You are the weekly guardian of the current anchor</string>
|
||||||
|
<string name="guard_tip_day2">You are the monthly guardian of the current anchor</string>
|
||||||
|
<string name="guard_tip_day3">You are the annual guardian of the current anchor</string>
|
||||||
<string name="app_window_hint">Show when exiting the live room</string>
|
<string name="app_window_hint">Show when exiting the live room</string>
|
||||||
<string name="system_window">ALL Minimize Play</string>
|
<string name="system_window">ALL Minimize Play</string>
|
||||||
|
<string name="waiting_for_you">Anchor is waiting for you to become the guardian of TA, \n escort for TA!</string>
|
||||||
|
<string name="guard_for_your">Open a guard for your favorite anchor</string>
|
||||||
<string name="system_window_hint">Show on other apps and pages \n Need to open the display</string>
|
<string name="system_window_hint">Show on other apps and pages \n Need to open the display</string>
|
||||||
<string name="to_open_the">Go to open</string>
|
<string name="to_open_the">Go to open</string>
|
||||||
<string name="do_you_like">Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings]</string>
|
<string name="do_you_like">Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings]</string>
|
||||||
<string name="to_set_up">Go to Settings</string>
|
<string name="to_set_up">Go to Settings</string>
|
||||||
<string name="know_the">Got it</string>
|
<string name="know_the">Got it</string>
|
||||||
|
<string name="enjoy_a_lot">Open noble, enjoy a lot of privileges!</string>
|
||||||
<string name="individual_set">Personal Settings</string>
|
<string name="individual_set">Personal Settings</string>
|
||||||
<string name="reward">Rewards</string>
|
<string name="reward">Rewards</string>
|
||||||
<string name="change_the_password">Change password</string>
|
<string name="change_the_password">Change password</string>
|
||||||
@@ -938,14 +952,14 @@ Limited ride And limited avatar frame</string>
|
|||||||
|
|
||||||
<string name="in_batch">In a batch</string>
|
<string name="in_batch">In a batch</string>
|
||||||
<string name="chat_chat">Chat</string>
|
<string name="chat_chat">Chat</string>
|
||||||
<string name="lucky_angel" >Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
|
<string name="lucky_angel">Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
|
||||||
<string name="lucky_100" >Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
|
<string name="lucky_100">Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
|
||||||
<string name="user_card_guard" >Guardian group %s people</string>
|
<string name="user_card_guard">Guardian group %s people</string>
|
||||||
<string name="to_receive" >receive</string>
|
<string name="to_receive">receive</string>
|
||||||
<string name="to_complete" >To complete</string>
|
<string name="to_complete">To complete</string>
|
||||||
<string name="already_collected" >Already collected</string>
|
<string name="already_collected">Already collected</string>
|
||||||
<string name="image_quality_selection" >Image quality selection</string>
|
<string name="image_quality_selection">Image quality selection</string>
|
||||||
<string name="more_settings" >More Settings</string>
|
<string name="more_settings">More Settings</string>
|
||||||
<string name="moer">view more</string>
|
<string name="moer">view more</string>
|
||||||
<string name="gift_way">The gift is on the way...</string>
|
<string name="gift_way">The gift is on the way...</string>
|
||||||
<string name="start_pk">The gift is on the way</string>
|
<string name="start_pk">The gift is on the way</string>
|
||||||
@@ -955,51 +969,124 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="end_pk">End \nPK</string>
|
<string name="end_pk">End \nPK</string>
|
||||||
<string name="pk_time">Time %s</string>
|
<string name="pk_time">Time %s</string>
|
||||||
|
|
||||||
<string name="random_pk_dialog_apply" >accept</string>
|
<string name="random_pk_dialog_apply">accept</string>
|
||||||
<string name="random_pk_dialog_refuse" >refuse</string>
|
<string name="random_pk_dialog_refuse">refuse</string>
|
||||||
<string name="random_pk_dialog_refuse_again" >Persist in refusing</string>
|
<string name="random_pk_dialog_refuse_again">Persist in refusing</string>
|
||||||
<string name="random_pk_dialog_title" >Random PK hint</string>
|
<string name="random_pk_dialog_title">Random PK hint</string>
|
||||||
|
|
||||||
<string name="speech_robot_setup" >Automatic speech robot setup</string>
|
<string name="speech_robot_setup">Automatic speech robot setup</string>
|
||||||
<string name="robot_switch" >Robot switch</string>
|
<string name="robot_switch">Robot switch</string>
|
||||||
<string name="robot_name_setting" >Robot name setting</string>
|
<string name="robot_name_setting">Robot name setting</string>
|
||||||
<string name="word_limit" >The word limit is 2 to 8 word</string>
|
<string name="word_limit">The word limit is 2 to 8 word</string>
|
||||||
<string name="automatic_greeting_setting" >Automatic greeting setting</string>
|
<string name="automatic_greeting_setting">Automatic greeting setting</string>
|
||||||
<string name="configured_items" >Number of configured items</string>
|
<string name="configured_items">Number of configured items</string>
|
||||||
<string name="automatic_message_sending" >Set automatic message sending</string>
|
<string name="automatic_message_sending">Set automatic message sending</string>
|
||||||
<string name="robot_go_setting" >Go to set</string>
|
<string name="robot_go_setting">Go to set</string>
|
||||||
<string name="robot_hint" >Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization.</string>
|
<string name="robot_hint">Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization.</string>
|
||||||
<string name="robot_add_content" >Add content</string>
|
<string name="robot_add_content">Add content</string>
|
||||||
<string name="robot_add_content_hint1" >At regular intervals, the robot automatically says the following sentence at random。</string>
|
<string name="robot_add_content_hint1">At regular intervals, the robot automatically says the following sentence at random。</string>
|
||||||
<string name="robot_add_content_hint2" >Fill in the content recommendation, such as: send wish list, add fan group, etc</string>
|
<string name="robot_add_content_hint2">Fill in the content recommendation, such as: send wish list, add fan group, etc</string>
|
||||||
<string name="robot_automatic_speech_interval" >Automatic speech interval (minutes)</string>
|
<string name="robot_automatic_speech_interval">Automatic speech interval (minutes)</string>
|
||||||
<string name="robot_minimum_interval" >At least once every 5 minutes</string>
|
<string name="robot_minimum_interval">At least once every 5 minutes</string>
|
||||||
<string name="robot_add_content_hint3" >When a user enters the studio, the robot will @the user and automatically</string>
|
<string name="robot_add_content_hint3">When a user enters the studio, the robot will @the user and automatically</string>
|
||||||
<string name="robot_add_content_hint4" >The following sentence is random. Set a minimum of 1 to a maximum of 20.</string>
|
<string name="robot_add_content_hint4">The following sentence is random. Set a minimum of 1 to a maximum of 20.</string>
|
||||||
<string name="robot_setup" >Robot setup</string>
|
<string name="robot_setup">Robot setup</string>
|
||||||
<string name="high_definition" >High definition</string>
|
<string name="high_definition">High definition</string>
|
||||||
<string name="standard_clear" >fluency</string>
|
<string name="standard_clear">fluency</string>
|
||||||
<string name="ultra_hd" >Ultra hd</string>
|
<string name="ultra_hd">Ultra hd</string>
|
||||||
<string name="clarity_hint" >After determining the definition of the broadcast, you need to restart the broadcast to change</string>
|
<string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string>
|
||||||
<string name="confirmation_of_broadcast" >Confirmation of broadcast Settings</string>
|
<string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string>
|
||||||
<string name="clarity" >clarity</string>
|
<string name="clarity">clarity</string>
|
||||||
<string name="live_class1" >Live channel</string>
|
<string name="live_class1">Live channel</string>
|
||||||
<string name="broadcast" >broadcast</string>
|
<string name="broadcast">broadcast</string>
|
||||||
<string name="robot" >robot</string>
|
<string name="robot">robot</string>
|
||||||
<string name="do_set" >set</string>
|
<string name="do_set">set</string>
|
||||||
<string name="not_set" >Not set</string>
|
<string name="not_set">Not set</string>
|
||||||
<string name="robot_no" >no</string>
|
<string name="robot_no">no</string>
|
||||||
<string name="robot_yes" >yes</string>
|
<string name="robot_yes">yes</string>
|
||||||
<string name="ultra_hd_hint" >Ultra HD hint</string>
|
<string name="ultra_hd_hint">Ultra HD hint</string>
|
||||||
<string name="ultra_hd_hint2" >In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection?</string>
|
<string name="ultra_hd_hint2">In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection?</string>
|
||||||
<string name="stick_to_choice" >Stick to choice</string>
|
<string name="stick_to_choice">Stick to choice</string>
|
||||||
<string name="net_hint" >Network prompt</string>
|
<string name="net_hint">Network prompt</string>
|
||||||
<string name="net_hint2" >The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity.</string>
|
<string name="net_hint2">The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity.</string>
|
||||||
<string name="check_the_new_version" >check version</string>
|
<string name="check_the_new_version">check version</string>
|
||||||
<string name="discover_a_new_version" >Update</string>
|
<string name="discover_a_new_version">Update</string>
|
||||||
<string name="latest_version" >Latest Version</string>
|
<string name="latest_version">Latest Version</string>
|
||||||
<string name="updating" >updating</string>
|
<string name="updating">updating</string>
|
||||||
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
<string name="live_user_ban_fhd">There is no choice, the anchor is not turned on FHD live.</string>
|
||||||
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
<string name="live_user_ban_hd">There is no choice, the anchor is not turned on HD live.</string>
|
||||||
<string name="function_is_suspended" >Sorry, this feature is on hold.</string>
|
<string name="function_is_suspended">Sorry, this feature is on hold.</string>
|
||||||
|
<string name="phone_number">phone</string>
|
||||||
|
<string name="broadcast_data">Broadcast</string>
|
||||||
|
<string name="click_to_view">Click To View</string>
|
||||||
|
<string name="anchor_task">Anchor Task</string>
|
||||||
|
<string name="anchor_agreement">I have read and agreed to the </string>
|
||||||
|
<string name="anchor_agreement_hint">Please read and agree to the PDLIVE Host Agreement</string>
|
||||||
|
<string name="anchor_hint">PDLIVE Host Agreement</string>
|
||||||
|
<string name="live_task_new_user_timer">The statute of limitations for new anchors expires</string>
|
||||||
|
<string name="live_data_coin">coin</string>
|
||||||
|
<string name="live_data_gold">gold</string>
|
||||||
|
<string name="live_data_accept">Number of gifts</string>
|
||||||
|
<string name="live_data_enter">Number of entry</string>
|
||||||
|
<string name="live_data_attention">New attention</string>
|
||||||
|
<string name="live_data_attention_rate">Follow the conversion rate</string>
|
||||||
|
<string name="live_data_fan_group">New fan group</string>
|
||||||
|
<string name="live_data_fan_group_rate">Fan group conversion rate</string>
|
||||||
|
<string name="live_data_loading">loading…</string>
|
||||||
|
<string name="yoursystemisolder">Gift and seat effects have been turned off and can be turned on manually in "Settings".</string>
|
||||||
|
<string name="net_error">i \'m sorry! An error occurred.</string>
|
||||||
|
<string name="getting_it">Congratulations on getting it!</string>
|
||||||
|
<string name="this_month">You have accumulated sign-ups this month %s Heaven</string>
|
||||||
|
<string name="more_day_to">Sign in for 1 more day to get extra bonus.</string>
|
||||||
|
<string name="sign_in_to_the_center">Sign in to the center」</string>
|
||||||
|
<string name="go_to_the">Go to the「Sign-in Center」to get extra rewards!</string>
|
||||||
|
<string name="sign_in_center">Sign-in Center</string>
|
||||||
|
<string name="to_top">Back to top</string>
|
||||||
|
<string name="go_to_the_sign">Go to the sign-in center</string>
|
||||||
|
<string name="confirm_pick_up">Confirm pick up</string>
|
||||||
|
<string name="customer_service2">Unable to login? Click here to contact customer service</string>
|
||||||
|
<string name="next_step_is_consent">By logging in, you agree to the Terms of</string>
|
||||||
|
<string name="user_protocol2"> Service</string>
|
||||||
|
<string name="and">and</string>
|
||||||
|
<string name="privacy_terms">Privacy</string>
|
||||||
|
<string name="terms_and_policies">Terms and policies</string>
|
||||||
|
<string name="install_the_application">For details, please read the following message to install the application:</string>
|
||||||
|
<string name="treat_and_protect">Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection.</string>
|
||||||
|
<string name="anti_cheating_services">In order to provide you with one-click sharing service, our product integrates Mob+U-Share SDK, The Mob+SDK needs to collect your device Mac address, unique device identifier (1MEIandroid IDIDFAOPENUDIDGUID, SIM card IMSI information), and public social account information that you need to share in order to complete the one-click sharing service. And through the geographical location calibration report data accuracy, provide basic anti-cheating services. For the sake of your information security, we have made data security and confidentiality agreements with third-party SDK service providers, and these companies will strictly abide by our data privacy and security requirements. We will not share your personally identifiable information with them unless we have your consent. To facilitate you better understand/Mob + data types and USES, and how to protect your personal information, you can log on to https:www.mob.com aboutpolicy understand [Mob +] privacy policy).</string>
|
||||||
|
<string name="read_and_agre">Clicking Agree means you have read and agree to all of the above.。</string>
|
||||||
|
<string name="agreement">agreement</string>
|
||||||
|
<string name="come_to">Welcome to PD LIVE.</string>
|
||||||
|
<string name="live_gift">gift</string>
|
||||||
|
<string name="register_tip_2">User service agreement</string>
|
||||||
|
<string name="live_fans_medal_pri_des">一 Fan privilege 一</string>
|
||||||
|
<string name="live_item_gift_name">Gift name</string>
|
||||||
|
<string name="live_medal_name">True love ranking</string>
|
||||||
|
<string name="register_tip_4">and</string>
|
||||||
|
<string name="live_medal_des1">Speech memo</string>
|
||||||
|
<string name="register_tip_3">Privacy policy</string>
|
||||||
|
<string name="live_medal_des2">Daily gift pack</string>
|
||||||
|
<string name="live_send_gift_4">To one\'s liking</string>
|
||||||
|
<string name="live_send_buy_guard_1">Opened a pair of</string>
|
||||||
|
<string name="live_send_buy_guard_2">guard</string>
|
||||||
|
<string name="live_send_buy_zuoji_1">I bought a ride</string>
|
||||||
|
<string name="live_send_buy_liang_name_1">Purchased a beautiful number</string>
|
||||||
|
<string name="live_send_buy_vip_1">VIP</string>
|
||||||
|
<string name="live_random">Random PK</string>
|
||||||
|
<string name="live_medal_des3">VIP seating</string>
|
||||||
|
<string name="live_medal_des5">True love ranking</string>
|
||||||
|
<string name="live_set_wishlist_num">Please enter the number</string>
|
||||||
|
<string name="guard_tip_day">You are the current anchor whose weekly guardian \n guardian date is up</string>
|
||||||
|
<string name="wallet_gold_name">My %1$s:</string>
|
||||||
|
<string name="charge_explain">Top-up instructions</string>
|
||||||
|
<string name="register_tip_1">Registration means consent</string>
|
||||||
|
<string name="live_become_fans_medal">One-time gift ≥2000 diamonds), can obtain fan privilege yo</string>
|
||||||
|
<string name="live_go_charge">Top up</string>
|
||||||
|
<string name="live_user_card_level">User level</string>
|
||||||
|
<string name="live_noble_level_anchor">aristocracy</string>
|
||||||
|
<string name="live_noble_fens_anchor">Fan club</string>
|
||||||
|
<string name="live_anchor_open_mic">Voice connection is not enabled</string>
|
||||||
|
<string name="live_honor_number_anchor">Wall of honor</string>
|
||||||
|
<string name="live_medal_des4">Get a fan badge for giving gifts</string>
|
||||||
|
<string name="clear_unread_messages">Whether to clear unread messages</string>
|
||||||
|
<string name="support_login">The application collects location data to support login and registration functions.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
1091
common/src/main/res/values-zh-rHK/strings.xml
Normal file
1091
common/src/main/res/values-zh-rTW/strings.xml
Normal file
1091
common/src/main/res/values-zh/strings.xml
Normal file
@@ -4,15 +4,14 @@ ext {
|
|||||||
buildToolsVersion: "29.0.2",
|
buildToolsVersion: "29.0.2",
|
||||||
minSdkVersion : 21,
|
minSdkVersion : 21,
|
||||||
targetSdkVersion : 31,
|
targetSdkVersion : 31,
|
||||||
versionCode : 405,
|
versionCode : 413,
|
||||||
versionName : "6.4.8"
|
versionName : "6.4.9"
|
||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式
|
//正式、
|
||||||
|
// serverHost : "https://napi.yaoulive.com",
|
||||||
serverHost : "https://napi.yaoulive.com",
|
//测试
|
||||||
//
|
serverHost : "https://ceshi.yaoulive.com",
|
||||||
// serverHost : "https://ceshi.yaoulive.com",
|
|
||||||
|
|
||||||
//腾讯地图
|
//腾讯地图
|
||||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
@@ -23,7 +22,6 @@ ext {
|
|||||||
baiduAppId : "23774720",
|
baiduAppId : "23774720",
|
||||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||||
|
|
||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
isGooglePlay : false,
|
isGooglePlay : false,
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#Thu Feb 04 00:05:45 CST 2021
|
#Thu Feb 04 00:05:45 CST 2021
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||||
|
|
||||||
|
|||||||
@@ -866,7 +866,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
|
|
||||||
private void showTaskDialog() {
|
private void showTaskDialog() {
|
||||||
final Dialog dialog = new Dialog(LiveActivity.this, com.yunbao.live.R.style.dialog);
|
final Dialog dialog = new Dialog(LiveActivity.this, com.yunbao.live.R.style.dialog);
|
||||||
dialog.setContentView(R.layout.dialog_task);
|
dialog.setContentView(R.layout.dialog_live_task);
|
||||||
dialog.setCancelable(true);
|
dialog.setCancelable(true);
|
||||||
dialog.setCanceledOnTouchOutside(true);
|
dialog.setCanceledOnTouchOutside(true);
|
||||||
|
|
||||||
@@ -1288,6 +1288,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
Log.e("LiveUserMoreDialog", error);
|
Log.e("LiveUserMoreDialog", error);
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.app.Dialog;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@@ -20,6 +21,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
import androidx.core.view.WindowInsetsControllerCompat;
|
import androidx.core.view.WindowInsetsControllerCompat;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
@@ -52,6 +54,7 @@ import com.yunbao.common.dialog.EffectsSettingsDialog;
|
|||||||
import com.yunbao.common.dialog.FloatSettingsDialog;
|
import com.yunbao.common.dialog.FloatSettingsDialog;
|
||||||
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||||
import com.yunbao.common.dialog.SlideSettingsDialog;
|
import com.yunbao.common.dialog.SlideSettingsDialog;
|
||||||
|
import com.yunbao.common.dialog.YoursystemisolderDialog;
|
||||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
@@ -118,6 +121,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
private static final String TAG = "LiveAudienceActivity";
|
private static final String TAG = "LiveAudienceActivity";
|
||||||
public static String anyway;
|
public static String anyway;
|
||||||
public JSONObject pkInfo;
|
public JSONObject pkInfo;
|
||||||
|
public static LiveAudienceActivity liveAudienceActivity;
|
||||||
|
|
||||||
// 竖直滑动 ViewPager
|
// 竖直滑动 ViewPager
|
||||||
private VerticalViewPager verticalViewPager;
|
private VerticalViewPager verticalViewPager;
|
||||||
@@ -166,6 +170,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
protected void main() {
|
protected void main() {
|
||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
super.main();
|
super.main();
|
||||||
|
liveAudienceActivity = this;
|
||||||
CrashSaveBean.getInstance().addEnterRoom();
|
CrashSaveBean.getInstance().addEnterRoom();
|
||||||
mProcessResultUtil = new ProcessResultUtil(this);
|
mProcessResultUtil = new ProcessResultUtil(this);
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
@@ -181,6 +186,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
mStream = mLiveBean.getStream();
|
mStream = mLiveBean.getStream();
|
||||||
initData();
|
initData();
|
||||||
MicStatusManager.getInstance().addOnMicListener(onMicStatusListener);
|
MicStatusManager.getInstance().addOnMicListener(onMicStatusListener);
|
||||||
|
if (!IMLoginManager.get(mContext).IsXiaJBG() && (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)) {
|
||||||
|
YoursystemisolderDialog fragment = new YoursystemisolderDialog();
|
||||||
|
fragment.show(((FragmentActivity) mContext).getSupportFragmentManager(), "YoursystemisolderDialog");
|
||||||
|
IMLoginManager.get(mContext).setXiaJBG(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final MicStatusManager.OnMicStatusListener onMicStatusListener = new MicStatusManager.OnMicStatusListener() {
|
private final MicStatusManager.OnMicStatusListener onMicStatusListener = new MicStatusManager.OnMicStatusListener() {
|
||||||
@@ -1249,6 +1259,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
case SOCKET_LIVE_DRPK_SET_PK_END_VIEW:
|
case SOCKET_LIVE_DRPK_SET_PK_END_VIEW:
|
||||||
if (manager.getmLivePlayViewHolder() != null) {
|
if (manager.getmLivePlayViewHolder() != null) {
|
||||||
manager.getmLivePlayViewHolder().setPkEndview();
|
manager.getmLivePlayViewHolder().setPkEndview();
|
||||||
|
manager.setPkStatus(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (manager != null) {
|
||||||
|
manager.removeDetailView();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1343,6 +1358,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -673,7 +673,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
}
|
}
|
||||||
bundle.putBoolean(Constants.HAS_GAME, hasGame);
|
bundle.putBoolean(Constants.HAS_GAME, hasGame);
|
||||||
bundle.putInt("leave", leave);
|
bundle.putInt("leave", leave);
|
||||||
|
bundle.putString("liveUid", mLiveUid);
|
||||||
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
|
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
|
||||||
|
bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime());
|
||||||
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
|
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
fragment.setFunctionClickListener(this);
|
fragment.setFunctionClickListener(this);
|
||||||
@@ -937,9 +939,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
JSONObject datas = obj.getJSONObject("data");
|
JSONObject datas = obj.getJSONObject("data");
|
||||||
|
try {
|
||||||
SocketRyChatUtil.closeLive(datas.getString("votes"), datas.getString("length"), datas.getString("nums"), mLiveUid, mSocketRyClient);
|
SocketRyChatUtil.closeLive(datas.getString("votes"), datas.getString("length"), datas.getString("nums"), mLiveUid, mSocketRyClient);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
if (mLiveEndViewHolder == null) {
|
if (mLiveEndViewHolder == null) {
|
||||||
mLiveEndViewHolder = new LiveEndViewHolder(mContext, mRoot, mLiveBean.getUid());
|
mLiveEndViewHolder = new LiveEndViewHolder(mContext, mRoot, mLiveBean.getUid());
|
||||||
@@ -1562,11 +1566,17 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
if (mLiveRyLinkMicPkPresenter != null) {
|
if (mLiveRyLinkMicPkPresenter != null) {
|
||||||
mLiveRyLinkMicPkPresenter.leaveDRRoom();
|
mLiveRyLinkMicPkPresenter.leaveDRRoom();
|
||||||
}
|
}
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.hotAddVisibility(false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case LEAVE_PK_SCORE:
|
case LEAVE_PK_SCORE:
|
||||||
if (mLiveRyLinkMicPkPresenter != null) {
|
if (mLiveRyLinkMicPkPresenter != null) {
|
||||||
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
|
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
|
||||||
}
|
}
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.hotAddVisibility(true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PK_TIME_COUNT:
|
case PK_TIME_COUNT:
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
@@ -1671,7 +1681,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.bean.LiveDataInfoModel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveDataInfoRecyclerAdapter extends RecyclerView.Adapter<LiveDataInfoRecyclerAdapter.LiveDataHolder> {
|
||||||
|
private Context mContext;
|
||||||
|
private List<LiveDataInfoModel> list=new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveDataInfoRecyclerAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<LiveDataInfoModel> list) {
|
||||||
|
this.list = list;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public LiveDataHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new LiveDataHolder(LayoutInflater.from(mContext).inflate(R.layout.item_live_data, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull LiveDataHolder holder, int position) {
|
||||||
|
holder.setData(list.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class LiveDataHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView title, data;
|
||||||
|
|
||||||
|
public LiveDataHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
title = itemView.findViewById(R.id.item_title);
|
||||||
|
data = itemView.findViewById(R.id.item_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(LiveDataInfoModel model) {
|
||||||
|
if (model.getColor() != null) {
|
||||||
|
data.setText(Html.fromHtml("<font color='" + model.getColor() + "'>" + model.getData() + "</font>"));
|
||||||
|
} else {
|
||||||
|
data.setText(model.getData());
|
||||||
|
}
|
||||||
|
title.setText(model.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveTaskRecyclerAdapter extends RecyclerView.Adapter<LiveTaskRecyclerAdapter.TaskHolder> {
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
private List<LiveTaskModel.Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveTaskRecyclerAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTasks(List<LiveTaskModel.Task> tasks) {
|
||||||
|
this.tasks = tasks;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public TaskHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
if (viewType == LiveTaskModel.TASK_TYPE_TIP) {
|
||||||
|
return new TaskHolder(new TextView(mContext));
|
||||||
|
} else {
|
||||||
|
return new TaskHolder(LayoutInflater.from(mContext).inflate(R.layout.item_live_task, parent, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
return tasks.get(position).getType();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull TaskHolder holder, int position) {
|
||||||
|
holder.setDate(tasks.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return tasks.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class TaskHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView title;
|
||||||
|
private TextView complete;
|
||||||
|
private TextView hot;
|
||||||
|
private TextView xp;
|
||||||
|
private ImageView hotIcon;
|
||||||
|
private ImageView xpIcon;
|
||||||
|
|
||||||
|
public TaskHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
if (itemView instanceof TextView) {
|
||||||
|
title = (TextView) itemView;
|
||||||
|
title.setTextColor(Color.parseColor("#B3B3B3"));
|
||||||
|
title.setTextSize(12);
|
||||||
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
|
params.setMarginStart(DpUtil.dp2px(27));
|
||||||
|
params.setMargins(DpUtil.dp2px(27), DpUtil.dp2px(16), 0, DpUtil.dp2px(16));
|
||||||
|
title.setLayoutParams(params);
|
||||||
|
} else {
|
||||||
|
title = itemView.findViewById(R.id.item_task_title);
|
||||||
|
complete = itemView.findViewById(R.id.item_task_complete);
|
||||||
|
hot = itemView.findViewById(R.id.item_task_hot);
|
||||||
|
xp = itemView.findViewById(R.id.item_task_xp);
|
||||||
|
hotIcon = itemView.findViewById(R.id.item_task_hot_img);
|
||||||
|
xpIcon = itemView.findViewById(R.id.item_task_xp_img);
|
||||||
|
hotIcon.setImageResource(R.mipmap.dialog_task_hot);
|
||||||
|
xpIcon.setImageResource(R.mipmap.dialog_task_star);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(LiveTaskModel.Task task) {
|
||||||
|
title.setText(task.getTaskName());
|
||||||
|
if (task.getType() == LiveTaskModel.TASK_TYPE_TIP) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (task.getStatus() || task.getNowValue() >= task.getTaskNum()) {
|
||||||
|
task.setNowValue(task.getTaskNum());
|
||||||
|
}
|
||||||
|
title.setText(String.format("%s (%s/%s)",
|
||||||
|
task.getTaskName(),
|
||||||
|
task.getNowValue(),
|
||||||
|
task.getTaskNum())
|
||||||
|
);
|
||||||
|
if (task.getNowValue() == task.getTaskNum()) {
|
||||||
|
task.setStatus(1);
|
||||||
|
}
|
||||||
|
complete.setText(task.getStatus() ? R.string.live_task_item_complete_true : R.string.live_task_item_complete_false);
|
||||||
|
complete.setBackgroundResource(task.getStatus() ? R.drawable.background_6cbe53 : R.drawable.background_595959);
|
||||||
|
hot.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_hot) + "</font>  <font color='#F09FC2'>" + task.getHot() + "</font>"));
|
||||||
|
xp.setText(Html.fromHtml("<font color='#B3B3B3'>" + WordUtil.getString(R.string.live_task_item_xp) + "</font>  <font color='#FFF69F'>" + task.getExp() + "</font>"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.yunbao.live.bean;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class LiveDataInfoModel extends BaseModel {
|
||||||
|
private String color;
|
||||||
|
private String title;
|
||||||
|
private String data;
|
||||||
|
|
||||||
|
public LiveDataInfoModel(String color, String title, String data) {
|
||||||
|
this.color = color;
|
||||||
|
this.title = title;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveDataInfoModel(String title, String data) {
|
||||||
|
this.title = title;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveDataInfoModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(String color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(String data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
|||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordsTypeUtil;
|
import com.yunbao.common.utils.WordsTypeUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.adapter.FreePkRecyclerAdapter;
|
import com.yunbao.live.adapter.FreePkRecyclerAdapter;
|
||||||
@@ -170,7 +171,7 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(com.yunbao.common.R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.adapter.LiveDataInfoRecyclerAdapter;
|
||||||
|
import com.yunbao.live.bean.LiveDataInfoModel;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||||
|
private ImageView img;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
|
private LiveDataInfoRecyclerAdapter adapter;
|
||||||
|
private List<LiveDataInfoModel> list;
|
||||||
|
private String liveUid;
|
||||||
|
|
||||||
|
public LiveDataInfoDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveDataInfoDialog(@NonNull Context context, String liveUid) {
|
||||||
|
super(context);
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLiveUid(String liveUid) {
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_live_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
img = findViewById(R.id.live_data_img);
|
||||||
|
img.setImageResource(R.mipmap.icon_free_pk_waring);
|
||||||
|
recyclerView = findViewById(R.id.live_data_list);
|
||||||
|
adapter = new LiveDataInfoRecyclerAdapter(getContext());
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initData() {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), WordUtil.getString(R.string.live_data_loading)));
|
||||||
|
adapter.setList(list);
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||||
|
list.clear();
|
||||||
|
list.add(new LiveDataInfoModel("#00FFFF", WordUtil.getString(R.string.live_data_coin), data.getTotalCoin() + ""));
|
||||||
|
list.add(new LiveDataInfoModel("#FFF69F", WordUtil.getString(R.string.live_data_gold), data.getTotalGold() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_accept), data.getAcceptNum() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_enter), data.getEnterNum() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention), data.getAttentionNum() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_attention_rate), data.getAttentionNumRate() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group), data.getFanGroupNum() + ""));
|
||||||
|
list.add(new LiveDataInfoModel(WordUtil.getString(R.string.live_data_fan_group_rate), data.getFanGroupNumRate() + ""));
|
||||||
|
adapter.setList(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(com.yunbao.common.R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -202,7 +202,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
Log.i("debug", "onError: " + error);
|
Log.i("debug", "onError: " + error);
|
||||||
ToastUtil.show(error);
|
ToastUtil.show( R.string.net_error);
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
private String roomId;
|
private String roomId;
|
||||||
private DialogInterface.OnShowListener listener;
|
private DialogInterface.OnShowListener listener;
|
||||||
private TextView htmlError;
|
private TextView htmlError;
|
||||||
private boolean isSetHeight = false;
|
private boolean isSetHeight =false;
|
||||||
|
|
||||||
public LiveHDDialogFragment() {
|
public LiveHDDialogFragment() {
|
||||||
|
|
||||||
@@ -100,7 +100,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||||
WindowManager.LayoutParams params = window.getAttributes();
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
isFullWindow = false;
|
|
||||||
if (isFullWindow) {
|
if (isFullWindow) {
|
||||||
Display display = null;
|
Display display = null;
|
||||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
||||||
@@ -139,17 +138,10 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinearLayout layout;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
mWebView = (WebView) findViewById(R.id.rlWebview);
|
||||||
layout = (LinearLayout) findViewById(R.id.layout);
|
|
||||||
mWebView = new WebView(mContext);
|
|
||||||
ViewGroup.LayoutParams _params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
|
||||||
mWebView.setLayoutParams(_params);
|
|
||||||
layout.addView(mWebView);
|
|
||||||
htmlError = (TextView) findViewById(R.id.html_error);
|
htmlError = (TextView) findViewById(R.id.html_error);
|
||||||
findViewById(R.id.btn_back).setOnClickListener(v -> dismiss());
|
findViewById(R.id.btn_back).setOnClickListener(v -> dismiss());
|
||||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(getActivity(), mWebView)
|
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(getActivity(), mWebView)
|
||||||
@@ -182,7 +174,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
findViewById(R.id.title_laout).setVisibility(View.VISIBLE);
|
findViewById(R.id.title_laout).setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if (bundle.getInt("height", -1) != -1) {
|
if (bundle.getInt("height", -1) != -1) {
|
||||||
isSetHeight = true;
|
isSetHeight =true;
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, bundle.getInt("height", -1));
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, bundle.getInt("height", -1));
|
||||||
mWebView.setLayoutParams(params);
|
mWebView.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
@@ -203,7 +195,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
if (!isSetHeight) {
|
if(!isSetHeight) {
|
||||||
view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth,true)");
|
view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth,true)");
|
||||||
}
|
}
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
@@ -238,6 +230,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void gotoLive(final String live_id) {
|
private void gotoLive(final String live_id) {
|
||||||
if (!TextUtils.equals(roomId, live_id)) {
|
if (!TextUtils.equals(roomId, live_id)) {
|
||||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||||
@@ -251,7 +244,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
if(MicStatusManager.getInstance().isMic(liveUid)){
|
||||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -313,10 +306,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
//结束webview的加载
|
//结束webview的加载
|
||||||
mWebView.loadUrl("about:blank");
|
|
||||||
layout.removeView(mWebView);
|
|
||||||
mWebView.destroy();
|
mWebView.destroy();
|
||||||
mWebView = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import static com.yunbao.common.Constants.*;
|
import static com.yunbao.common.Constants.LIVE_FUNC_BEAUTY;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_CAMERA;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_DR;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_LINK_MIC;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_MIC;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_RANDOM_PK;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_WISHLIST;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_WKS;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_ZG;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_ZSLK;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_ROBOT;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.os.SystemClock;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
@@ -10,10 +23,12 @@ import android.view.WindowManager;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.LiveAnchorMessageCustomPopup;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.interfaces.LiveFunctionClickListener;
|
import com.yunbao.live.interfaces.LiveFunctionClickListener;
|
||||||
@@ -29,7 +44,9 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
private LiveFunctionClickListener mFunctionClickListener;
|
private LiveFunctionClickListener mFunctionClickListener;
|
||||||
private int leave = 0;
|
private int leave = 0;
|
||||||
private boolean isPk;
|
private boolean isPk;
|
||||||
|
private TextView mLiveTimeTextView;//主播的直播时长
|
||||||
|
|
||||||
|
private String liveUid;
|
||||||
|
|
||||||
// boolean isRy = false;
|
// boolean isRy = false;
|
||||||
@Override
|
@Override
|
||||||
@@ -70,6 +87,8 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
leave = bundle.getInt("leave", 0);
|
leave = bundle.getInt("leave", 0);
|
||||||
isPk = bundle.getBoolean("isPk", false);
|
isPk = bundle.getBoolean("isPk", false);
|
||||||
// isRy = bundle.getBoolean("isRy", false);
|
// isRy = bundle.getBoolean("isRy", false);
|
||||||
|
mAnchorLiveTime = bundle.getLong("liveTime");
|
||||||
|
liveUid = bundle.getString("liveUid");
|
||||||
}
|
}
|
||||||
mWishView = findViewById(R.id.live_tool_wish);
|
mWishView = findViewById(R.id.live_tool_wish);
|
||||||
mPrankView = findViewById(R.id.live_tool_prank);
|
mPrankView = findViewById(R.id.live_tool_prank);
|
||||||
@@ -81,7 +100,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
mMultiPkView = findViewById(R.id.live_tool_multi_pk);
|
mMultiPkView = findViewById(R.id.live_tool_multi_pk);
|
||||||
mMicView = findViewById(R.id.live_tool_mic);
|
mMicView = findViewById(R.id.live_tool_mic);
|
||||||
mRandomPk = findViewById(R.id.live_tool_random_pk);
|
mRandomPk = findViewById(R.id.live_tool_random_pk);
|
||||||
|
mLiveTimeTextView = (TextView) findViewById(R.id.live_time);
|
||||||
mWishView.setOnClickListener(this);
|
mWishView.setOnClickListener(this);
|
||||||
mPrankView.setOnClickListener(this);
|
mPrankView.setOnClickListener(this);
|
||||||
mWksView.setOnClickListener(this);
|
mWksView.setOnClickListener(this);
|
||||||
@@ -92,6 +111,10 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
mMultiPkView.setOnClickListener(this);
|
mMultiPkView.setOnClickListener(this);
|
||||||
mMicView.setOnClickListener(this);
|
mMicView.setOnClickListener(this);
|
||||||
mRandomPk.setOnClickListener(this);
|
mRandomPk.setOnClickListener(this);
|
||||||
|
findViewById(R.id.message_linear).setOnClickListener(this);
|
||||||
|
findViewById(R.id.broadcast_data).setOnClickListener(this);
|
||||||
|
findViewById(R.id.anchor_task).setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
||||||
|
|
||||||
if (leave == 0) {
|
if (leave == 0) {
|
||||||
@@ -101,7 +124,9 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave_p);
|
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave_p);
|
||||||
((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk1);
|
((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(R.string.live_zslk1);
|
||||||
}
|
}
|
||||||
|
mLiveRoomHandler = new LiveRoomHandler();
|
||||||
|
mLiveTimeTextView.setText(StringUtil.getDurationText(mAnchorLiveTime));
|
||||||
|
startAnchorLiveTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) {
|
public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) {
|
||||||
@@ -146,9 +171,74 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
|
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
|
||||||
} else if (id == R.id.live_tool_random_pk) {
|
} else if (id == R.id.live_tool_random_pk) {
|
||||||
mFunctionClickListener.onClick(LIVE_FUNC_RANDOM_PK);
|
mFunctionClickListener.onClick(LIVE_FUNC_RANDOM_PK);
|
||||||
}else if (id==R.id.live_tool_robot){
|
} else if (id == R.id.live_tool_robot) {
|
||||||
mFunctionClickListener.onClick(LIVE_ROBOT);
|
mFunctionClickListener.onClick(LIVE_ROBOT);
|
||||||
dismiss();
|
dismiss();
|
||||||
|
} else if (id == R.id.message_linear) {
|
||||||
|
new XPopup.Builder(getContext())
|
||||||
|
.asCustom(new LiveAnchorMessageCustomPopup(getContext(), liveUid))
|
||||||
|
.show();
|
||||||
|
dismiss();
|
||||||
|
} else if (id == R.id.broadcast_data) {
|
||||||
|
//主播数据
|
||||||
|
new LiveDataInfoDialog(mContext, liveUid).showDialog();
|
||||||
|
dismiss();
|
||||||
|
} else if (id == R.id.anchor_task) {
|
||||||
|
//主播任务
|
||||||
|
taskDialog = new LiveTaskDialog(mContext);
|
||||||
|
taskDialog.setLiveUid(liveUid);
|
||||||
|
taskDialog.updateLiveTimer(mAnchorLiveTime);
|
||||||
|
taskDialog.showDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final int WHAT_ANCHOR_LIVE_TIME = 3;//直播间主播计时
|
||||||
|
private LiveRoomHandler mLiveRoomHandler;
|
||||||
|
private long mAnchorLiveTime;//主播直播时间
|
||||||
|
private LiveTaskDialog taskDialog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播显示直播时间
|
||||||
|
*/
|
||||||
|
private void showAnchorLiveTime() {
|
||||||
|
if (mLiveTimeTextView != null) {
|
||||||
|
mAnchorLiveTime += 1000;
|
||||||
|
mLiveTimeTextView.setText(StringUtil.getDurationText(mAnchorLiveTime));
|
||||||
|
startAnchorLiveTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startAnchorLiveTime() {
|
||||||
|
if (mLiveRoomHandler != null) {
|
||||||
|
mLiveRoomHandler.sendEmptyMessageAtTime(WHAT_ANCHOR_LIVE_TIME, getNextTime(1000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class LiveRoomHandler extends Handler {
|
||||||
|
@Override
|
||||||
|
public void handleMessage(Message msg) {
|
||||||
|
|
||||||
|
switch (msg.what) {
|
||||||
|
|
||||||
|
case WHAT_ANCHOR_LIVE_TIME:
|
||||||
|
showAnchorLiveTime();
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void release() {
|
||||||
|
removeCallbacksAndMessages(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private long getNextTime(int time) {
|
||||||
|
long now = SystemClock.uptimeMillis();
|
||||||
|
if (time < 1000) {
|
||||||
|
return now + time;
|
||||||
|
}
|
||||||
|
return now + time + -now % 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
|
|
||||||
private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
|
private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
|
||||||
private GuardRightAdapter mGuardRightAdapter;
|
private GuardRightAdapter mGuardRightAdapter;
|
||||||
private boolean isEmpty,showBuyView;
|
private boolean isEmpty, showBuyView;
|
||||||
private ImageView mBack;
|
private ImageView mBack;
|
||||||
private RelativeLayout relativeLayout;
|
private RelativeLayout relativeLayout;
|
||||||
|
|
||||||
@@ -169,13 +169,13 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
mAncherName = bundle.getString(Constants.LIVE_ANCHER_NAME);
|
mAncherName = bundle.getString(Constants.LIVE_ANCHER_NAME);
|
||||||
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
|
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
|
||||||
mUserIcon = bundle.getString(Constants.USER_ICON);
|
mUserIcon = bundle.getString(Constants.USER_ICON);
|
||||||
showBuyView = bundle.getBoolean("showBuyView",true);
|
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||||
String coinName = WordUtil.getString(R.string.diamond);
|
String coinName = WordUtil.getString(R.string.diamond);
|
||||||
mCoinName = coinName;
|
mCoinName = coinName;
|
||||||
isEmpty=bundle.getBoolean("guard",true);
|
isEmpty = bundle.getBoolean("guard", true);
|
||||||
// mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
|
// mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
|
||||||
mCoinNameTextView.setText("快为您喜欢的主播开通守护吧");
|
mCoinNameTextView.setText(R.string.favoriteanchor);
|
||||||
anchorName.setText(String.format("成爲%s的守護", mAncherName));
|
anchorName.setText(String.format(mContext.getString(R.string.theguardianof), mAncherName));
|
||||||
}
|
}
|
||||||
LiveHttpUtil.getGuardBuyList(new HttpCallback() {
|
LiveHttpUtil.getGuardBuyList(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
@@ -211,11 +211,11 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
private void initView() {
|
private void initView() {
|
||||||
int guardType = mLiveGuardInfo.getMyGuardType();
|
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||||
if(isEmpty){
|
if (isEmpty) {
|
||||||
iconCover.setImageResource(R.drawable.guardian_img_wings);
|
iconCover.setImageResource(R.drawable.guardian_img_wings);
|
||||||
userIconOne.setVisibility(View.GONE);
|
userIconOne.setVisibility(View.GONE);
|
||||||
userIconTwo.setVisibility(View.GONE);
|
userIconTwo.setVisibility(View.GONE);
|
||||||
}else{
|
} else {
|
||||||
mBack.setVisibility(View.VISIBLE);
|
mBack.setVisibility(View.VISIBLE);
|
||||||
ImgLoader.display(mContext, mAncherIcon, userIconOne);
|
ImgLoader.display(mContext, mAncherIcon, userIconOne);
|
||||||
ImgLoader.display(mContext, mUserIcon, userIconTwo);
|
ImgLoader.display(mContext, mUserIcon, userIconTwo);
|
||||||
@@ -240,19 +240,19 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
String title = "";
|
String title = "";
|
||||||
switch (guardType) {
|
switch (guardType) {
|
||||||
case Constants.GUARD_TYPE_DAY:
|
case Constants.GUARD_TYPE_DAY:
|
||||||
title = "您是當前主播的周守護";
|
title = mContext.getString(R.string.guard_tip_day1);
|
||||||
break;
|
break;
|
||||||
case Constants.GUARD_TYPE_MONTH:
|
case Constants.GUARD_TYPE_MONTH:
|
||||||
title = "您是當前主播的月守護";
|
title = mContext.getString(R.string.guard_tip_day2);
|
||||||
break;
|
break;
|
||||||
case Constants.GUARD_TYPE_YEAR:
|
case Constants.GUARD_TYPE_YEAR:
|
||||||
title = "您是當前主播的年守護";
|
title = mContext.getString(R.string.guard_tip_day3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
anchorName.setText(title);
|
anchorName.setText(title);
|
||||||
guard_tips.setText("守護日期截止到:"+ mLiveGuardInfo.getMyGuardEndTime());
|
guard_tips.setText(String.format(mContext.getString(R.string.guardiandate), mLiveGuardInfo.getMyGuardEndTime()));
|
||||||
}
|
}
|
||||||
if(!showBuyView){
|
if (!showBuyView) {
|
||||||
relativeLayout.setVisibility(View.GONE);
|
relativeLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
bean.setChecked(false);
|
bean.setChecked(false);
|
||||||
}
|
}
|
||||||
for (int i : guardBuyBean.getPrivilege()) {
|
for (int i : guardBuyBean.getPrivilege()) {
|
||||||
if(i<mRightList.size()) {
|
if (i < mRightList.size()) {
|
||||||
mRightList.get(i).setChecked(true);
|
mRightList.get(i).setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,13 +286,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
} else if (i == R.id.guard_buy) {
|
} else if (i == R.id.guard_buy) {
|
||||||
forwardMyCoin();
|
forwardMyCoin();
|
||||||
|
|
||||||
}else if (i==R.id.guard_back){
|
} else if (i == R.id.guard_back) {
|
||||||
gotoBack();
|
gotoBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void gotoBack(){
|
|
||||||
|
private void gotoBack() {
|
||||||
dismiss();
|
dismiss();
|
||||||
((LiveActivity)mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
|
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
269
live/src/main/java/com/yunbao/live/dialog/LiveTaskDialog.java
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||||
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
|
import com.google.android.material.tabs.TabLayout;
|
||||||
|
import com.google.android.material.tabs.TabLayoutMediator;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.yunbao.common.bean.LiveTaskModel;
|
||||||
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.adapter.LiveTaskRecyclerAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播直播任务弹框
|
||||||
|
*/
|
||||||
|
public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||||
|
private TextView newStarTime;
|
||||||
|
private ImageView newStarImg;
|
||||||
|
private ImageView taskInfoImg;
|
||||||
|
private ImageView tipImg;
|
||||||
|
private TabLayout tabLayout;
|
||||||
|
|
||||||
|
private ViewPager2 viewPager;
|
||||||
|
|
||||||
|
|
||||||
|
private TabLayoutMediator mediator;
|
||||||
|
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
String liveUid;
|
||||||
|
int liveTimer;
|
||||||
|
|
||||||
|
public LiveTaskDialog(Context context) {
|
||||||
|
super(context);
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
builder.enableDrag(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_live_task;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLiveUid(String liveUid) {
|
||||||
|
this.liveUid = liveUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
newStarTime = findViewById(R.id.task_new_star_time);
|
||||||
|
newStarImg = findViewById(R.id.live_task_banner1);
|
||||||
|
taskInfoImg = findViewById(R.id.live_task_banner2);
|
||||||
|
tipImg = findViewById(R.id.live_task_tip);
|
||||||
|
tabLayout = findViewById(R.id.live_task_menu);
|
||||||
|
viewPager = findViewById(R.id.live_task_viewpager);
|
||||||
|
initImgView();
|
||||||
|
createTask();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initImgView() {
|
||||||
|
newStarImg.setImageResource(R.mipmap.dialog_task_new_star);
|
||||||
|
taskInfoImg.setImageResource(R.mipmap.dialog_task_info);
|
||||||
|
tipImg.setImageResource(R.mipmap.icon_guize);
|
||||||
|
tipImg.setOnClickListener(v -> new LiveTaskInfoDialog(mContext).showDialog());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initTabLayout(LiveTaskModel model) {
|
||||||
|
TabLayout.Tab liveTaskTag = tabLayout.newTab();
|
||||||
|
TabLayout.Tab userTaskTag = tabLayout.newTab();
|
||||||
|
liveTaskTag.setText(R.string.live_task_tab1);
|
||||||
|
userTaskTag.setText(R.string.live_task_tab2);
|
||||||
|
tabLayout.addTab(liveTaskTag);
|
||||||
|
tabLayout.addTab(userTaskTag);
|
||||||
|
|
||||||
|
viewPager.setAdapter(new FragmentStateAdapter(((AppCompatActivity) mContext).getSupportFragmentManager(), getLifecycle()) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Fragment createFragment(int position) {
|
||||||
|
TaskFragment fragment = new TaskFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putInt("position", position + 1);
|
||||||
|
bundle.putInt("liveTimer", liveTimer);
|
||||||
|
bundle.putString("liveUid", liveUid);
|
||||||
|
bundle.putSerializable("data", model);
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
mediator = new TabLayoutMediator(tabLayout, viewPager, true, new TabLayoutMediator.TabConfigurationStrategy() {
|
||||||
|
@Override
|
||||||
|
public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
|
||||||
|
if (position == 0) {
|
||||||
|
tab.setText(R.string.live_task_tab1);
|
||||||
|
} else {
|
||||||
|
tab.setText(R.string.live_task_tab2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
mediator.attach();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateMainUi(LiveTaskModel.NewUser task) {
|
||||||
|
if (task.isNew()) {
|
||||||
|
newStarImg.setVisibility(VISIBLE);
|
||||||
|
newStarTime.setVisibility(VISIBLE);
|
||||||
|
newStarTime.setText(task.getEndTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dialog loadDialog;
|
||||||
|
|
||||||
|
private void createTask() {
|
||||||
|
loadDialog = DialogUitl.loadingDialog(getContext());
|
||||||
|
loadDialog.show();
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getLiveTask(1, liveUid, new HttpCallback<LiveTaskModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(LiveTaskModel data) {
|
||||||
|
Log.i("直播任务", "onSuccess: " + data);
|
||||||
|
updateMainUi(data.getUser());
|
||||||
|
initTabLayout(data);
|
||||||
|
if (loadDialog != null) {
|
||||||
|
loadDialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
Log.e("直播任务", "onError: " + error);
|
||||||
|
if (loadDialog != null) {
|
||||||
|
loadDialog.dismiss();
|
||||||
|
}
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateLiveTimer(long time) {
|
||||||
|
liveTimer = (int) time / (1000 * 60);
|
||||||
|
/*TaskFragment fragment = (TaskFragment) ((AppCompatActivity) mContext).getSupportFragmentManager().findFragmentByTag("f0");
|
||||||
|
if (fragment != null) {
|
||||||
|
fragment.adapter.updateTimer(liveTimer);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TaskFragment extends Fragment {
|
||||||
|
private RecyclerView taskList;
|
||||||
|
private LiveTaskRecyclerAdapter adapter;
|
||||||
|
private int position;
|
||||||
|
private int liveTimer;
|
||||||
|
private String liveUid;
|
||||||
|
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
return new RecyclerView(getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
this.position = getArguments().getInt("position", -1);
|
||||||
|
this.liveTimer = getArguments().getInt("liveTimer", -1);
|
||||||
|
this.liveUid = getArguments().getString("liveUid", "0");
|
||||||
|
taskList = (RecyclerView) view;
|
||||||
|
initTaskList();
|
||||||
|
if (position == 2) {
|
||||||
|
createTask(position);
|
||||||
|
} else {
|
||||||
|
update((LiveTaskModel) getArguments().getSerializable("data"), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initTaskList() {
|
||||||
|
adapter = new LiveTaskRecyclerAdapter(getContext());
|
||||||
|
taskList.setAdapter(adapter);
|
||||||
|
taskList.setLayoutManager(new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createTask(int type) {
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getLiveTask(type, liveUid, new HttpCallback<LiveTaskModel>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(LiveTaskModel data) {
|
||||||
|
Log.i("直播任务", "onSuccess: " + data);
|
||||||
|
update(data, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
Log.e("直播任务", "onError: " + error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void update(LiveTaskModel data, int type) {
|
||||||
|
LiveTaskModel.Task task = new LiveTaskModel.Task();
|
||||||
|
LiveTaskModel.Task task2 = new LiveTaskModel.Task();
|
||||||
|
if (type == 1) {
|
||||||
|
task.setTaskName(WordUtil.getString(R.string.live_task_no1));
|
||||||
|
task2.setTaskName(WordUtil.getString(R.string.live_task_no2));
|
||||||
|
} else {
|
||||||
|
task.setTaskName(WordUtil.getString(R.string.live_task_fans_no1));
|
||||||
|
task2.setTaskName(WordUtil.getString(R.string.live_task_fans_no2));
|
||||||
|
}
|
||||||
|
task.setType(LiveTaskModel.TASK_TYPE_TIP);
|
||||||
|
task2.setType(LiveTaskModel.TASK_TYPE_TIP);
|
||||||
|
List<LiveTaskModel.Task> task1 = new ArrayList<>();
|
||||||
|
task1.add(task);
|
||||||
|
task1.addAll(data.getList().get(0));
|
||||||
|
if (type == 1) {
|
||||||
|
for (LiveTaskModel.Task tk : task1) {
|
||||||
|
tk.setNowValue(liveTimer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
task1.add(task2);
|
||||||
|
task1.addAll(data.getList().get(1));
|
||||||
|
adapter.setTasks(task1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
|
public class LiveTaskInfoDialog extends AbsDialogPopupWindow {
|
||||||
|
public LiveTaskInfoDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_live_task_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
ImageView back = findViewById(R.id.live_task_info_back);
|
||||||
|
back.setImageResource(R.mipmap.icon_back);
|
||||||
|
back.setOnClickListener(v -> dismiss());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ import com.yunbao.common.dialog.AbsDialogFragment;
|
|||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.adapter.FunGamesAdapter;
|
import com.yunbao.live.adapter.FunGamesAdapter;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
@@ -92,6 +93,7 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.blankj.utilcode.util.GsonUtils;
|
|||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.adapter.RefreshAdapter;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
|
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||||
import com.yunbao.common.bean.LiveUserRankBean;
|
import com.yunbao.common.bean.LiveUserRankBean;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.UserRankModel;
|
import com.yunbao.common.bean.UserRankModel;
|
||||||
@@ -38,7 +39,6 @@ import com.yunbao.live.activity.LiveActivity;
|
|||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.adapter.UserMoreInfoAdapter;
|
import com.yunbao.live.adapter.UserMoreInfoAdapter;
|
||||||
import com.yunbao.live.bean.LiveGuardInfo;
|
import com.yunbao.live.bean.LiveGuardInfo;
|
||||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -68,7 +68,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
private RelativeLayout bottom_msg;//底部信息的布局,在榜单列表下不需要显示底部信息
|
private RelativeLayout bottom_msg;//底部信息的布局,在榜单列表下不需要显示底部信息
|
||||||
private String Tips = "1";
|
private String Tips = "1";
|
||||||
private String type = "guanzhong";
|
private String type = "guanzhong";
|
||||||
private boolean isOnly, noble,showBuyView;
|
private boolean isOnly, noble, showBuyView;
|
||||||
ImageView no_more;
|
ImageView no_more;
|
||||||
private List<String> outRankHide = new ArrayList<>();
|
private List<String> outRankHide = new ArrayList<>();
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
stream = bundle.getString(Constants.STREAM);
|
stream = bundle.getString(Constants.STREAM);
|
||||||
isOnly = bundle.getBoolean("only", false);
|
isOnly = bundle.getBoolean("only", false);
|
||||||
noble = bundle.getBoolean("noble", false);
|
noble = bundle.getBoolean("noble", false);
|
||||||
showBuyView = bundle.getBoolean("showBuyView",true);
|
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||||
String outRankHideString = bundle.getString("outRankHide");
|
String outRankHideString = bundle.getString("outRankHide");
|
||||||
outRankHide = GsonUtils.fromJson(outRankHideString, new TypeToken<List<String>>() {
|
outRankHide = GsonUtils.fromJson(outRankHideString, new TypeToken<List<String>>() {
|
||||||
}.getType());
|
}.getType());
|
||||||
@@ -373,27 +373,27 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mRefreshView.getLayoutParams();
|
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mRefreshView.getLayoutParams();
|
||||||
params.bottomMargin = DpUtil.dp2px(65);
|
params.bottomMargin = DpUtil.dp2px(65);
|
||||||
if (Tips.equals("1")) {
|
if (Tips.equals("1")) {
|
||||||
tags.setText("開通貴族,尊享超多特權!");
|
tags.setText(R.string.enjoy_a_lot);
|
||||||
btn.setBackgroundResource(R.mipmap.btn_openvip);
|
btn.setBackgroundResource(R.mipmap.btn_openvip);
|
||||||
btn.setText("開通貴族");
|
btn.setText(R.string.live_ktgz);
|
||||||
setTextColor(audience_btn, guard_btn, fans_btn, weekRank, dayRank);
|
setTextColor(audience_btn, guard_btn, fans_btn, weekRank, dayRank);
|
||||||
gz_view.setVisibility(View.GONE);
|
gz_view.setVisibility(View.GONE);
|
||||||
userMoreInfoAdapter.type = "1";
|
userMoreInfoAdapter.type = "1";
|
||||||
type = "guanzhong";
|
type = "guanzhong";
|
||||||
} else if (Tips.equals("2")) {
|
} else if (Tips.equals("2")) {
|
||||||
tags.setText("快為您喜歡的主播開通守護吧");
|
tags.setText(R.string.guard_for_your);
|
||||||
btn.setBackgroundResource(R.mipmap.btn_openprotection);
|
btn.setBackgroundResource(R.mipmap.btn_openprotection);
|
||||||
btn.setText("守護列表");
|
btn.setText(R.string.daemon_list);
|
||||||
setTextColor(guard_btn, audience_btn, fans_btn, dayRank, weekRank);
|
setTextColor(guard_btn, audience_btn, fans_btn, dayRank, weekRank);
|
||||||
gz_view.setVisibility(View.GONE);
|
gz_view.setVisibility(View.GONE);
|
||||||
userMoreInfoAdapter.type = "2";
|
userMoreInfoAdapter.type = "2";
|
||||||
no_more.setImageResource(R.mipmap.ic_guard_not);
|
no_more.setImageResource(R.mipmap.ic_guard_not);
|
||||||
noMoreText.setText("主播正在等待您成為TA的守護,\n為TA保駕護航!");
|
noMoreText.setText(R.string.waiting_for_you);
|
||||||
noMoreText.setVisibility(View.VISIBLE);
|
noMoreText.setVisibility(View.VISIBLE);
|
||||||
type = "guard";
|
type = "guard";
|
||||||
} else if (Tips.equals("3")) {
|
} else if (Tips.equals("3")) {
|
||||||
tags.setText("快加入您喜歡的主播粉絲團吧");
|
tags.setText(R.string.favorite_host_fan);
|
||||||
btn.setText("加入粉絲團");
|
btn.setText(R.string.Join_a_fan_club);
|
||||||
btn.setBackgroundResource(R.mipmap.btn_joinfans);
|
btn.setBackgroundResource(R.mipmap.btn_joinfans);
|
||||||
setTextColor(fans_btn, audience_btn, guard_btn, dayRank, weekRank);
|
setTextColor(fans_btn, audience_btn, guard_btn, dayRank, weekRank);
|
||||||
gz_view.setVisibility(View.GONE);
|
gz_view.setVisibility(View.GONE);
|
||||||
@@ -421,7 +421,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
setTextColor(weekRank, audience_btn, guard_btn, fans_btn, gz_view, dayRank);
|
setTextColor(weekRank, audience_btn, guard_btn, fans_btn, gz_view, dayRank);
|
||||||
noMoreText.setVisibility(View.VISIBLE);
|
noMoreText.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if(!showBuyView){
|
if (!showBuyView) {
|
||||||
bottom_msg.setVisibility(View.GONE);
|
bottom_msg.setVisibility(View.GONE);
|
||||||
params.bottomMargin = DpUtil.dp2px(0);
|
params.bottomMargin = DpUtil.dp2px(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
|||||||
import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK;
|
import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK;
|
||||||
import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
|
import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
|
||||||
import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK;
|
import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK;
|
||||||
|
import static com.yunbao.live.views.LivePushRyViewHolder.btn_close;
|
||||||
import static com.yunbao.live.views.LivePushRyViewHolder.contexts;
|
import static com.yunbao.live.views.LivePushRyViewHolder.contexts;
|
||||||
import static com.yunbao.live.views.LivePushRyViewHolder.rcrtcLiveInfo;
|
import static com.yunbao.live.views.LivePushRyViewHolder.rcrtcLiveInfo;
|
||||||
import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
|
import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
|
||||||
@@ -1137,6 +1138,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
|
|
||||||
Log.e("ry", "退出多人OKKK" + inputStreamList.size());
|
Log.e("ry", "退出多人OKKK" + inputStreamList.size());
|
||||||
isDRPK = 0;
|
isDRPK = 0;
|
||||||
|
if (btn_close != null) {
|
||||||
|
btn_close.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
for (int i = 0; i < inputStreamList.size(); i++) {
|
for (int i = 0; i < inputStreamList.size(); i++) {
|
||||||
//退出副房间
|
//退出副房间
|
||||||
RCRTCEngine.getInstance().leaveOtherRoom(inputStreamList.get(i).getUserId(), true, new IRCRTCResultCallback() {
|
RCRTCEngine.getInstance().leaveOtherRoom(inputStreamList.get(i).getUserId(), true, new IRCRTCResultCallback() {
|
||||||
@@ -1685,7 +1689,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ public class CustomViewHolder implements BannerViewHolder<BannerBean> {
|
|||||||
TextView targetAssist = contextView.findViewById(R.id.target_assist_num);
|
TextView targetAssist = contextView.findViewById(R.id.target_assist_num);
|
||||||
TextView currentAssist = contextView.findViewById(R.id.current_assist_num);
|
TextView currentAssist = contextView.findViewById(R.id.current_assist_num);
|
||||||
TextView title = contextView.findViewById(R.id.title);
|
TextView title = contextView.findViewById(R.id.title);
|
||||||
|
|
||||||
bannerBack.setImageResource(R.mipmap.start_level);
|
|
||||||
iconStart.setImageResource(R.mipmap.icon_start);
|
|
||||||
iconStartNumber.setImageResource(R.mipmap.icon_start_number);
|
|
||||||
if (data.isStart()) {
|
if (data.isStart()) {
|
||||||
startContext.setVisibility(View.VISIBLE);
|
startContext.setVisibility(View.VISIBLE);
|
||||||
Glide.with(context).load(R.mipmap.start_level).into(bannerBack);
|
Glide.with(context).load(R.mipmap.start_level).into(bannerBack);
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ import java.util.Locale;
|
|||||||
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/9.
|
* Created by cxf on 2018/10/9.
|
||||||
@@ -199,23 +198,12 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
super.init();
|
super.init();
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
findViewById(R.id.btn_close).setOnClickListener(this);
|
findViewById(R.id.btn_close).setOnClickListener(this);
|
||||||
GifImageView btn_share = (GifImageView) findViewById(R.id.btn_share);
|
findViewById(R.id.btn_share).setOnClickListener(this);
|
||||||
btn_share.setImageResource(R.mipmap.zan_gif);
|
|
||||||
btn_share.setOnClickListener(this);
|
|
||||||
findViewById(R.id.btn_red_pack).setOnClickListener(this);
|
findViewById(R.id.btn_red_pack).setOnClickListener(this);
|
||||||
GifImageView btn_gift = (GifImageView) findViewById(R.id.btn_gift);
|
findViewById(R.id.btn_gift).setOnClickListener(this);
|
||||||
btn_gift.setImageResource(R.mipmap.live_lw);
|
findViewById(R.id.btn_zg).setOnClickListener(this);
|
||||||
btn_gift.setOnClickListener(this);
|
|
||||||
GifImageView btn_zg = (GifImageView) findViewById(R.id.btn_zg);
|
|
||||||
btn_zg.setImageResource(R.mipmap.zg);
|
|
||||||
btn_zg.setOnClickListener(this);
|
|
||||||
|
|
||||||
GifImageView onecz = (GifImageView) findViewById(R.id.img_onecz);
|
|
||||||
onecz.setImageResource(R.mipmap.onecz);
|
|
||||||
|
|
||||||
voiceButton = (LinearLayout) findViewById(R.id.voice_button);
|
voiceButton = (LinearLayout) findViewById(R.id.voice_button);
|
||||||
giftImage = (ImageView) findViewById(R.id.gift_image);
|
giftImage = (ImageView) findViewById(R.id.gift_image);
|
||||||
giftImage.setImageResource(R.mipmap.live_lw);
|
|
||||||
liveNewPeople = (ImageView) findViewById(R.id.live_new_people);
|
liveNewPeople = (ImageView) findViewById(R.id.live_new_people);
|
||||||
svga_new_user_gif = (SVGAImageView) findViewById(R.id.svga_new_user_gif);
|
svga_new_user_gif = (SVGAImageView) findViewById(R.id.svga_new_user_gif);
|
||||||
svga_new_user_double = (SVGAImageView) findViewById(R.id.svga_new_user_double);
|
svga_new_user_double = (SVGAImageView) findViewById(R.id.svga_new_user_double);
|
||||||
@@ -261,9 +249,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
GifImageView btn_hd = (GifImageView) findViewById(R.id.btn_hd);
|
findViewById(R.id.btn_hd).setOnClickListener(new View.OnClickListener() {//游戏,活动按钮
|
||||||
btn_hd.setImageResource(R.mipmap.play);
|
|
||||||
btn_hd.setOnClickListener(new View.OnClickListener() {//游戏,活动按钮
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
LivePromotionDialogFragment fragment = new LivePromotionDialogFragment();
|
LivePromotionDialogFragment fragment = new LivePromotionDialogFragment();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.yunbao.common.utils.Bus;
|
|||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
@@ -131,6 +132,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.graphics.drawable.Drawable;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -25,6 +26,7 @@ import com.lxj.xpopup.core.BasePopupView;
|
|||||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.LiveClassBean;
|
import com.yunbao.common.bean.LiveClassBean;
|
||||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
@@ -38,6 +40,7 @@ import com.yunbao.common.utils.Bus;
|
|||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.ProcessImageUtil;
|
import com.yunbao.common.utils.ProcessImageUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@@ -63,6 +66,7 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||||
import cn.rongcloud.rtc.api.stream.RCRTCCameraOutputStream;
|
import cn.rongcloud.rtc.api.stream.RCRTCCameraOutputStream;
|
||||||
@@ -76,7 +80,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
private EditText mEditTitle;
|
private EditText mEditTitle;
|
||||||
private ProcessImageUtil mImageUtil;
|
private ProcessImageUtil mImageUtil;
|
||||||
private File mAvatarFile;
|
private File mAvatarFile;
|
||||||
private TextView mLiveClass;
|
private TextView mLiveClass, anchorAgreement;
|
||||||
private TextView mLiveTypeTextView, liveClarity;//房间类型TextView
|
private TextView mLiveTypeTextView, liveClarity;//房间类型TextView
|
||||||
private TextView mLiveWishListTextView;//心愿单TextView
|
private TextView mLiveWishListTextView;//心愿单TextView
|
||||||
private int mLiveClassID;//直播频道id
|
private int mLiveClassID;//直播频道id
|
||||||
@@ -88,9 +92,10 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
private LiveClassBean classBean;
|
private LiveClassBean classBean;
|
||||||
private FaceManager manager;
|
private FaceManager manager;
|
||||||
private TextView faceTextView;//提示人脸未检测到的TextView
|
private TextView faceTextView;//提示人脸未检测到的TextView
|
||||||
private ImageView imgClarity;
|
private ImageView imgClarity, selectorProtocol;
|
||||||
private int selectClarity = 1;
|
private int selectClarity = 1;
|
||||||
private LiveOpenCustomPopup liveOpenCustomPopup;
|
private LiveOpenCustomPopup liveOpenCustomPopup;
|
||||||
|
private boolean selector = true;
|
||||||
|
|
||||||
public LiveNewReadyRyViewHolder(Context context, ViewGroup parentView, int liveSdk) {
|
public LiveNewReadyRyViewHolder(Context context, ViewGroup parentView, int liveSdk) {
|
||||||
super(context, parentView, liveSdk);
|
super(context, parentView, liveSdk);
|
||||||
@@ -112,7 +117,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
public void init() {
|
public void init() {
|
||||||
mRootView = (ConstraintLayout) findViewById(R.id.traceroute_rootview);
|
mRootView = (ConstraintLayout) findViewById(R.id.traceroute_rootview);
|
||||||
imgClarity = (ImageView) findViewById(R.id.img_clarity);
|
imgClarity = (ImageView) findViewById(R.id.img_clarity);
|
||||||
|
selectorProtocol = (ImageView) findViewById(R.id.selector_protocol);
|
||||||
liveClarity = (TextView) findViewById(R.id.live_clarity);
|
liveClarity = (TextView) findViewById(R.id.live_clarity);
|
||||||
|
anchorAgreement = (TextView) findViewById(R.id.anchor_agreement);
|
||||||
mRootView.setOnClickListener(new View.OnClickListener() {
|
mRootView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
@@ -121,6 +128,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mAvatar = (ConstraintLayout) findViewById(R.id.avatar);
|
mAvatar = (ConstraintLayout) findViewById(R.id.avatar);
|
||||||
mAvatar.setOnClickListener(this);
|
mAvatar.setOnClickListener(this);
|
||||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||||
@@ -186,6 +194,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
findViewById(R.id.btn_start_live).setOnClickListener(this);
|
findViewById(R.id.btn_start_live).setOnClickListener(this);
|
||||||
findViewById(R.id.btn_wishlist).setOnClickListener(this);
|
findViewById(R.id.btn_wishlist).setOnClickListener(this);
|
||||||
findViewById(R.id.btn_horizontally).setOnClickListener(this);
|
findViewById(R.id.btn_horizontally).setOnClickListener(this);
|
||||||
|
findViewById(R.id.anchor_agreement_layout).setOnClickListener(this);
|
||||||
|
|
||||||
if (manager != null) {
|
if (manager != null) {
|
||||||
manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() {
|
manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() {
|
||||||
@@ -271,6 +280,19 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
.asCustom(liveClarityCustomPopup)
|
.asCustom(liveClarityCustomPopup)
|
||||||
.show();
|
.show();
|
||||||
});
|
});
|
||||||
|
String keywordHtml2 = "</font><font color='#FF8D41'size='42px'>" + mContext.getString(R.string.anchor_hint) + "</font>";
|
||||||
|
String contextHtml = "<font color='#ffffff'size='42px'>" + mContext.getString(R.string.anchor_agreement) + "</font>";
|
||||||
|
anchorAgreement.setText(Html.fromHtml(contextHtml + keywordHtml2));
|
||||||
|
selectorProtocol.setPressed(true);
|
||||||
|
selectorProtocol.setSelected(true);
|
||||||
|
selector = selectorProtocol.isSelected();
|
||||||
|
selectorProtocol.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
selector = !selector;
|
||||||
|
selectorProtocol.setSelected(selector);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSelectClarity(int selectClarity) {
|
private void setSelectClarity(int selectClarity) {
|
||||||
@@ -357,6 +379,10 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
} else if (i == R.id.btn_room_type) {
|
} else if (i == R.id.btn_room_type) {
|
||||||
chooseLiveType();
|
chooseLiveType();
|
||||||
} else if (i == R.id.btn_start_live) {
|
} else if (i == R.id.btn_start_live) {
|
||||||
|
if (!selector) {
|
||||||
|
ToastUtil.show(R.string.anchor_agreement_hint);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (mLiveClassID == 0) {
|
if (mLiveClassID == 0) {
|
||||||
ToastUtil.show(R.string.live_choose_live_class);
|
ToastUtil.show(R.string.live_choose_live_class);
|
||||||
return;
|
return;
|
||||||
@@ -524,6 +550,21 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.asCustom(new LiveRobotSettingCustomPopup(mContext))
|
.asCustom(new LiveRobotSettingCustomPopup(mContext))
|
||||||
.show();
|
.show();
|
||||||
|
} else if (i == R.id.anchor_agreement_layout) {
|
||||||
|
String ct = Locale.getDefault().getLanguage();
|
||||||
|
IMLoginModel model = IMLoginManager.get(mContext).getUserInfo();
|
||||||
|
StringBuffer url = new StringBuffer();
|
||||||
|
url.append(CommonAppConfig.HOST);
|
||||||
|
if (TextUtils.equals(ct, "zh")) {
|
||||||
|
url.append("/index.php?g=portal&m=page&a=index&id=671");
|
||||||
|
} else {
|
||||||
|
url.append("/index.php?g=portal&m=page&a=index&id=672");
|
||||||
|
}
|
||||||
|
url.append("&uid=")
|
||||||
|
.append(model.getId())
|
||||||
|
.append("&token=")
|
||||||
|
.append(model.getToken());
|
||||||
|
RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.yunbao.live.views;
|
package com.yunbao.live.views;
|
||||||
|
|
||||||
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
||||||
import static cn.rongcloud.rtc.core.RendererCommon.ScalingType.SCALE_ASPECT_FILL;
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
@@ -35,6 +35,7 @@ import com.lxj.xpopup.core.BasePopupView;
|
|||||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
import com.lzf.easyfloat.EasyFloat;
|
||||||
import com.lzy.okserver.OkDownload;
|
import com.lzy.okserver.OkDownload;
|
||||||
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
@@ -53,6 +54,7 @@ import com.yunbao.common.views.LiveClarityCustomPopup;
|
|||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
|
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.utils.LiveExoPlayerManager;
|
import com.yunbao.live.utils.LiveExoPlayerManager;
|
||||||
|
|
||||||
@@ -89,7 +91,6 @@ import cn.rongcloud.rtc.base.RCRTCRemoteVideoFrame;
|
|||||||
import cn.rongcloud.rtc.base.RCRTCRoomType;
|
import cn.rongcloud.rtc.base.RCRTCRoomType;
|
||||||
import cn.rongcloud.rtc.base.RCRTCStreamType;
|
import cn.rongcloud.rtc.base.RCRTCStreamType;
|
||||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||||
import cn.rongcloud.rtc.center.stream.RCRTCAudioInputStreamImpl;
|
|
||||||
import cn.rongcloud.rtc.core.RendererCommon;
|
import cn.rongcloud.rtc.core.RendererCommon;
|
||||||
|
|
||||||
public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||||
@@ -122,6 +123,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
private TextView debugView;
|
private TextView debugView;
|
||||||
private LiveExoPlayerManager mPlayer;
|
private LiveExoPlayerManager mPlayer;
|
||||||
private boolean isPk = false;
|
private boolean isPk = false;
|
||||||
|
private boolean userJoinLinkMic = false;//用户是否已加入房间
|
||||||
|
|
||||||
//0未申请1申请中2连麦中
|
//0未申请1申请中2连麦中
|
||||||
RCRTCRoom rcrtcRoom;
|
RCRTCRoom rcrtcRoom;
|
||||||
@@ -556,17 +558,17 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
params.addRule(RelativeLayout.ALIGN_TOP);
|
params.addRule(RelativeLayout.ALIGN_TOP);
|
||||||
mVideoView.requestLayout();
|
mVideoView.requestLayout();
|
||||||
}
|
}
|
||||||
if (detailsView != null) {
|
// if (detailsView != null) {
|
||||||
mVideoView.removeView(detailsView);
|
// mVideoView.removeView(detailsView);
|
||||||
detailsView = null;
|
// detailsView = null;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeDetailView(){
|
public void removeDetailView() {
|
||||||
if (detailsView != null) {
|
// if (detailsView != null) {
|
||||||
mVideoView.removeView(detailsView);
|
// mVideoView.removeView(detailsView);
|
||||||
detailsView = null;
|
// detailsView = null;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -730,9 +732,23 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
Log.e("ry", "下麦成功");
|
Log.e("ry", "下麦成功");
|
||||||
// 该用户切换为观众成功,可以以观众身份进行音视频
|
// 该用户切换为观众成功,可以以观众身份进行音视频
|
||||||
//退出rtc播放
|
//退出rtc播放
|
||||||
|
leaveRoom();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当切换失败且不影响当前角色继续音视频时回调
|
||||||
|
* @param errorCode 失败错误码
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onFailed(RTCErrorCode errorCode) {
|
||||||
|
Log.e("ry", "下麦失败" + errorCode);
|
||||||
|
leaveRoom();
|
||||||
|
}
|
||||||
|
private void leaveRoom(){
|
||||||
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
|
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
userJoinLinkMic = false;
|
||||||
Log.e("ry", "退出多人房间成功");
|
Log.e("ry", "退出多人房间成功");
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -758,21 +774,11 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailed(RTCErrorCode errorCode) {
|
public void onFailed(RTCErrorCode errorCode) {
|
||||||
Log.e("ry", errorCode + "退出多人房间成功");
|
Log.e("ry", errorCode + "退出多人房间成功");
|
||||||
|
userJoinLinkMic = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 当切换失败且不影响当前角色继续音视频时回调
|
|
||||||
* @param errorCode 失败错误码
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void onFailed(RTCErrorCode errorCode) {
|
|
||||||
Log.e("ry", "下麦失败" + errorCode);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if ("Debug".equals(str)) {
|
} else if ("Debug".equals(str)) {
|
||||||
@@ -882,6 +888,10 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
public void UsertoRY() {
|
public void UsertoRY() {
|
||||||
userinputStreamList.clear();
|
userinputStreamList.clear();
|
||||||
Log.e("ry", "主播同意了UsertoRY");
|
Log.e("ry", "主播同意了UsertoRY");
|
||||||
|
if (userJoinLinkMic) {//已经在房间内,不再joinRoom直接去连麦
|
||||||
|
subscribeMic(rcrtcRoom);
|
||||||
|
return;
|
||||||
|
}
|
||||||
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
||||||
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
||||||
.setRoomType(RCRTCRoomType.LIVE_AUDIO_VIDEO)
|
.setRoomType(RCRTCRoomType.LIVE_AUDIO_VIDEO)
|
||||||
@@ -892,13 +902,48 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(RCRTCRoom data) {
|
public void onSuccess(RCRTCRoom data) {
|
||||||
|
userJoinLinkMic = true;
|
||||||
rcrtcRoom = data;
|
rcrtcRoom = data;
|
||||||
|
subscribeMic(data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(RTCErrorCode errorCode) {
|
||||||
|
Log.e("ry", LiveActivity.mLiveUid + errorCode + "");
|
||||||
|
if (errorCode.getValue() == 50007) {//userJoinLinkMic可能失效,直接leaveRoom
|
||||||
|
userJoinLinkMic = false;
|
||||||
|
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(RTCErrorCode errorCode) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
UsertoRY();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
ToastUtil.show("房间失败" + errorCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void subscribeMic(RCRTCRoom data) {
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
RCRTCEngine.getInstance().enableSpeaker(true);
|
RCRTCEngine.getInstance().enableSpeaker(true);
|
||||||
//遍历远端用户发布的资源列表
|
//遍历远端用户发布的资源列表
|
||||||
|
Log.i(TAG, "软件资源数量:"+data.getLiveStreams().size());
|
||||||
for (RCRTCInputStream stream : data.getLiveStreams()) {
|
for (RCRTCInputStream stream : data.getLiveStreams()) {
|
||||||
|
Log.i(TAG, "资源流 type: "+stream.getMediaType());
|
||||||
if (stream.getMediaType() == RCRTCMediaType.VIDEO) {
|
if (stream.getMediaType() == RCRTCMediaType.VIDEO) {
|
||||||
//暂停播放
|
//暂停播放
|
||||||
mPlayer.stop();
|
mPlayer.stop();
|
||||||
@@ -937,19 +982,6 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailed(RTCErrorCode errorCode) {
|
|
||||||
Log.e("ry", LiveActivity.mLiveUid + errorCode + "");
|
|
||||||
ToastUtil.show("房间失败" + errorCode);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1221,129 +1253,28 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int mPkTimeCount = 0;
|
private int mPkTimeCount = 0;
|
||||||
private Handler countdownHandler = new Handler();
|
|
||||||
private View detailsView = null;
|
|
||||||
private FrameLayout timeTitle;
|
|
||||||
private TextView textTime;
|
|
||||||
private TextView textPkName1, textPkName2, textPkName3, textPkName4;
|
|
||||||
private TextView textGrade1, textGrade2, textGrade3, textGrade4;
|
|
||||||
private ImageView imageGrade1, imageGrade2, imageGrade3, imageGrade4;
|
|
||||||
private LinearLayout linearGrade1, linearGrade2, linearGrade3, linearGrade4;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PK倒计时
|
|
||||||
*/
|
|
||||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
|
||||||
|
|
||||||
if (detailsView == null) {
|
|
||||||
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
|
|
||||||
timeTitle = detailsView.findViewById(R.id.time_title);
|
|
||||||
textTime = detailsView.findViewById(R.id.text_time);
|
|
||||||
linearGrade1 = detailsView.findViewById(R.id.lin_pk1);
|
|
||||||
linearGrade2 = detailsView.findViewById(R.id.lin_pk2);
|
|
||||||
linearGrade3 = detailsView.findViewById(R.id.lin_pk3);
|
|
||||||
linearGrade4 = detailsView.findViewById(R.id.lin_pk4);
|
|
||||||
textPkName1 = detailsView.findViewById(R.id.text_pk_name1);
|
|
||||||
textPkName2 = detailsView.findViewById(R.id.text_pk_name2);
|
|
||||||
textPkName3 = detailsView.findViewById(R.id.text_pk_name3);
|
|
||||||
textPkName4 = detailsView.findViewById(R.id.text_pk_name4);
|
|
||||||
textGrade1 = detailsView.findViewById(R.id.text_grade1);
|
|
||||||
textGrade2 = detailsView.findViewById(R.id.text_grade2);
|
|
||||||
textGrade3 = detailsView.findViewById(R.id.text_grade3);
|
|
||||||
textGrade4 = detailsView.findViewById(R.id.text_grade4);
|
|
||||||
imageGrade1 = detailsView.findViewById(R.id.image_grade1);
|
|
||||||
imageGrade2 = detailsView.findViewById(R.id.image_grade2);
|
|
||||||
imageGrade3 = detailsView.findViewById(R.id.image_grade3);
|
|
||||||
imageGrade4 = detailsView.findViewById(R.id.image_grade4);
|
|
||||||
linearGrade1.setVisibility(View.GONE);
|
|
||||||
linearGrade2.setVisibility(View.GONE);
|
|
||||||
linearGrade3.setVisibility(View.GONE);
|
|
||||||
linearGrade4.setVisibility(View.GONE);
|
|
||||||
mVideoView.addView(detailsView);
|
|
||||||
|
|
||||||
|
public interface PlayViewLayoutInterface {
|
||||||
|
void playViewLayout(int width, int height);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < pkScores.size(); i++) {
|
private PlayViewLayoutInterface layoutInterface;
|
||||||
JSONObject score = pkScores.getJSONObject(i);
|
|
||||||
String userNiceName = score.getString("user_nicename");
|
|
||||||
long userScore = score.getLong("score");
|
|
||||||
int resScore = R.mipmap.icon_livepk_no1;
|
|
||||||
if (userScore == 0 && !score.containsKey("paiming")) {
|
|
||||||
resScore = R.mipmap.icon_livepk_no1;
|
|
||||||
} else {
|
|
||||||
if (score.containsKey("paiming")) {
|
|
||||||
int ranking = score.getIntValue("paiming");
|
|
||||||
switch (ranking) {
|
|
||||||
case 1:
|
|
||||||
resScore = R.mipmap.icon_livepk_no1;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
resScore = R.mipmap.icon_livepk_no2;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
resScore = R.mipmap.icon_livepk_no3;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
resScore = R.mipmap.icon_livepk_no4;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i == 0) {
|
|
||||||
linearGrade1.setVisibility(View.VISIBLE);
|
|
||||||
textPkName1.setText(userNiceName);
|
|
||||||
ImgLoader.display(mContext, resScore, imageGrade1);
|
|
||||||
textGrade1.setText(String.valueOf(userScore));
|
|
||||||
} else if (i == 1) {
|
|
||||||
linearGrade2.setVisibility(View.VISIBLE);
|
|
||||||
textPkName2.setText(userNiceName);
|
|
||||||
ImgLoader.display(mContext, resScore, imageGrade2);
|
|
||||||
textGrade2.setText(String.valueOf(userScore));
|
|
||||||
} else if (i == 2) {
|
|
||||||
linearGrade4.setVisibility(View.VISIBLE);
|
|
||||||
textPkName4.setText(userNiceName);
|
|
||||||
ImgLoader.display(mContext, resScore, imageGrade4);
|
|
||||||
textGrade4.setText(String.valueOf(userScore));
|
|
||||||
} else if (i == 3) {
|
|
||||||
linearGrade3.setVisibility(View.VISIBLE);
|
|
||||||
textPkName3.setText(userNiceName);
|
|
||||||
ImgLoader.display(mContext, resScore, imageGrade3);
|
|
||||||
textGrade3.setText(String.valueOf(userScore));
|
|
||||||
|
|
||||||
}
|
public void setLayoutInterface(PlayViewLayoutInterface layoutInterface) {
|
||||||
}
|
mVideoView.post(new Runnable() {
|
||||||
|
|
||||||
if (time > 0) {
|
|
||||||
mPkTimeCount = time;
|
|
||||||
timeTitle.setVisibility(View.VISIBLE);
|
|
||||||
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private Runnable countdownRunnable = new Runnable() {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
mPkTimeCount--;
|
int width = mVideoView.getMeasuredWidth();
|
||||||
if (mPkTimeCount > 0) {//
|
int height = mVideoView.getMeasuredHeight();
|
||||||
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
|
if (layoutInterface != null) {
|
||||||
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
|
layoutInterface.playViewLayout(width, height);
|
||||||
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
|
|
||||||
} else {
|
|
||||||
timeTitle.setVisibility(View.GONE);
|
|
||||||
countdownHandler.removeCallbacks(countdownRunnable);
|
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.PK_TIME_COUNT));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取下一秒钟的时间
|
|
||||||
*/
|
|
||||||
private long getNextSecondTime() {
|
|
||||||
long now = SystemClock.uptimeMillis();
|
|
||||||
return now + (1000 - now % 1000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,8 +116,9 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
|||||||
//修改上面主播的头像
|
//修改上面主播的头像
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onUPAnchorInfo(AnchorInfoEvent e) {
|
public void onUPAnchorInfo(AnchorInfoEvent e) {
|
||||||
|
Log.i(TAG, "onUPAnchorInfo: "+e);
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
if (e.isClear() == false) {
|
if (!e.isClear()) {
|
||||||
tv_avatarOther_name.setText(e.getUserNiceName());
|
tv_avatarOther_name.setText(e.getUserNiceName());
|
||||||
ImgLoader.displayAvatar(mContext, e.getAvatar(), avatarOther);
|
ImgLoader.displayAvatar(mContext, e.getAvatar(), avatarOther);
|
||||||
goto_room_view.setVisibility(View.VISIBLE);
|
goto_room_view.setVisibility(View.VISIBLE);
|
||||||
@@ -355,7 +356,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.live.views;
|
package com.yunbao.live.views;
|
||||||
|
|
||||||
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
||||||
|
import static com.yunbao.live.views.LivePushRyViewHolder.btn_close;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@@ -36,7 +37,6 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -80,6 +80,7 @@ import com.yunbao.common.bean.RewardAllModel;
|
|||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
import com.yunbao.common.bean.TaskModel;
|
import com.yunbao.common.bean.TaskModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
import com.yunbao.common.event.AnchorInfoEvent;
|
||||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
@@ -116,7 +117,6 @@ import com.yunbao.live.activity.LiveAudienceActivity;
|
|||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||||
import com.yunbao.live.adapter.LiveChatAdapter;
|
import com.yunbao.live.adapter.LiveChatAdapter;
|
||||||
import com.yunbao.live.adapter.LiveChatRecyclerViewLayoutManager;
|
|
||||||
import com.yunbao.live.adapter.LiveRoomFastMessageRecyclerViewAdapter;
|
import com.yunbao.live.adapter.LiveRoomFastMessageRecyclerViewAdapter;
|
||||||
import com.yunbao.live.adapter.LiveUserAdapter;
|
import com.yunbao.live.adapter.LiveUserAdapter;
|
||||||
import com.yunbao.live.bean.DrPkbean;
|
import com.yunbao.live.bean.DrPkbean;
|
||||||
@@ -154,7 +154,6 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -464,14 +463,17 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean visibility = false;
|
||||||
|
|
||||||
public void hotAddVisibility(boolean visibility) {
|
public void hotAddVisibility(boolean visibility) {
|
||||||
|
this.visibility = visibility;
|
||||||
ft_hot_add.setVisibility(visibility ? View.GONE : View.VISIBLE);
|
ft_hot_add.setVisibility(visibility ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endDRGif() {
|
public void endDRGif() {
|
||||||
if (dr_pk_end_gif.getVisibility() == View.GONE) {
|
if (dr_pk_end_gif.getVisibility() == View.GONE) {
|
||||||
dr_pk_end_gif.setImageResource(R.mipmap.drpkend);
|
|
||||||
dr_pk_end_gif.setVisibility(View.VISIBLE);
|
dr_pk_end_gif.setVisibility(View.VISIBLE);
|
||||||
|
visibility = false;
|
||||||
RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置
|
RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置
|
||||||
Glide.with(mContext).asGif()
|
Glide.with(mContext).asGif()
|
||||||
.apply(options)//应用配置
|
.apply(options)//应用配置
|
||||||
@@ -1220,6 +1222,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
*/
|
*/
|
||||||
public void resetView() {
|
public void resetView() {
|
||||||
resetViewGone();
|
resetViewGone();
|
||||||
|
visibility = false;
|
||||||
mBannerList1.clear();
|
mBannerList1.clear();
|
||||||
mBannerList2.clear();
|
mBannerList2.clear();
|
||||||
mBannerList3.clear();
|
mBannerList3.clear();
|
||||||
@@ -1822,7 +1825,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2090,10 +2093,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
//双人pk关闭
|
//双人pk关闭
|
||||||
public void closePkTwo() {
|
public void closePkTwo() {
|
||||||
|
Log.e("LiveRoomViewHolder", "closePkTwo: 隐藏PK信息" + goto_room_view.getVisibility());
|
||||||
mPkRankTopIcon.setVisibility(View.GONE);
|
mPkRankTopIcon.setVisibility(View.GONE);
|
||||||
lt_pk_line.setVisibility(View.GONE);
|
lt_pk_line.setVisibility(View.GONE);
|
||||||
livePKUserListBean = new LivePKUserListBean();
|
|
||||||
pkUid = "";
|
pkUid = "";
|
||||||
|
if (btn_close != null) {
|
||||||
|
btn_close.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
goto_room_view.setVisibility(View.GONE);
|
||||||
|
livePKUserListBean = new LivePKUserListBean();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3158,7 +3166,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
if ("1".equals(info[0])) {
|
if ("1".equals(info[0]) && !visibility) {
|
||||||
ft_hot_add.setVisibility(View.VISIBLE);
|
ft_hot_add.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
ft_hot_add.setVisibility(View.GONE);
|
ft_hot_add.setVisibility(View.GONE);
|
||||||
@@ -3171,9 +3179,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
/**
|
/**
|
||||||
* 获取是否有热度卡加成
|
* 获取是否有热度卡加成
|
||||||
*/
|
*/
|
||||||
public static void getIsHot(String isUseHotCard) {
|
public void getIsHot(String isUseHotCard) {
|
||||||
ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
|
ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
|
||||||
if ("1".equals(isUseHotCard)) {
|
if ("1".equals(isUseHotCard) && !visibility) {
|
||||||
ft_hot_add.setVisibility(View.VISIBLE);
|
ft_hot_add.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
ft_hot_add.setVisibility(View.GONE);
|
ft_hot_add.setVisibility(View.GONE);
|
||||||
@@ -3695,7 +3703,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST);
|
LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST);
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.TIME_CHARGE);
|
LiveHttpUtil.cancel(LiveHttpConsts.TIME_CHARGE);
|
||||||
CommonHttpUtil.cancel(CommonHttpConsts.SET_ATTENTION);
|
CommonHttpUtil.cancel(CommonHttpConsts.SET_ATTENTION);
|
||||||
clearImageView();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
@@ -3907,10 +3914,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mLiveChatAdapter.insertItem(bean);
|
mLiveChatAdapter.insertItem(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 幸运100%活动
|
* 幸运100%活动
|
||||||
*/
|
*/
|
||||||
public void lucky100(MsgModel model){
|
public void lucky100(MsgModel model) {
|
||||||
if (mLiveChatAdapter != null) {
|
if (mLiveChatAdapter != null) {
|
||||||
LiveChatBean bean = new LiveChatBean();
|
LiveChatBean bean = new LiveChatBean();
|
||||||
bean.setType(LiveChatBean.LUCKY_100_CHECK);
|
bean.setType(LiveChatBean.LUCKY_100_CHECK);
|
||||||
@@ -3934,6 +3942,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
new Handler(Looper.getMainLooper()).postDelayed(this::initPkRank, 300);
|
new Handler(Looper.getMainLooper()).postDelayed(this::initPkRank, 300);
|
||||||
break;
|
break;
|
||||||
case PK_TWO_END:
|
case PK_TWO_END:
|
||||||
|
EventBus.getDefault().post(new AnchorInfoEvent(true, "", "", ""));
|
||||||
closePkTwo();
|
closePkTwo();
|
||||||
break;
|
break;
|
||||||
case CUSTOM_FULL_SERVICE_NOTIFY:
|
case CUSTOM_FULL_SERVICE_NOTIFY:
|
||||||
@@ -3944,7 +3953,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
break;
|
break;
|
||||||
case UP_PK_TWO:
|
case UP_PK_TWO:
|
||||||
pkUid = (String) event.getObject();
|
pkUid = (String) event.getObject();
|
||||||
ToastUtil.show("对方UID=" + pkUid);
|
|
||||||
UpPkTwo();
|
UpPkTwo();
|
||||||
break;
|
break;
|
||||||
case CHANGE_VIEW:
|
case CHANGE_VIEW:
|
||||||
@@ -4012,22 +4020,172 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
private Handler countdownHandler = new Handler();
|
||||||
|
private View detailsView = null;
|
||||||
|
private FrameLayout timeTitle;
|
||||||
|
private TextView textTime;
|
||||||
|
private TextView textPkName1, textPkName2, textPkName3, textPkName4;
|
||||||
|
private TextView textGrade1, textGrade2, textGrade3, textGrade4;
|
||||||
|
private ImageView imageGrade1, imageGrade2, imageGrade3, imageGrade4;
|
||||||
|
private LinearLayout linearGrade1, linearGrade2, linearGrade3, linearGrade4;
|
||||||
|
/**
|
||||||
|
* PK倒计时
|
||||||
|
*/
|
||||||
|
private String userId2, userId3 = "", userId4;
|
||||||
|
|
||||||
private void clearImageView() {
|
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||||
try {
|
if (detailsView == null) {
|
||||||
Field[] fields = getClass().getFields();
|
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
|
||||||
int i = 0;
|
timeTitle = detailsView.findViewById(R.id.time_title);
|
||||||
for (Field field : fields) {
|
textTime = detailsView.findViewById(R.id.text_time);
|
||||||
field.setAccessible(true);
|
linearGrade1 = detailsView.findViewById(R.id.lin_pk1);
|
||||||
if (field.get(this) instanceof ImageView) {
|
linearGrade2 = detailsView.findViewById(R.id.lin_pk2);
|
||||||
((ImageView) field.get(this)).setImageDrawable(null);
|
linearGrade3 = detailsView.findViewById(R.id.lin_pk3);
|
||||||
i++;
|
linearGrade4 = detailsView.findViewById(R.id.lin_pk4);
|
||||||
}
|
textPkName1 = detailsView.findViewById(R.id.text_pk_name1);
|
||||||
}
|
textPkName2 = detailsView.findViewById(R.id.text_pk_name2);
|
||||||
Log.i("清理图片缓存", "clearImageView: "+i);
|
textPkName3 = detailsView.findViewById(R.id.text_pk_name3);
|
||||||
} catch (Exception e) {
|
textPkName4 = detailsView.findViewById(R.id.text_pk_name4);
|
||||||
e.printStackTrace();
|
textGrade1 = detailsView.findViewById(R.id.text_grade1);
|
||||||
|
textGrade2 = detailsView.findViewById(R.id.text_grade2);
|
||||||
|
textGrade3 = detailsView.findViewById(R.id.text_grade3);
|
||||||
|
textGrade4 = detailsView.findViewById(R.id.text_grade4);
|
||||||
|
imageGrade1 = detailsView.findViewById(R.id.image_grade1);
|
||||||
|
imageGrade2 = detailsView.findViewById(R.id.image_grade2);
|
||||||
|
imageGrade3 = detailsView.findViewById(R.id.image_grade3);
|
||||||
|
imageGrade4 = detailsView.findViewById(R.id.image_grade4);
|
||||||
|
linearGrade1.setVisibility(View.GONE);
|
||||||
|
linearGrade2.setVisibility(View.GONE);
|
||||||
|
linearGrade3.setVisibility(View.GONE);
|
||||||
|
linearGrade4.setVisibility(View.GONE);
|
||||||
|
mRoot.addView(detailsView);
|
||||||
|
mRoot.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
int mScreenWdith = ScreenDimenUtil.getInstance().getScreenWdith();
|
||||||
|
int vHeight = mScreenWdith * 720 / 960;
|
||||||
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams();
|
||||||
|
params.height = vHeight;
|
||||||
|
params.width = mScreenWdith;
|
||||||
|
params.topMargin = DpUtil.dp2px(105);
|
||||||
|
params.addRule(RelativeLayout.ALIGN_TOP);
|
||||||
|
detailsView.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < pkScores.size(); i++) {
|
||||||
|
JSONObject score = pkScores.getJSONObject(i);
|
||||||
|
String userNiceName = score.getString("user_nicename");
|
||||||
|
long userScore = score.getLong("score");
|
||||||
|
String userId = score.getString("id");
|
||||||
|
int resScore = R.mipmap.icon_livepk_no1;
|
||||||
|
if (userScore == 0 && !score.containsKey("paiming")) {
|
||||||
|
resScore = R.mipmap.icon_livepk_no1;
|
||||||
|
} else {
|
||||||
|
if (score.containsKey("paiming")) {
|
||||||
|
int ranking = score.getIntValue("paiming");
|
||||||
|
switch (ranking) {
|
||||||
|
case 1:
|
||||||
|
resScore = R.mipmap.icon_livepk_no1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
resScore = R.mipmap.icon_livepk_no2;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
resScore = R.mipmap.icon_livepk_no3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
resScore = R.mipmap.icon_livepk_no4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == 0) {
|
||||||
|
linearGrade1.setVisibility(View.VISIBLE);
|
||||||
|
textPkName1.setText(userNiceName);
|
||||||
|
ImgLoader.display(mContext, resScore, imageGrade1);
|
||||||
|
textGrade1.setText(String.valueOf(userScore));
|
||||||
|
|
||||||
|
} else if (i == 1) {
|
||||||
|
linearGrade2.setVisibility(View.VISIBLE);
|
||||||
|
textPkName2.setText(userNiceName);
|
||||||
|
ImgLoader.display(mContext, resScore, imageGrade2);
|
||||||
|
textGrade2.setText(String.valueOf(userScore));
|
||||||
|
userId2 = userId;
|
||||||
|
} else if (i == 2) {
|
||||||
|
if (pkScores.size() == 3) {
|
||||||
|
linearGrade4.setVisibility(View.VISIBLE);
|
||||||
|
textPkName4.setText(userNiceName);
|
||||||
|
ImgLoader.display(mContext, resScore, imageGrade4);
|
||||||
|
textGrade4.setText(String.valueOf(userScore));
|
||||||
|
userId4 = userId;
|
||||||
|
} else {
|
||||||
|
linearGrade3.setVisibility(View.VISIBLE);
|
||||||
|
textPkName3.setText(userNiceName);
|
||||||
|
ImgLoader.display(mContext, resScore, imageGrade3);
|
||||||
|
textGrade3.setText(String.valueOf(userScore));
|
||||||
|
userId3 = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (i == 3) {
|
||||||
|
linearGrade4.setVisibility(View.VISIBLE);
|
||||||
|
textPkName4.setText(userNiceName);
|
||||||
|
ImgLoader.display(mContext, resScore, imageGrade4);
|
||||||
|
textGrade4.setText(String.valueOf(userScore));
|
||||||
|
userId4 = userId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (time > 0) {
|
||||||
|
mPkTimeCount = time;
|
||||||
|
timeTitle.setVisibility(View.VISIBLE);
|
||||||
|
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
|
||||||
|
}
|
||||||
|
textPkName2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
showUserDialog(userId2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
textPkName4.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
showUserDialog(userId4);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
textPkName3.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
showUserDialog(userId3);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private Runnable countdownRunnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mPkTimeCount--;
|
||||||
|
if (mPkTimeCount > 0) {//
|
||||||
|
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
|
||||||
|
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
|
||||||
|
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
|
||||||
|
} else {
|
||||||
|
timeTitle.setVisibility(View.GONE);
|
||||||
|
countdownHandler.removeCallbacks(countdownRunnable);
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.PK_TIME_COUNT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public void removeDetailView() {
|
||||||
|
if (detailsView != null) {
|
||||||
|
mRoot.removeView(detailsView);
|
||||||
|
detailsView = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
|||||||
super(context, parentView);
|
super(context, parentView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public long getmAnchorLiveTime() {
|
||||||
|
return mAnchorLiveTime;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@@ -345,6 +348,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
Log.e("PortraitLiveManager", error);
|
Log.e("PortraitLiveManager", error);
|
||||||
|
ToastUtil.show( R.string.net_error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
public synchronized void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) {
|
public synchronized void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) {
|
||||||
isEnterRoom = false;
|
isEnterRoom = false;
|
||||||
openParametersModel = new OpenParametersModel();
|
openParametersModel = new OpenParametersModel();
|
||||||
if(mLiveRoomViewHolder!=null){
|
if (mLiveRoomViewHolder != null) {
|
||||||
mLiveRoomViewHolder.UpPkTwo();
|
mLiveRoomViewHolder.UpPkTwo();
|
||||||
}
|
}
|
||||||
mContext.runOnUiThread(new Runnable() {
|
mContext.runOnUiThread(new Runnable() {
|
||||||
@@ -581,6 +581,15 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
|
|
||||||
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
|
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
|
||||||
}
|
}
|
||||||
|
// mLivePlayViewHolder.setLayoutInterface(new LivePlayRyViewHolder.PlayViewLayoutInterface() {
|
||||||
|
// @Override
|
||||||
|
// public void playViewLayout(int width, int height) {
|
||||||
|
// Log.e("播放器的宽高", "宽:" + width + " 高:" + height);
|
||||||
|
// ScreenDimenUtil util = ScreenDimenUtil.getInstance();
|
||||||
|
// int mScreenWdith = util.getScreenWdith();
|
||||||
|
// Log.e("播放器的宽高", "mScreenWdith:" + mScreenWdith + " mScreenheight :" + mScreenWdith * 720 / 960);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
//守护相关
|
//守护相关
|
||||||
mLiveGuardInfo = new LiveGuardInfo();
|
mLiveGuardInfo = new LiveGuardInfo();
|
||||||
int guardNum = Integer.parseInt(data.getEnterRoomInfo().getGuardNums());
|
int guardNum = Integer.parseInt(data.getEnterRoomInfo().getGuardNums());
|
||||||
@@ -617,7 +626,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(R.string.net_error);
|
||||||
//直播间上部轮播【新人特惠】【趣味游戏】【幸运天使】 轮播接口
|
//直播间上部轮播【新人特惠】【趣味游戏】【幸运天使】 轮播接口
|
||||||
mLiveRoomViewHolder.showLiveRoomActivityBanner();
|
mLiveRoomViewHolder.showLiveRoomActivityBanner();
|
||||||
}
|
}
|
||||||
@@ -1830,7 +1839,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
* @param time
|
* @param time
|
||||||
*/
|
*/
|
||||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||||
if (mLivePlayViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
String liveId = mLiveBean.getUid();
|
String liveId = mLiveBean.getUid();
|
||||||
JSONObject liveModel = null;
|
JSONObject liveModel = null;
|
||||||
//调整数据
|
//调整数据
|
||||||
@@ -1844,8 +1853,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
pkScores.remove(index);
|
pkScores.remove(index);
|
||||||
pkScores.add(0, liveModel);
|
pkScores.add(0, liveModel);
|
||||||
mLivePlayViewHolder.upDataPkScore(pkScores, time);
|
mLiveRoomViewHolder.upDataPkScore(pkScores, time);
|
||||||
|
setPkStatus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1855,4 +1864,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeDetailView() {
|
||||||
|
if (mLiveRoomViewHolder != null) {
|
||||||
|
mLiveRoomViewHolder.removeDetailView();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
live/src/main/res/drawable/background_151515.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<solid android:color="#1A1A1A" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
9
live/src/main/res/drawable/background_595959.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
<solid android:color="#595959" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
9
live/src/main/res/drawable/background_6cbe53.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
<solid android:color="#6CBE53" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
@@ -195,6 +195,9 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:maxWidth="80dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/live_blowkiss_time"
|
android:text="@string/live_blowkiss_time"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1.2" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
81
live/src/main/res/layout/dialog_live_data.xml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?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:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:background="#000002">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="13dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/live_data_msg1"
|
||||||
|
android:textColor="#808080"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.1"
|
||||||
|
android:gravity="end|center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_data_img"
|
||||||
|
android:layout_width="13dp"
|
||||||
|
android:layout_height="13dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
tools:srcCompat="@mipmap/icon_free_pk_waring" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/live_data_msg2"
|
||||||
|
android:textColor="#595959" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/live_data_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="2"
|
||||||
|
tools:listitem="@layout/item_live_data" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/live_data_tip"
|
||||||
|
android:textColor="#808080" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@@ -10,7 +9,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -38,7 +36,7 @@
|
|||||||
android:onClick="backClick"
|
android:onClick="backClick"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/icon_back"
|
android:src="@mipmap/icon_back"
|
||||||
app:tint="@color/textColor" />
|
android:tint="@color/textColor" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img_more"
|
android:id="@+id/img_more"
|
||||||
@@ -48,21 +46,21 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/btn_more_black"
|
android:src="@mipmap/btn_more_black"
|
||||||
android:visibility="gone"
|
android:tint="@color/textColor"
|
||||||
app:tint="@color/textColor" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/html_error"
|
android:id="@+id/html_error"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<!-- <WebView
|
<WebView
|
||||||
android:id="@+id/rlWebview"
|
android:id="@+id/rlWebview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />-->
|
android:layout_height="match_parent" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
95
live/src/main/res/layout/dialog_live_task.xml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<?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:layout_height="600dp"
|
||||||
|
|
||||||
|
android:background="#000002">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="13dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/task_new_star_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="14dp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_task_banner1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/task_new_star_time"
|
||||||
|
tools:srcCompat="@mipmap/dialog_task_new_star" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_task_banner2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/live_task_banner1"
|
||||||
|
tools:srcCompat="@mipmap/dialog_task_info" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/live_task_menu"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/live_task_tip"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/live_task_banner2"
|
||||||
|
app:tabIndicatorColor="#F6F7FB"
|
||||||
|
app:tabIndicatorFullWidth="false"
|
||||||
|
app:tabMaxWidth="100dp"
|
||||||
|
app:tabMode="scrollable"
|
||||||
|
app:tabSelectedTextColor="#F6F7FB"
|
||||||
|
app:tabTextColor="#9A9A9A" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_task_tip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/live_task_banner2"
|
||||||
|
tools:srcCompat="@mipmap/icon_guize" />
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/live_task_viewpager"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/live_task_menu" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
66
live/src/main/res/layout/dialog_live_task_info.xml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?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:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:background="#000002">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="13dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_task_info_back"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
tools:srcCompat="@mipmap/icon_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/live_task_info_title"
|
||||||
|
android:textColor="#808080"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/background_151515"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:text="@string/live_task_info_msg1"
|
||||||
|
android:textColor="#80CEF2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:text="@string/live_task_info_msg2"
|
||||||
|
android:textColor="#CCCCCC" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -171,8 +171,10 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/guard_btn_buy"
|
android:id="@+id/guard_btn_buy"
|
||||||
android:layout_width="90dp"
|
android:layout_width="110dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="15dp"
|
android:layout_marginEnd="15dp"
|
||||||
@@ -214,7 +216,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="14dp"
|
android:layout_marginStart="14dp"
|
||||||
android:text="充值"
|
android:text="@string/charge"
|
||||||
android:textColor="#F7B500"
|
android:textColor="#F7B500"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@@ -231,7 +233,7 @@
|
|||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_marginTop="2dp"
|
||||||
android:background="@drawable/bg_new_guard_but"
|
android:background="@drawable/bg_new_guard_but"
|
||||||
android:text="繼續守護"
|
android:text="@string/Continue_to_guard"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/guard_btn_buy"
|
android:id="@+id/guard_btn_buy"
|
||||||
android:layout_width="90dp"
|
android:layout_width="110dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:text="開通貴族,尊享超多特權!"
|
android:text="@string/enjoy_a_lot"
|
||||||
android:textColor="#ffc2dff0"
|
android:textColor="#ffc2dff0"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
android:layout_marginRight="20dp"
|
android:layout_marginRight="20dp"
|
||||||
android:background="@mipmap/btn_openvip"
|
android:background="@mipmap/btn_openvip"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="開通貴族"
|
android:text="@string/live_ktgz"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
44
live/src/main/res/layout/item_live_data.xml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?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:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/background_151515">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_data"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="11dp"
|
||||||
|
android:text="111"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingEnd="14dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:text="222"
|
||||||
|
android:textColor="#808080"
|
||||||
|
android:textSize="14sp"
|
||||||
|
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/item_data" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
89
live/src/main/res/layout/item_live_task.xml
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?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:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/background_151515">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_task_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="11dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_task_complete"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:background="@drawable/background_6cbe53"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="14dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="10sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/item_task_title" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/item_task_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/item_task_title">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/item_task_hot_img"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:srcCompat="@mipmap/dialog_task_hot" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_task_hot"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#B3B3B3"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/item_task_layout"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/item_task_title">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/item_task_xp_img"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:srcCompat="@mipmap/dialog_task_star" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_task_xp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#B3B3B3"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
android:id="@+id/img_onecz"
|
android:id="@+id/img_onecz"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:adjustViewBounds="true" />
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@mipmap/onecz" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -143,6 +144,7 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@mipmap/img_bg"
|
android:background="@mipmap/img_bg"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/zg"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +166,7 @@
|
|||||||
android:layout_width="33dp"
|
android:layout_width="33dp"
|
||||||
android:layout_height="33dp"
|
android:layout_height="33dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
/>
|
android:src="@mipmap/play" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -179,6 +181,7 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@mipmap/img_bg"
|
android:background="@mipmap/img_bg"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/zan_gif"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<pl.droidsonroids.gif.GifImageView
|
<pl.droidsonroids.gif.GifImageView
|
||||||
@@ -191,6 +194,7 @@
|
|||||||
android:layout_toLeftOf="@id/btn_close"
|
android:layout_toLeftOf="@id/btn_close"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@mipmap/img_bg"
|
android:background="@mipmap/img_bg"
|
||||||
|
android:src="@mipmap/live_lw"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -390,7 +394,8 @@
|
|||||||
android:id="@+id/gift_image"
|
android:id="@+id/gift_image"
|
||||||
android:layout_width="38dp"
|
android:layout_width="38dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="38dp"
|
||||||
android:layout_marginEnd="8dp" />
|
android:layout_marginEnd="8dp"
|
||||||
|
android:src="@mipmap/live_lw" />
|
||||||
<!--普通工具合集-->
|
<!--普通工具合集-->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/total_image"
|
android:id="@+id/total_image"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
android:layout_marginEnd="6.76dp"
|
android:layout_marginEnd="6.76dp"
|
||||||
android:text="000"
|
android:text="000"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -47,16 +47,15 @@
|
|||||||
android:layout_marginStart="5.33dp"
|
android:layout_marginStart="5.33dp"
|
||||||
android:layout_marginTop="3.3dp"
|
android:layout_marginTop="3.3dp"
|
||||||
android:background="@drawable/background_pk_time"
|
android:background="@drawable/background_pk_time"
|
||||||
|
android:clickable="true"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxWidth="50dp"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingTop="4.33dp"
|
android:paddingTop="4.33dp"
|
||||||
android:paddingEnd="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:paddingBottom="4.33dp"
|
android:paddingBottom="4.33dp"
|
||||||
android:text="我方"
|
android:text="我方"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!--右上-->
|
<!--右上-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -95,7 +94,7 @@
|
|||||||
android:layout_marginEnd="6.76dp"
|
android:layout_marginEnd="6.76dp"
|
||||||
android:text="000"
|
android:text="000"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -105,8 +104,7 @@
|
|||||||
android:layout_marginTop="3.3dp"
|
android:layout_marginTop="3.3dp"
|
||||||
android:layout_marginEnd="5.33dp"
|
android:layout_marginEnd="5.33dp"
|
||||||
android:background="@drawable/background_pk_time"
|
android:background="@drawable/background_pk_time"
|
||||||
android:ellipsize="end"
|
android:clickable="true"
|
||||||
android:maxWidth="50dp"
|
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingTop="4.33dp"
|
android:paddingTop="4.33dp"
|
||||||
@@ -114,7 +112,7 @@
|
|||||||
android:paddingBottom="4.33dp"
|
android:paddingBottom="4.33dp"
|
||||||
android:text="我方"
|
android:text="我方"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!--左下-->
|
<!--左下-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -132,16 +130,15 @@
|
|||||||
android:layout_marginStart="5.33dp"
|
android:layout_marginStart="5.33dp"
|
||||||
android:layout_marginBottom="3.3dp"
|
android:layout_marginBottom="3.3dp"
|
||||||
android:background="@drawable/background_pk_time"
|
android:background="@drawable/background_pk_time"
|
||||||
|
android:clickable="true"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxWidth="50dp"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingTop="4.33dp"
|
android:paddingTop="4.33dp"
|
||||||
android:paddingEnd="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:paddingBottom="4.33dp"
|
android:paddingBottom="4.33dp"
|
||||||
android:text="我方"
|
android:text="我方"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linear_grade3"
|
android:id="@+id/linear_grade3"
|
||||||
@@ -170,7 +167,7 @@
|
|||||||
android:layout_marginEnd="6.76dp"
|
android:layout_marginEnd="6.76dp"
|
||||||
android:text="000"
|
android:text="000"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!--右下-->
|
<!--右下-->
|
||||||
@@ -190,16 +187,15 @@
|
|||||||
android:layout_marginEnd="5.33dp"
|
android:layout_marginEnd="5.33dp"
|
||||||
android:layout_marginBottom="3.3dp"
|
android:layout_marginBottom="3.3dp"
|
||||||
android:background="@drawable/background_pk_time"
|
android:background="@drawable/background_pk_time"
|
||||||
|
android:clickable="true"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxWidth="50dp"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingTop="4.33dp"
|
android:paddingTop="4.33dp"
|
||||||
android:paddingEnd="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:paddingBottom="4.33dp"
|
android:paddingBottom="4.33dp"
|
||||||
android:text="我方"
|
android:text="我方"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linear_grade4"
|
android:id="@+id/linear_grade4"
|
||||||
@@ -228,7 +224,7 @@
|
|||||||
android:layout_marginEnd="6.76dp"
|
android:layout_marginEnd="6.76dp"
|
||||||
android:text="000"
|
android:text="000"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!--PK时间-->
|
<!--PK时间-->
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -653,6 +654,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -1263,6 +1265,7 @@
|
|||||||
android:layout_alignTop="@+id/live_video"
|
android:layout_alignTop="@+id/live_video"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
|
android:src="@mipmap/icon_rank_top_box"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -1530,8 +1533,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/live_top"
|
android:layout_marginTop="@dimen/live_top"
|
||||||
android:visibility="gone"
|
android:visibility="gone">
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/time"
|
android:id="@+id/time"
|
||||||
@@ -1654,6 +1656,7 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/bg_guard_buy_top_1"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -1707,7 +1710,7 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/bg_guard_buy_top_1"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -1761,7 +1764,7 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/bg_guard_buy_top_1"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -1817,7 +1820,7 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/bg_guard_buy_top_1"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -1873,6 +1876,7 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/bg_guard_buy_top_1"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -2037,7 +2041,7 @@
|
|||||||
android:layout_marginEnd="1dp"
|
android:layout_marginEnd="1dp"
|
||||||
android:layout_marginBottom="11dp"
|
android:layout_marginBottom="11dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -2071,7 +2075,7 @@
|
|||||||
android:layout_marginEnd="1dp"
|
android:layout_marginEnd="1dp"
|
||||||
android:layout_marginBottom="11dp"
|
android:layout_marginBottom="11dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -2105,13 +2109,14 @@
|
|||||||
android:layout_marginEnd="1dp"
|
android:layout_marginEnd="1dp"
|
||||||
android:layout_marginBottom="11dp"
|
android:layout_marginBottom="11dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/m_chu_xia"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
android:src="@mipmap/voice" />
|
android:src="@mipmap/voice" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -2289,6 +2294,7 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_centerVertical="false"
|
android:layout_centerVertical="false"
|
||||||
android:layout_marginTop="160dp"
|
android:layout_marginTop="160dp"
|
||||||
|
android:src="@mipmap/drpkend"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -2301,6 +2307,7 @@
|
|||||||
<com.yunbao.common.views.weight.NobleNoticeView
|
<com.yunbao.common.views.weight.NobleNoticeView
|
||||||
android:id="@+id/noble"
|
android:id="@+id/noble"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="60dp" />
|
android:layout_marginTop="60dp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||