Compare commits
2 Commits
6.6.4_推送管理
...
pdlive_sam
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65d38de73c | ||
|
|
a307e6f864 |
@@ -83,6 +83,7 @@
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<!-- Android11新增 -->
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
|
||||
@@ -331,7 +331,7 @@ public class AppContext extends CommonAppContext {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(this).initializeApp(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,14 +209,12 @@ dependencies {
|
||||
|
||||
// 多语言语音识别扩展库(可选)
|
||||
api 'tech.sud.mgp:SudASR:1.3.3.1158'
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
|
||||
//google插件包
|
||||
//api project(':lib_google')
|
||||
api project(':lib_google')
|
||||
|
||||
//samsung插件包
|
||||
api project(':IAP6Helper')
|
||||
|
||||
@@ -55,7 +55,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
// RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK
|
||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
//谷歌推送
|
||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||
RongPushClient.setPushConfig(gconfig);
|
||||
|
||||
@@ -67,13 +67,6 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshDel(){
|
||||
if (mRecyclerView != null) {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void refreshData(List<T> list) {
|
||||
if (mRecyclerView != null && list != null) {
|
||||
mList.clear();
|
||||
|
||||
@@ -331,6 +331,8 @@ public class CommonHttpUtil {
|
||||
isGoogle = "1";
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
isGoogle = "2";
|
||||
}else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
isGoogle = "3";
|
||||
} else {
|
||||
isGoogle = "-1";
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -41,9 +40,16 @@ public class SamsungUtil {
|
||||
public void init() {
|
||||
iapHelper = IapHelper.getInstance(mContext);
|
||||
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST);
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
if (iapHelper != null) {
|
||||
iapHelper.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 购买
|
||||
*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import com.yunbao.common.http.Data;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -15,13 +13,10 @@ public class DateFormatUtil {
|
||||
private static SimpleDateFormat sFormat2;
|
||||
private static SimpleDateFormat sFormat3;
|
||||
|
||||
private static SimpleDateFormat sFormat4;
|
||||
|
||||
static {
|
||||
sFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
sFormat2 = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
|
||||
sFormat3 = new SimpleDateFormat("MM.dd-HH:mm:ss");
|
||||
sFormat4 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
||||
}
|
||||
|
||||
|
||||
@@ -29,14 +24,6 @@ public class DateFormatUtil {
|
||||
return sFormat.format(new Date());
|
||||
}
|
||||
|
||||
public static String getTimeString(long time) {
|
||||
Date date = new Date(time); // 创建Date对象并传入时间戳参数
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期格式
|
||||
String formattedDate = sdf.format(date); // 格式化日期字符串
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
|
||||
public static String getVideoCurTimeString() {
|
||||
return sFormat2.format(new Date());
|
||||
}
|
||||
|
||||
@@ -69,8 +69,7 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static void showToast(Context context, String content, long delayMillis) {
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
@@ -83,7 +82,7 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,38 +121,6 @@ public class DialogUitl {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showDelSysMsg(Context context, String content, SimpleCallback simpleCallback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_del_sys_msg);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView contentTextView = (TextView) dialog.findViewById(R.id.content);
|
||||
contentTextView.setText(content);
|
||||
}
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, SimpleCallback callback) {
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
@@ -168,7 +135,13 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback(callback).build().show();
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
@@ -177,7 +150,13 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback3(callback).build().show();
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback3(callback)
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
@@ -186,7 +165,15 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title).setCancelable(true).setInput(true).setHint(hint).setInputType(inputType).setLength(length).setClickCallback(callback).build().show();
|
||||
new Builder(context).setTitle(title)
|
||||
.setCancelable(true)
|
||||
.setInput(true)
|
||||
.setHint(hint)
|
||||
.setInputType(inputType)
|
||||
.setLength(length)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -496,8 +483,8 @@ public class DialogUitl {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onConfirmClick(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
mSimpleCallbackView.onConfirmClick(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@@ -514,8 +501,8 @@ public class DialogUitl {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onCancel(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
mSimpleCallbackView.onCancel(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -523,17 +510,17 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (btnConfirm != null) {
|
||||
if(btnConfirm!=null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if (btnCancel != null) {
|
||||
if(btnCancel!=null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onShow(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
mSimpleCallbackView.onShow(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -576,7 +563,8 @@ public class DialogUitl {
|
||||
/**
|
||||
* 城市选择
|
||||
*/
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list, String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list,
|
||||
String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
AddressPicker picker = new AddressPicker(activity, list);
|
||||
picker.setTextColor(0xff323232);
|
||||
picker.setDividerColor(0xffdcdcdc);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -32,8 +31,6 @@ public class RouteUtil {
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
||||
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
||||
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
||||
|
||||
public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
|
||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||
@@ -47,7 +44,7 @@ public class RouteUtil {
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR = "/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@@ -150,21 +147,6 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到
|
||||
*/
|
||||
public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
|
||||
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||
.withString("msgid", msgid)
|
||||
.withString("banner", banner)
|
||||
.withString("title", title)
|
||||
.withString("content", content)
|
||||
.withString("time", time)
|
||||
.withString("link", link)
|
||||
.withBoolean("receive", receive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到装扮
|
||||
*/
|
||||
@@ -201,7 +183,7 @@ public class RouteUtil {
|
||||
* 跳转到充值页面
|
||||
*/
|
||||
public static void forwardMyCoin(Context context) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ARouter.getInstance().build(PATH_COIN).withString("url", url).navigation();
|
||||
}
|
||||
|
||||
@@ -252,14 +234,14 @@ public class RouteUtil {
|
||||
postcard.navigation();
|
||||
}
|
||||
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention, boolean isLive) {
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
|
||||
ARouter.getInstance().build(PATH_GIFT_WALL)
|
||||
.withString(Constants.LIVE_UID, mLiveUid)
|
||||
.withString(Constants.STREAM, mStream)
|
||||
.withString("mAnchorName", mAnchorName)
|
||||
.withString("mAvatarUrl", mAvatarUrl)
|
||||
.withInt("isAttention", isAttention)
|
||||
.withBoolean("isLive", isLive)
|
||||
.withBoolean("isLive",isLive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -329,7 +311,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect() {
|
||||
public static void forwardUserAvatarSelect(){
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -33,12 +33,10 @@ public class SpUtil {
|
||||
public static final String BEAUTY_SDK_TYPE = "beautySdkType";
|
||||
public static final String TURNTABLE_ENABLE = "turntableEnable";
|
||||
public static final String BEAUTY_360_TIEZHI_URL = "beauty360TiezhiUrl";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
//播放短视频上下滑动引导页
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
|
||||
public static final String MESSAGE_SYS_DEL = "FIRST_DEL";
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
|
||||
|
||||
public SpUtil() {
|
||||
@@ -75,8 +73,8 @@ public class SpUtil {
|
||||
/**
|
||||
* 判断一个值是否存在
|
||||
*/
|
||||
public boolean isExists(String key) {
|
||||
return mSharedPreferences.contains(key);
|
||||
public boolean isExists(String key){
|
||||
return mSharedPreferences.contains(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,9 +97,13 @@ public class APKUpdateCustomPopup extends CenterPopupView {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 2 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 3 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && APKManager.get().getApkIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class MsgSysDelPopupView extends AttachPopupView {
|
||||
|
||||
ItemDelListener itemDelListener;
|
||||
|
||||
public MsgSysDelPopupView(@NonNull Context context, ItemDelListener itemDelListener) {
|
||||
super(context);
|
||||
this.itemDelListener = itemDelListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_msg_sys_del;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
//特效设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.del), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
itemDelListener.onItemDel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface ItemDelListener {
|
||||
void onItemDel();
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="20dp"
|
||||
android:text="@string/dialog_tip"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@mipmap/icon_del_sys_confirm"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:background="@mipmap/icon_del_sys_cancel"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/yellow_ff6c00"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?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="50dp"
|
||||
android:layout_height="25dp"
|
||||
app:cardBackgroundColor="#0F0B14"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/delete"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
@@ -1397,17 +1397,4 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="pay_cancel">Payment cancellation</string>
|
||||
<string name="pay_suc">Payment successful</string>
|
||||
<string name="pay_fail">Payment failed</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
|
||||
<string name="receive_success">Successfully claimed</string>
|
||||
<string name="receive1">Receive</string>
|
||||
<string name="receive2">Received</string>
|
||||
|
||||
<string name="del_suc">Delete successful</string>
|
||||
|
||||
<string name="sys_msg_year">-</string>
|
||||
<string name="sys_msg_month">-</string>
|
||||
<string name="sys_msg_day"></string>
|
||||
</resources>
|
||||
|
||||
@@ -1391,22 +1391,7 @@
|
||||
<string name="conversion_quantity_need_of_use2">二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片;</string>
|
||||
<string name="conversion_quantity_need_of_use3">三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">領取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1390,22 +1390,7 @@
|
||||
<string name="conversion_quantity_need_of_use2">二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片;</string>
|
||||
<string name="conversion_quantity_need_of_use3">三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">領取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1393,17 +1393,4 @@
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">领取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -82,6 +82,4 @@
|
||||
|
||||
<color name="gray_f6f7fb">#F6F7FB</color>
|
||||
<color name="gray_f6f6f6f6">#FFF6F6F6</color>
|
||||
|
||||
<color name="gray_F4F4F4">#F4F4F4</color>
|
||||
</resources>
|
||||
|
||||
@@ -1397,22 +1397,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="conversion_quantity_need_of_use2">2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
|
||||
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
|
||||
|
||||
<string name="pay_cancel">Payment cancellation</string>
|
||||
<string name="pay_suc">Payment successful</string>
|
||||
<string name="pay_fail">Payment failed</string>
|
||||
|
||||
<string name="receive_success">Successfully claimed</string>
|
||||
<string name="receive1">Receive</string>
|
||||
<string name="receive2">Received</string>
|
||||
|
||||
<string name="del_suc">Delete successful</string>
|
||||
|
||||
<string name="sys_msg_year">-</string>
|
||||
<string name="sys_msg_month">-</string>
|
||||
<string name="sys_msg_day"></string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -4,14 +4,14 @@ ext {
|
||||
buildToolsVersion: "29.0.2",
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 33,
|
||||
versionCode : 460,
|
||||
versionCode : 462,
|
||||
versionName : "6.6.3"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// 测试
|
||||
serverHost : " https://ceshi.yaoulive.com",
|
||||
//serverHost : " https://ceshi.yaoulive.com",
|
||||
|
||||
//百度语音识别
|
||||
|
||||
@@ -20,7 +20,7 @@ ext {
|
||||
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
|
||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
||||
isGooglePlay : 3,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
|
||||
@@ -117,11 +117,6 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getGoogleService() {
|
||||
int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext);
|
||||
return code == 0;
|
||||
}
|
||||
|
||||
int querySize = -1;
|
||||
JSONArray tokenList = new JSONArray();
|
||||
JSONArray orderList = new JSONArray();
|
||||
|
||||
@@ -117,10 +117,6 @@
|
||||
<activity
|
||||
android:name=".views.OlineListActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.CompensateActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.BannerConfig;
|
||||
import com.ms.banner.listener.OnBannerClickListener;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.MsgSysGiftAdapter;
|
||||
import com.yunbao.live.bean.MsgSysGiftInfoBean;
|
||||
import com.yunbao.live.bean.SlideBean;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.custom.TopGradual;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
import com.yunbao.live.views.CustomMyViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
|
||||
public class CompensateActivity extends AbsActivity {
|
||||
|
||||
Banner banner_me;
|
||||
TextView content;
|
||||
TextView time;
|
||||
RecyclerView recyclerView;
|
||||
MsgSysGiftAdapter msgSysGiftAdapter;
|
||||
String msgId, mBanner, mContent, link;
|
||||
Button submit;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_compensate;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void refreshStatus(SystemMessageBean systemMessageBean) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(getIntent().getStringExtra("title"));
|
||||
EventBus.getDefault().register(this);
|
||||
content = findViewById(R.id.content);
|
||||
submit = findViewById(R.id.submit);
|
||||
time = findViewById(R.id.time);
|
||||
|
||||
recyclerView = findViewById(R.id.hor_recycler);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
recyclerView.addItemDecoration(new TopGradual());
|
||||
|
||||
msgSysGiftAdapter = new MsgSysGiftAdapter(mContext);
|
||||
|
||||
recyclerView.setAdapter(msgSysGiftAdapter);
|
||||
|
||||
msgId = getIntent().getStringExtra("msgid");
|
||||
mBanner = getIntent().getStringExtra("banner");
|
||||
mContent = getIntent().getStringExtra("content");
|
||||
link = getIntent().getStringExtra("link");
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy" + getString(R.string.sys_msg_year) + "MM" + getString(R.string.sys_msg_month) + "dd" + getString(R.string.sys_msg_day) + " HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(getIntent().getStringExtra("time") + "000"));
|
||||
time.setText(sdf.format(currenTimeZone));
|
||||
|
||||
content.setText(mContent);
|
||||
banner_me = findViewById(R.id.banner_me);
|
||||
banner_me.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
if (!getIntent().getBooleanExtra("receive", false)) {
|
||||
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
||||
submit.setText(getString(R.string.receive2));
|
||||
submit.setTextColor(mContext.getResources().getColor(R.color.gray_F4F4F4));
|
||||
}
|
||||
submit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ImHttpUtil.receiveGift(msgId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
SystemMessageBean systemMessageBean = new SystemMessageBean();
|
||||
systemMessageBean.setId(msgId);
|
||||
EventBus.getDefault().post(systemMessageBean);
|
||||
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
||||
submit.setText(getString(R.string.receive2));
|
||||
submit.setTextColor(mContext.getResources().getColor(R.color.gray_F4F4F4));
|
||||
ToastUtil.show(msg);
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
getMessageGiftInfo();
|
||||
|
||||
if (!StringUtils.isEmpty(mBanner)) {
|
||||
List<SlideBean> mBannerList = new ArrayList<>();
|
||||
SlideBean slideBean = new SlideBean();
|
||||
slideBean.setSlide_pic(mBanner);
|
||||
slideBean.setSlide_url(link);
|
||||
mBannerList.add(slideBean);
|
||||
showBanner(mBannerList);
|
||||
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void getMessageGiftInfo() {
|
||||
ImHttpUtil.getMessageGiftInfo(msgId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<MsgSysGiftInfoBean> list = JSON.parseArray(Arrays.toString(info), MsgSysGiftInfoBean.class);
|
||||
msgSysGiftAdapter.setList(list);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showBanner(List<SlideBean> mBannerList) {
|
||||
banner_me.setAutoPlay(true).setPages(mBannerList, new CustomMyViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList != null) {
|
||||
if (p >= 0 && p < mBannerList.size()) {
|
||||
SlideBean bean = mBannerList.get(p);
|
||||
if (!bean.getSlide_url().equals("")) {
|
||||
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getSlide_url()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
@@ -10,15 +10,9 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.SelectImageActivity;
|
||||
import com.yunbao.common.bean.ImageEntity;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.views.SystemMessageViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -38,7 +32,11 @@ public class SystemMessageActivity extends AbsActivity {
|
||||
public static String nowUid, nowTitle, mowHeadImg;
|
||||
|
||||
public static void forward(Context context, String type, String uid, String title, String headImg) {
|
||||
context.startActivity(new Intent(context, SystemMessageActivity.class).putExtra("type", type).putExtra("uid", uid).putExtra("title", title).putExtra("headImg", headImg));
|
||||
context.startActivity(new Intent(context, SystemMessageActivity.class)
|
||||
.putExtra("type", type)
|
||||
.putExtra("uid", uid)
|
||||
.putExtra("title", title)
|
||||
.putExtra("headImg", headImg));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
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.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.MsgSysGiftInfoBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MsgSysGiftAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private RecyclerView mRecyclerView;
|
||||
private List<MsgSysGiftInfoBean> mList;
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
public MsgSysGiftAdapter(Context context) {
|
||||
mContext = context;
|
||||
mList = new ArrayList<>();
|
||||
mList.add(new MsgSysGiftInfoBean());
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<MsgSysGiftInfoBean> list) {
|
||||
if (list != null && list.size() > 0) {
|
||||
mList.clear();
|
||||
mList.addAll(list);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new Vh(mInflater.inflate(R.layout.item_msg_sys_gift, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
|
||||
Object payload = payloads.size() > 0 ? payloads.get(0) : null;
|
||||
((Vh) vh).setData(mList.get(position), position, payload);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
|
||||
ImageView mAvatar;
|
||||
TextView mName, name_remarks;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
||||
mName = (TextView) itemView.findViewById(R.id.name);
|
||||
name_remarks = (TextView) itemView.findViewById(R.id.name_remarks);
|
||||
}
|
||||
|
||||
void setData(MsgSysGiftInfoBean bean, int position, Object payload) {
|
||||
itemView.setTag(position);
|
||||
ImgLoader.display(mContext, bean.getItem_image(), mAvatar);
|
||||
mName.setText(bean.getItem_name());
|
||||
name_remarks.setText(String.valueOf(bean.getStr_value()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
||||
super.onAttachedToRecyclerView(recyclerView);
|
||||
mRecyclerView = recyclerView;
|
||||
}
|
||||
|
||||
public interface ActionListener {
|
||||
void onItemClick(MsgSysGiftInfoBean bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,12 +2,9 @@ package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@@ -17,12 +14,10 @@ import android.widget.TextView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -57,9 +52,7 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
TextView mTime, text;
|
||||
LinearLayout toView, bg;
|
||||
ImageView img_content;
|
||||
CardView cv_img_content, radius;
|
||||
|
||||
|
||||
CardView cv_img_content;
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mContent = itemView.findViewById(R.id.content);
|
||||
@@ -69,7 +62,6 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
text = itemView.findViewById(R.id.text);
|
||||
img_content = itemView.findViewById(R.id.img_content);
|
||||
cv_img_content = itemView.findViewById(R.id.cv_img_content);
|
||||
radius = itemView.findViewById(R.id.radius);
|
||||
}
|
||||
|
||||
void setData(SystemMessageBean bean) {
|
||||
@@ -77,22 +69,10 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", bean.getLink() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")));
|
||||
if (bean.getRead_status() == 2) {
|
||||
ImHttpUtil.readMsg(bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
|
||||
}
|
||||
});
|
||||
radius.setVisibility(View.GONE);
|
||||
}
|
||||
startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", bean.getLink()+ "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
radius.setVisibility((bean.getRead_status() == 2 && !TextUtils.isEmpty(bean.getLink())) ? View.VISIBLE : View.GONE);
|
||||
|
||||
mContent.setText(bean.getContent());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(bean.getAddtime() + "000"));
|
||||
@@ -111,4 +91,5 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +1,23 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
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.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -37,13 +28,12 @@ import java.util.Date;
|
||||
|
||||
public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
|
||||
ItemLongListener itemLongListener;
|
||||
|
||||
public SystemMessageNewAdapter(Context context, ItemLongListener itemLongListener) {
|
||||
public SystemMessageNewAdapter(Context context) {
|
||||
super(context);
|
||||
this.itemLongListener = itemLongListener;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
@@ -52,105 +42,46 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) {
|
||||
((Vh) vh).setData(mList.get(position), position);
|
||||
((Vh) vh).setData(mList.get(position));
|
||||
}
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
TextView messageContext, messageTime, title, del;
|
||||
CardView radius, bannerImgLayout;
|
||||
LinearLayout layoutMore, itemLayout;
|
||||
ImageView img_content;
|
||||
ImageView icon;
|
||||
TextView messageContext, messageTime;
|
||||
LinearLayout layoutMore;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
messageContext = itemView.findViewById(R.id.message_context);
|
||||
layoutMore = itemView.findViewById(R.id.layout_more);
|
||||
itemLayout = itemView.findViewById(R.id.itemLayout);
|
||||
messageTime = itemView.findViewById(R.id.message_time);
|
||||
radius = itemView.findViewById(R.id.radius);
|
||||
icon = itemView.findViewById(R.id.icon);
|
||||
img_content = itemView.findViewById(R.id.img_content);
|
||||
bannerImgLayout = itemView.findViewById(R.id.cv_img_content);
|
||||
title = itemLayout.findViewById(R.id.title);
|
||||
del = itemLayout.findViewById(R.id.del);
|
||||
}
|
||||
|
||||
void setData(SystemMessageBean bean, int position) {
|
||||
void setData(SystemMessageBean bean) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(bean.getAddtime() + "000"));
|
||||
messageTime.setText(sdf.format(currenTimeZone));
|
||||
messageContext.setText(bean.getContent());
|
||||
title.setText(String.valueOf(bean.getTitle()));
|
||||
|
||||
if (bean.getSystem_message_type() == 2) {
|
||||
//带礼物的消息
|
||||
if (bean.getGet_status() == 2) {
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_msg_sys_gift));
|
||||
} else {
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_msg_sys_gifted));
|
||||
}
|
||||
messageContext.setVisibility(View.GONE);
|
||||
radius.setVisibility((bean.getRead_status() == 2) ? View.VISIBLE : View.GONE);
|
||||
layoutMore.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
//普通消息
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_notification_speaker));
|
||||
if (StringUtils.isEmpty(bean.getLink())) {
|
||||
//无跳转
|
||||
messageContext.setVisibility(View.VISIBLE);
|
||||
layoutMore.setVisibility(View.GONE);
|
||||
} else {
|
||||
messageContext.setVisibility(View.GONE);
|
||||
}
|
||||
layoutMore.setVisibility(TextUtils.isEmpty(bean.getLink()) ? View.GONE : View.VISIBLE);
|
||||
radius.setVisibility((bean.getRead_status() == 2 && !TextUtils.isEmpty(bean.getLink())) ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
if (!StringUtils.isEmpty(bean.getImgBanner())) {
|
||||
ImgLoader.display(mContext, bean.getImgBanner(), img_content);
|
||||
img_content.setVisibility(View.VISIBLE);
|
||||
bannerImgLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
img_content.setVisibility(View.GONE);
|
||||
bannerImgLayout.setVisibility(View.GONE);
|
||||
}
|
||||
itemLayout.setOnClickListener(new View.OnClickListener() {
|
||||
layoutMore.setVisibility(TextUtils.isEmpty(bean.getLink()) ? View.GONE : View.VISIBLE);
|
||||
layoutMore.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//普通消息
|
||||
if (bean.getSystem_message_type() == 1) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
}
|
||||
} else {
|
||||
RouteUtil.forwardLiveCompensateActivity(mContext, String.valueOf(bean.getId()), bean.getImgBanner(), bean.getTitle(), bean.getContent(), bean.getAddtime(), bean.getLink(), bean.getGet_status() == 2);
|
||||
}
|
||||
//未读才调用
|
||||
if (bean.getRead_status() == 2) {
|
||||
ImHttpUtil.readMsg(bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken()) .append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(
|
||||
new Intent(mContext, ZhuangBanActivity.class)
|
||||
.putExtra("url", urlBuffer.toString()));
|
||||
|
||||
}
|
||||
});
|
||||
radius.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
itemLayout.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
itemLongListener.onItemLong(bean, position, del);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public interface ItemLongListener {
|
||||
void onItemLong(SystemMessageBean bean, int position, View view);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
public class MsgSysGiftInfoBean {
|
||||
int id;
|
||||
String item_name;
|
||||
String restrict_time;
|
||||
String item_image;
|
||||
String str_value;
|
||||
|
||||
public String getStr_value() {
|
||||
return str_value;
|
||||
}
|
||||
|
||||
public void setStr_value(String str_value) {
|
||||
this.str_value = str_value;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getItem_name() {
|
||||
return item_name;
|
||||
}
|
||||
|
||||
public void setItem_name(String item_name) {
|
||||
this.item_name = item_name;
|
||||
}
|
||||
|
||||
public String getRestrict_time() {
|
||||
return restrict_time;
|
||||
}
|
||||
|
||||
public void setRestrict_time(String restrict_time) {
|
||||
this.restrict_time = restrict_time;
|
||||
}
|
||||
|
||||
public String getItem_image() {
|
||||
return item_image;
|
||||
}
|
||||
|
||||
public void setItem_image(String item_image) {
|
||||
this.item_image = item_image;
|
||||
}
|
||||
}
|
||||
@@ -19,36 +19,6 @@ public class SystemMessageBean {
|
||||
private String showImg;
|
||||
private String imgBanner;
|
||||
|
||||
private int system_message_type; //1 普通消息 2 礼包消息
|
||||
|
||||
private int get_status; // 1 已领取 2 未领取
|
||||
|
||||
private int read_status; // 1 已读 2 未读
|
||||
|
||||
public int getRead_status() {
|
||||
return read_status;
|
||||
}
|
||||
|
||||
public void setRead_status(int read_status) {
|
||||
this.read_status = read_status;
|
||||
}
|
||||
|
||||
public int getSystem_message_type() {
|
||||
return system_message_type;
|
||||
}
|
||||
|
||||
public void setSystem_message_type(int system_message_type) {
|
||||
this.system_message_type = system_message_type;
|
||||
}
|
||||
|
||||
public int getGet_status() {
|
||||
return get_status;
|
||||
}
|
||||
|
||||
public void setGet_status(int get_status) {
|
||||
this.get_status = get_status;
|
||||
}
|
||||
|
||||
@JSONField(name = "banner")
|
||||
public String getImgBanner() {
|
||||
return imgBanner;
|
||||
|
||||
@@ -11,6 +11,4 @@ public class ImHttpConsts {
|
||||
public static final String CHECK_BLACK = "checkBlack";
|
||||
public static final String SEND_DYNAMICCOMMENT = "sendDynamicComment";
|
||||
public static final String SET_BLACK = "setBlack";
|
||||
|
||||
public static final String GET_MESSAGEGIFTINFO = "getMessageGiftInfo";
|
||||
}
|
||||
|
||||
@@ -73,41 +73,4 @@ public class ImHttpUtil {
|
||||
.params("touid", touid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取补偿消息详情
|
||||
*/
|
||||
public static void getMessageGiftInfo(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.getMessageGiftInfo", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统消息
|
||||
*/
|
||||
public static void delMsg(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.deleteSystemMessage", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 已读 系统消息
|
||||
*/
|
||||
public static void readMsg(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.systemMessageRead", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取礼物
|
||||
*/
|
||||
public static void receiveGift(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.getMessageGiftDetails", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ms.banner.holder.BannerViewHolder;
|
||||
import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.live.bean.SlideBean;
|
||||
|
||||
public class CustomMyViewHolder implements BannerViewHolder<SlideBean> {
|
||||
|
||||
@@ -5,7 +5,6 @@ import static io.rong.imlib.RongIMClient.BlacklistStatus.NOT_IN_BLACK_LIST;
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -44,8 +43,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.enums.PopupPosition;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
@@ -57,15 +54,9 @@ import com.yunbao.common.bean.ImageEntity;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.interfaces.OnItemLongClickListener;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.MsgSysDelPopupView;
|
||||
import com.yunbao.common.views.PlaySettingPopupView;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.EditNameRemarksActivity;
|
||||
import com.yunbao.live.activity.SystemMessageActivity;
|
||||
@@ -199,7 +190,8 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
}
|
||||
InputMethodManager methodManager = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (methodManager != null) {
|
||||
methodManager.hideSoftInputFromWindow(feedback_edittext.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
methodManager.hideSoftInputFromWindow(feedback_edittext.getWindowToken(),
|
||||
InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
}
|
||||
feedback_edittext.clearFocus();
|
||||
}
|
||||
@@ -252,11 +244,6 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
EventBus.getDefault().register(SystemMessageViewHolder.this);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void refreshStatus(SystemMessageBean systemMessageBean) {
|
||||
mRefreshView.initData();
|
||||
}
|
||||
|
||||
//点击加号等各类事件
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -272,7 +259,8 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
if (lt_controls.getVisibility() == View.GONE) {
|
||||
InputMethodManager methodManager = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (methodManager != null) {
|
||||
methodManager.hideSoftInputFromWindow(feedback_edittext.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
methodManager.hideSoftInputFromWindow(feedback_edittext.getWindowToken(),
|
||||
InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
}
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@@ -297,88 +285,62 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
oldestMessageId = -1;
|
||||
}
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
RongIMClient.getInstance().getHistoryMessages(conversationType, SystemMessageActivity.nowUid, oldestMessageId, 20, new RongIMClient.ResultCallback<List<Message>>() {
|
||||
/**
|
||||
* 成功时回调
|
||||
* @param messages 获取的消息列表
|
||||
*/
|
||||
@Override
|
||||
public void onSuccess(List<Message> messages) {
|
||||
Collections.reverse(messages);
|
||||
EventBus.getDefault().post(messages);
|
||||
if (messages.size() > 0) {
|
||||
if (messages.size() < 20) {
|
||||
moretext = false;
|
||||
} else {
|
||||
moretext = true;
|
||||
}
|
||||
oldestMessageId = messages.get(0).getMessageId();
|
||||
Log.i("chatlist", "oldestMessageId = " + oldestMessageId);
|
||||
if (messagesList.size() == 0) {
|
||||
Message messageNo = new Message();
|
||||
messageNo.setSenderUserId("-1");
|
||||
messagesList.add(messageNo);
|
||||
RongIMClient.getInstance().getHistoryMessages(conversationType, SystemMessageActivity.nowUid, oldestMessageId, 20,
|
||||
new RongIMClient.ResultCallback<List<Message>>() {
|
||||
/**
|
||||
* 成功时回调
|
||||
* @param messages 获取的消息列表
|
||||
*/
|
||||
@Override
|
||||
public void onSuccess(List<Message> messages) {
|
||||
Collections.reverse(messages);
|
||||
EventBus.getDefault().post(messages);
|
||||
if (messages.size() > 0) {
|
||||
if (messages.size() < 20) {
|
||||
moretext = false;
|
||||
} else {
|
||||
moretext = true;
|
||||
}
|
||||
oldestMessageId = messages.get(0).getMessageId();
|
||||
Log.i("chatlist", "oldestMessageId = " + oldestMessageId);
|
||||
if (messagesList.size() == 0) {
|
||||
Message messageNo = new Message();
|
||||
messageNo.setSenderUserId("-1");
|
||||
messagesList.add(messageNo);
|
||||
|
||||
messagesList.addAll(messages);
|
||||
} else {
|
||||
if (moretext) {
|
||||
messagesList.get(0).setSenderUserId("-1");
|
||||
messagesList.addAll(messages);
|
||||
} else {
|
||||
if (moretext) {
|
||||
messagesList.get(0).setSenderUserId("-1");
|
||||
} else {
|
||||
messagesList.get(0).setSenderUserId("-2");
|
||||
}
|
||||
messagesList.addAll(1, messages);
|
||||
}
|
||||
mHandler.sendEmptyMessageAtTime(1, 0);
|
||||
} else {
|
||||
moretext = false;
|
||||
if (messagesList.size() == 0) {
|
||||
Message messageNo = new Message();
|
||||
messageNo.setSenderUserId("-1");
|
||||
messagesList.add(messageNo);
|
||||
messagesList.addAll(messages);
|
||||
}
|
||||
messagesList.get(0).setSenderUserId("-2");
|
||||
mHandler.sendEmptyMessageAtTime(1, 0);
|
||||
}
|
||||
messagesList.addAll(1, messages);
|
||||
}
|
||||
mHandler.sendEmptyMessageAtTime(1, 0);
|
||||
} else {
|
||||
moretext = false;
|
||||
if (messagesList.size() == 0) {
|
||||
Message messageNo = new Message();
|
||||
messageNo.setSenderUserId("-1");
|
||||
messagesList.add(messageNo);
|
||||
messagesList.addAll(messages);
|
||||
|
||||
/**
|
||||
* 错误时回调。
|
||||
* @param e 错误码
|
||||
*/
|
||||
@Override
|
||||
public void onError(RongIMClient.ErrorCode e) {
|
||||
ToastUtil.show("消息获取失败");
|
||||
}
|
||||
messagesList.get(0).setSenderUserId("-2");
|
||||
mHandler.sendEmptyMessageAtTime(1, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 错误时回调。
|
||||
* @param e 错误码
|
||||
*/
|
||||
@Override
|
||||
public void onError(RongIMClient.ErrorCode e) {
|
||||
ToastUtil.show("消息获取失败");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息
|
||||
*
|
||||
* @param msgId
|
||||
* @param position
|
||||
* @param size
|
||||
*/
|
||||
public void delMsg(String msgId, int position, int size) {
|
||||
ImHttpUtil.delMsg(msgId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(R.string.del_suc);
|
||||
}
|
||||
List<SystemMessageBean> systemMessageBeanList = mAdapter.getList();
|
||||
systemMessageBeanList.remove(position);
|
||||
if (position == 0 && size == 1) {
|
||||
mRefreshView.initData();
|
||||
} else if (position == 0) {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
mAdapter.notifyItemRemoved(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//非单聊列表适配
|
||||
@@ -395,42 +357,12 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<SystemMessageBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<SystemMessageBean> getAdapter() {
|
||||
if (mAdapter == null && (SystemMessageActivity.type.equals("1"))) {//官方通知
|
||||
if (mAdapter == null && (SystemMessageActivity.type.equals("1"))) { //官方通知
|
||||
mAdapter = new SystemMessageAdapter(mContext);
|
||||
} else if (mAdapter == null && SystemMessageActivity.type.equals("2")) {
|
||||
mAdapter = new InteractionMessageAdapter(mContext, SystemMessageViewHolder.this);
|
||||
} else if (mAdapter == null && SystemMessageActivity.type.equals("4")) {//系统消息
|
||||
mAdapter = new SystemMessageNewAdapter(mContext, new SystemMessageNewAdapter.ItemLongListener() {
|
||||
@Override
|
||||
public void onItemLong(SystemMessageBean bean, int position, View view) {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext).atView(view);
|
||||
builder.hasShadowBg(false).isDestroyOnDismiss(true).isLightStatusBar(false).popupPosition(PopupPosition.Top).asCustom(new MsgSysDelPopupView(mContext, new MsgSysDelPopupView.ItemDelListener() {
|
||||
@Override
|
||||
public void onItemDel() {
|
||||
if (bean.getSystem_message_type() == 2 && bean.getGet_status() == 2) {//礼包消息并且未领取
|
||||
DialogUitl.showDelSysMsg(mContext, mContext.getString(com.yunbao.common.R.string.msg_del_sys01), new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
delMsg(bean.getId(), position, mAdapter.getList().size());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!SpUtil.getInstance().getBooleanValue(SpUtil.MESSAGE_SYS_DEL)) {
|
||||
DialogUitl.showDelSysMsg(mContext, mContext.getString(com.yunbao.common.R.string.msg_del_sys02), new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
delMsg(bean.getId(), position, mAdapter.getList().size());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
delMsg(bean.getId(), position, mAdapter.getList().size());
|
||||
}
|
||||
SpUtil.getInstance().setBooleanValue(SpUtil.MESSAGE_SYS_DEL, true);
|
||||
}
|
||||
}
|
||||
})).show();
|
||||
}
|
||||
});
|
||||
} else if (mAdapter == null && SystemMessageActivity.type.equals("4")) { //系统消息
|
||||
mAdapter = new SystemMessageNewAdapter(mContext);
|
||||
}
|
||||
return mAdapter;
|
||||
}
|
||||
@@ -650,7 +582,8 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
try {
|
||||
MediaMetadataRetriever mmr = new MediaMetadataRetriever();
|
||||
mmr.setDataSource(url);
|
||||
duration = Integer.parseInt(mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)) / 1000;//除以 1000 返回是秒
|
||||
duration = Integer.parseInt(mmr.extractMetadata
|
||||
(MediaMetadataRetriever.METADATA_KEY_DURATION)) / 1000;//除以 1000 返回是秒
|
||||
//时长(毫秒)
|
||||
// String duration = mmr.extractMetadata(android.media.MediaMetadataRetriever.METADATA_KEY_DURATION);
|
||||
// //宽
|
||||
@@ -750,11 +683,11 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
//intoIndex 1=调用相机,2=照片选取,3=视频选取
|
||||
public void choosePic(int intoIndex) {
|
||||
//选择图片
|
||||
String permission1 = Manifest.permission.READ_EXTERNAL_STORAGE;
|
||||
String permission2 = Manifest.permission.WRITE_EXTERNAL_STORAGE;
|
||||
String permission1=Manifest.permission.READ_EXTERNAL_STORAGE;
|
||||
String permission2= Manifest.permission.WRITE_EXTERNAL_STORAGE;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
permission1 = Manifest.permission.READ_MEDIA_IMAGES;
|
||||
permission2 = Manifest.permission.READ_MEDIA_VIDEO;
|
||||
permission1=Manifest.permission.READ_MEDIA_IMAGES;
|
||||
permission2=Manifest.permission.READ_MEDIA_VIDEO;
|
||||
}
|
||||
int isPermission1 = ContextCompat.checkSelfPermission(mContext, permission1);
|
||||
int isPermission2 = ContextCompat.checkSelfPermission(mContext, permission2);
|
||||
@@ -762,7 +695,8 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
startActivity(intoIndex);
|
||||
} else {
|
||||
//申请权限
|
||||
ActivityCompat.requestPermissions(nowActivity, new String[]{permission1, permission2}, PERMISSION_REQUEST_CODE);
|
||||
ActivityCompat.requestPermissions(nowActivity, new String[]{permission1,
|
||||
permission2}, PERMISSION_REQUEST_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1116,7 +1050,8 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
*/
|
||||
@Override
|
||||
public ImMessageAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
View view = mInflater.inflate(R.layout.item_chat_one, viewGroup, false);
|
||||
View view = mInflater.inflate(R.layout.item_chat_one,
|
||||
viewGroup, false);
|
||||
|
||||
ImMessageAdapter.ViewHolder viewHolder = new ImMessageAdapter.ViewHolder(view);
|
||||
return viewHolder;
|
||||
@@ -1272,7 +1207,9 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
viewHolder.cv_chatcontent_img1.setVisibility(View.VISIBLE);
|
||||
viewHolder.rt_video_left.setVisibility(View.GONE);
|
||||
|
||||
Glide.with(mContext).load(imageMessage.getThumUri()).into(viewHolder.chatcontent_img1);
|
||||
Glide.with(mContext)
|
||||
.load(imageMessage.getThumUri())
|
||||
.into(viewHolder.chatcontent_img1);
|
||||
viewHolder.chatcontent_img1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -1288,7 +1225,9 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
viewHolder.cv_chatcontent_img.setVisibility(View.VISIBLE);
|
||||
viewHolder.rt_video_right.setVisibility(View.GONE);
|
||||
if (mDatas.get(position).getReceivedTime() == 0) {
|
||||
Glide.with(mContext).load(imageMessage.getThumUri()).into(viewHolder.chatcontent_img);
|
||||
Glide.with(mContext)
|
||||
.load(imageMessage.getThumUri())
|
||||
.into(viewHolder.chatcontent_img);
|
||||
viewHolder.view_feed_suc.setVisibility(View.VISIBLE);
|
||||
viewHolder.view_feed_suc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -1299,10 +1238,14 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
});
|
||||
} else if (mDatas.get(position).getReceivedTime() < 100) {
|
||||
viewHolder.view_feed_suc.setVisibility(View.GONE);
|
||||
Glide.with(mContext).load(imageMessage.getThumUri()).into(viewHolder.chatcontent_img);
|
||||
Glide.with(mContext)
|
||||
.load(imageMessage.getThumUri())
|
||||
.into(viewHolder.chatcontent_img);
|
||||
} else {
|
||||
viewHolder.view_feed_suc.setVisibility(View.GONE);
|
||||
Glide.with(mContext).load(imageMessage.getThumUri()).into(viewHolder.chatcontent_img);
|
||||
Glide.with(mContext)
|
||||
.load(imageMessage.getThumUri())
|
||||
.into(viewHolder.chatcontent_img);
|
||||
|
||||
viewHolder.chatcontent_img.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -1469,9 +1412,16 @@ public class SystemMessageViewHolder extends AbsViewHolder implements View.OnCli
|
||||
*/
|
||||
public static void loadCover(ImageView imageView, Uri uri, Context context) {
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
Glide.with(context).setDefaultRequestOptions(new RequestOptions().frame(1000000).centerCrop().error(R.drawable.anim_loading)//可以忽略
|
||||
.placeholder(R.drawable.anim_loading)//可以忽略
|
||||
).load(uri).into(imageView);
|
||||
Glide.with(context)
|
||||
.setDefaultRequestOptions(
|
||||
new RequestOptions()
|
||||
.frame(1000000)
|
||||
.centerCrop()
|
||||
.error(R.drawable.anim_loading)//可以忽略
|
||||
.placeholder(R.drawable.anim_loading)//可以忽略
|
||||
)
|
||||
.load(uri)
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
//互动消息回复
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="133dp" />
|
||||
<solid android:color="#9FAAB7" />
|
||||
</shape>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="5dp"/>
|
||||
<solid android:color="#E7E7E7"/>
|
||||
</shape>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ft_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="19dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
app:tint="@color/textColor" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:background="@drawable/bg_gray_time"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="2024年1月4号 10:05" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_advertisement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="115dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="15dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_chatcontent_img1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner_me"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/hor_recycler"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center"
|
||||
android:scrollbars="none" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@mipmap/icon_sys_receive"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="@string/receive1"
|
||||
android:textColor="@color/yellow_ff6c00"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="135dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="道具名称"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name_remarks"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="使用期限"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -91,18 +91,6 @@
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/radius"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:cardBackgroundColor="#FF0000"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="20dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/bodyLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@@ -18,13 +17,11 @@
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<!--通知小喇叭-->
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginStart="11dp"
|
||||
@@ -35,138 +32,60 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="42dp"
|
||||
android:clickable="false"
|
||||
app:cardBackgroundColor="#fff"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/message_context"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
android:layout_margin="11dp"
|
||||
android:text="親愛的用戶昵稱,恭喜你獲得23年7月1日-23年7月31日的xx禮物冠名權,冠名生效期間您可使用專屬禮物冠名皮膚。小PD已給您佩戴了專屬送禮特效,也可在個性裝扮中取消佩戴。"
|
||||
android:textColor="#040404"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_more"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="1.2dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:background="#F6F6F6" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="2"
|
||||
android:text="標題"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/bg_gray_del"
|
||||
android:gravity="center"
|
||||
android:text="@string/delete"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_img_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="87dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:scaleType="centerCrop" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_context"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_margin="11dp"
|
||||
android:text="@string/live_user_mailbox_more_text"
|
||||
android:textColor="#838383"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:text="親愛的用戶昵稱,恭喜你獲得23年7月1日-23年7月31日的xx禮物冠名權,冠名生效期間您可使用專屬禮物冠名皮膚。小PD已給您佩戴了專屬送禮特效,也可在個性裝扮中取消佩戴。"
|
||||
android:textColor="#040404"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_more"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1.2dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:background="#F6F6F6" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="11dp"
|
||||
android:text="@string/live_user_mailbox_more_text"
|
||||
android:textColor="#838383"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/radius"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="#FF0000"
|
||||
app:cardCornerRadius="20dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -185,6 +185,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
activity = this;
|
||||
Contexts = this;
|
||||
setStatusBar();
|
||||
|
||||
googleLayout = findViewById(R.id.googleLayout);
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
@@ -539,7 +540,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
Log.d("OpenInstall", "appData.getData()= " + appData.getData());
|
||||
//获取自定义数据
|
||||
if (appData.getData() != null && !appData.getData().equals("")) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
|
||||
} else {
|
||||
JSONObject data = JSON.parseObject(appData.getData());
|
||||
@@ -575,7 +576,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
*/
|
||||
private void loginBuyThird(LoginData data) {
|
||||
mLoginType = data.getType();
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2||CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
mPromoCode = "";
|
||||
}
|
||||
MainHttpUtil.loginByThird(UserID, data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||
@@ -623,7 +624,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
public void callback(UserBean bean) {
|
||||
|
||||
if (mFirstLogin) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
|
||||
} else {
|
||||
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor").execute(new HttpCallback() {
|
||||
|
||||
@@ -288,7 +288,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true, false);
|
||||
}
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
/* GoogleUtils.newInstance(MainActivity.this).setFirebaseTokenListener(MainActivity.this, new GoogleUtils.FirebaseTokenListener() {
|
||||
@Override
|
||||
public void onResultToken(String token) {
|
||||
|
||||
@@ -86,6 +86,9 @@ public class MyWalletActivity extends AbsActivity {
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
samsungUtil = SamsungUtil.newInstance(mContext);
|
||||
samsungUtil.init();
|
||||
}else{
|
||||
googleUtils = new GoogleUtils(mContext);
|
||||
googleUtils.initGooglePay();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
//获取自定义数据
|
||||
if (appData.getData() != null && !appData.getData().equals("")) {
|
||||
JSONObject data = JSON.parseObject(appData.getData());
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2|| CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
yqm_view.setVisibility(View.VISIBLE);
|
||||
MainHttpUtil.getDeviceLoginType(new HttpCallback() {
|
||||
@Override
|
||||
|
||||
@@ -88,6 +88,7 @@ public class SamsungFragment extends Fragment {
|
||||
|
||||
private void initSamsung() {
|
||||
samsungUtil = new SamsungUtil(getActivity());
|
||||
samsungUtil.dispose();
|
||||
samsungUtil.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ include ':FaceUnity'
|
||||
include ':Share'
|
||||
include ':pluginsForAnchor'
|
||||
//include ':lib_huawei'
|
||||
//include ':lib_google'
|
||||
include ':lib_google'
|
||||
include ':IAP6Helper'
|
||||
|
||||
Reference in New Issue
Block a user