Merge remote-tracking branch 'origin/tarot' into develop
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/com/yizhuan/erban/avroom/fragment/HomePartyRoomFragment.java # app/src/main/java/com/yizhuan/erban/avroom/widget/MessageView.java # core/src/diff_src_erban/java/com/yizhuan/xchat_android_constants/XChatConstants.java # core/src/main/java/com/yizhuan/xchat_android_core/Constants.java # core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachParser.java
This commit is contained in:
@@ -1259,6 +1259,10 @@
|
||||
<activity
|
||||
android:name=".ui.webview.DatingRuleWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.webview.TarotPayWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
<!-- Fix bug Only fullscreen opaque activities can request orientation -->
|
||||
<activity
|
||||
android:name="com.sdk.base.module.permission.PermissionActivity"
|
||||
|
@@ -29,6 +29,10 @@ import androidx.viewpager.widget.ViewPager;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.coorchice.library.SuperTextView;
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.Util;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.hintview.ColorPointHintView;
|
||||
import com.netease.nim.uikit.common.antispam.AntiSpamEvent;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
@@ -1028,7 +1032,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
@Override
|
||||
public void onWebClick(String url) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_PROMOTE_CLICK, "语音房_推广入口");
|
||||
DialogWebFragment.newInstance(url).show(getFragmentManager());
|
||||
DialogWebViewActivity.start(mContext,url);
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -39,12 +39,10 @@ import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
import com.yizhuan.xchat_android_core.manager.RtcEngineManager;
|
||||
import com.yizhuan.xchat_android_core.manager.event.HistoryMessageEvent;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterInfo;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.model.MonsterHuntingModel;
|
||||
import com.yizhuan.xchat_android_core.patriarch.exception.PmRoomLimitException;
|
||||
import com.yizhuan.xchat_android_core.public_chat_hall.manager.PublicChatHallDataManager;
|
||||
import com.yizhuan.xchat_android_core.room.bean.ActivityInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg;
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
|
||||
|
@@ -99,6 +99,8 @@ import com.yizhuan.xchat_android_core.im.custom.bean.RoomFollowOwnerAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomFollowOwnerAttachment2;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomNoticeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomTipAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.TarotAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.TarotMsgBean;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.WelcomeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.game.ImGameInfo;
|
||||
import com.yizhuan.xchat_android_core.im.game.ImGameMode;
|
||||
@@ -793,6 +795,9 @@ public class MessageView extends FrameLayout {
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_DATING) {
|
||||
clearBackground(tvContent);
|
||||
setDatingMsg(chatRoomMessage, tvContent, second);
|
||||
} else if (first == CustomAttachment.CUSTOM_MESS_TAROT) {
|
||||
clearBackground(tvContent);
|
||||
setTarotMsg(chatRoomMessage, tvContent);
|
||||
} else {
|
||||
tvContent.setTextColor(Color.WHITE);
|
||||
tvContent.setText(tvContent.getResources().getText(R.string.not_support_message_tip));
|
||||
@@ -899,6 +904,20 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
}
|
||||
|
||||
private void setTarotMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
TarotAttachment attachment = (TarotAttachment) chatRoomMessage.getAttachment();
|
||||
if (attachment.getSecond() == CustomAttachment.CUSTOM_MESS_TAROT_SUCCESS) {
|
||||
TarotMsgBean tarotMsgBean = attachment.getTarotMsgBean();
|
||||
String nickName = RegexUtil.getPrintableString(tarotMsgBean.getNick());
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append("恭喜 ", new ForegroundColorSpan(textColor))
|
||||
.append(nickName, new ForegroundColorSpan(roomTipNickColor))
|
||||
.append(" 在塔罗占卜中运气爆发,收获", new ForegroundColorSpan(textColor))
|
||||
.append(tarotMsgBean.getDrawGoldNum() + "金币", new ForegroundColorSpan(roomTipColor));
|
||||
tvContent.setText(text.build());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示已经加入的话题的通知
|
||||
*
|
||||
@@ -2689,6 +2708,10 @@ public class MessageView extends FrameLayout {
|
||||
EventBus.getDefault().post(new FollowRoomEvent());
|
||||
PraiseModel.get().setFollowRoomSuccessRoomTip(JavaUtil.str2long(chatRoomMessage.getFromAccount()));
|
||||
});
|
||||
} else if (attachment.getFirst() == CustomAttachment.CUSTOM_MESS_TAROT) {
|
||||
if (attachment instanceof TarotAttachment) {
|
||||
account = ((TarotAttachment) attachment).getTarotMsgBean().getUid() + "";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(account)) return;
|
||||
|
@@ -7,27 +7,16 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.adapter.StaticPagerAdapter;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.im.RouterHandler;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.adapter.StaticPagerAdapter;
|
||||
import com.yizhuan.erban.utils.CommonJumpHelper;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RouterType;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_library.utils.JavaUtil;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
public class RoomActAdapter extends StaticPagerAdapter {
|
||||
|
@@ -7,15 +7,11 @@ import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.webkit.SslErrorHandler;
|
||||
@@ -29,21 +25,23 @@ import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.LayoutRes;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.XChatApplication;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.im.RouterHandler;
|
||||
import com.yizhuan.erban.ui.webview.event.CloseWebViewEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.ShowNavEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.TaroPayResultEvent;
|
||||
import com.yizhuan.erban.ui.widget.ShareDialog;
|
||||
import com.yizhuan.erban.utils.WebViewUtils;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.certification.event.CertificationResultEvent;
|
||||
import com.yizhuan.xchat_android_core.share.ShareModel;
|
||||
import com.yizhuan.xchat_android_core.web.bean.WebJsBeanInfo;
|
||||
@@ -55,6 +53,8 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.sharesdk.framework.Platform;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -67,7 +67,7 @@ import io.reactivex.schedulers.Schedulers;
|
||||
public class CommonWebViewActivity extends BaseActivity implements ShareDialog.OnShareDialogItemClick {
|
||||
|
||||
protected FrameLayout layoutTitleBar;
|
||||
private WebView webView;
|
||||
protected WebView webView;
|
||||
private ProgressBar mProgressBar;
|
||||
private CommonWebViewActivity mActivity;
|
||||
private WebChromeClient wvcc;
|
||||
@@ -157,7 +157,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
initView();
|
||||
initData();
|
||||
setListener();
|
||||
ShowWebView(url);
|
||||
showWebView(url);
|
||||
RxBus.get().toFlowable(ShareH5Event.class)
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
@@ -239,6 +239,17 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (url.startsWith("weixin://wap/pay")) {
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
toast("未安装微信");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (url.contains("tel:")) {
|
||||
//删除直接拨打电话的功能
|
||||
return true;
|
||||
@@ -376,10 +387,16 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowWebView(String url) {
|
||||
public void showWebView(String url) {
|
||||
Logger.d("ShowWebView--------" + url);
|
||||
webView.loadUrl(url);
|
||||
|
||||
if (!TextUtils.isEmpty(url)) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("Referer", Constants.WXPAY_REFERER);
|
||||
webView.loadUrl(url, map);
|
||||
} else {
|
||||
toast("网页链接无效");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -422,7 +439,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onRecieveNeedRefreshWebView(WebViewRefreshEvent event) {
|
||||
if (!StringUtil.isEmpty(url)) {
|
||||
ShowWebView(url);
|
||||
showWebView(url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,13 +448,6 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
webView.evaluateJavascript("renderByStatus(" + event.getStatus() + ")", null);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void closeWebViewEvent(CloseWebViewEvent event) {
|
||||
if (event != null) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void showNavEvent(ShowNavEvent event) {
|
||||
if (event != null) {
|
||||
@@ -484,4 +494,11 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onTaroPayResultEvent(TaroPayResultEvent event) {
|
||||
if (webView != null) {
|
||||
webView.evaluateJavascript("taroPayResultCallback(" + event.getResult() + ")", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,12 +3,17 @@ package com.yizhuan.erban.ui.webview;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class DialogWebViewActivity extends CommonWebViewActivity {
|
||||
|
||||
|
@@ -26,10 +26,9 @@ import com.yizhuan.erban.public_chat_hall.activity.PublicChatHallHomeActivity;
|
||||
import com.yizhuan.erban.ui.im.RouterHandler;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
||||
import com.yizhuan.erban.ui.webview.event.CloseDialogWebViewEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.CloseWebViewEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.H5NotifyClientEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.ShowNavEvent;
|
||||
import com.yizhuan.erban.ui.webview.event.TaroPayResultEvent;
|
||||
import com.yizhuan.erban.ui.widget.ShareDialog;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.certification.event.CertificationResultEvent;
|
||||
@@ -113,7 +112,7 @@ public class JSInterface {
|
||||
@JavascriptInterface
|
||||
public void openChargePage() {
|
||||
if (context != null) {
|
||||
ChargeActivity.start(context,true);
|
||||
ChargeActivity.start(context, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +270,7 @@ public class JSInterface {
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void closeWebView() {
|
||||
EventBus.getDefault().post(new CloseWebViewEvent());
|
||||
if (mActivity != null) mActivity.finish();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -453,7 +452,7 @@ public class JSInterface {
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_FAIL) {
|
||||
// 认证不通过
|
||||
result = 1;
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_NOT) {
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_NOT) {
|
||||
// 未认证,用户取消
|
||||
result = -1;
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_EXCEPTION) {
|
||||
@@ -501,7 +500,21 @@ public class JSInterface {
|
||||
|
||||
@JavascriptInterface
|
||||
public void closeDialogWebView() {
|
||||
EventBus.getDefault().post(new CloseDialogWebViewEvent());
|
||||
if (mActivity instanceof TarotPayWebViewActivity) mActivity.finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开弹窗式 WebViewActivity
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void openDialogWebview(String url) {
|
||||
TarotPayWebViewActivity.start(mActivity, url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void checkResultFinish(int result) {
|
||||
EventBus.getDefault().post(new TaroPayResultEvent().setResult(result));
|
||||
if (mActivity instanceof TarotPayWebViewActivity) mActivity.finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,38 @@
|
||||
package com.yizhuan.erban.ui.webview;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
|
||||
|
||||
/**
|
||||
* 塔罗牌支付页面弹窗,仅塔罗牌支付使用
|
||||
*/
|
||||
public class TarotPayWebViewActivity extends CommonWebViewActivity {
|
||||
|
||||
public static void start(Context context, String url ) {
|
||||
Intent intent = new Intent(context, TarotPayWebViewActivity.class);
|
||||
intent.putExtra("url", url);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setFinishOnTouchOutside(false);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,ScreenUtil.dip2px(150));
|
||||
getWindow().setGravity(Gravity.CENTER);
|
||||
layoutTitleBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_tarot_pay_web_view;
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
package com.yizhuan.erban.ui.webview.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CloseWebViewEvent {
|
||||
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
package com.yizhuan.erban.ui.webview.event;
|
||||
|
||||
|
||||
/**
|
||||
* Created by MadisonRong on 26/06/2018.
|
||||
*/
|
||||
|
||||
public class TaroPayResultEvent {
|
||||
|
||||
private int result;
|
||||
|
||||
public int getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public TaroPayResultEvent setResult(int result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
}
|
93
app/src/main/res/layout/activity_tarot_pay_web_view.xml
Normal file
93
app/src/main/res/layout/activity_tarot_pay_web_view.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?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="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/arrow_left" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_webview_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_share"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/icon_title_share"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:textColor="@color/text_tertiary"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="常见问题" />
|
||||
</FrameLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_drawable" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</WebView>
|
||||
</androidx.cardview.widget.CardView>
|
@@ -295,6 +295,16 @@ public class XChatConstants {
|
||||
public static final String OPPO_APP_KEY = "631b6753a1fa481e88dd57793a04e531";
|
||||
public static final String OPPO_SECRET = "c963ee7c0ba54fbfb3124b4aa7011b17";
|
||||
|
||||
/**
|
||||
* Referer (DEBUG)
|
||||
*/
|
||||
public static final String KEY_REFERER_DEBUG = "http://api.uat.zhongjialx.com/";
|
||||
|
||||
/**
|
||||
* Referer (RELEASE)
|
||||
*/
|
||||
public static final String KEY_REFERER_RELEASE = "https://api.zhongjialx.com/";
|
||||
|
||||
public static int SELECT_ANIM_DURATION = 2500;
|
||||
// 侧耳
|
||||
// public static final String QUICK_PASS_BUSINESS_ID = BuildConfig.DEBUG ? "cadbb4ed892549dab4d1adc9d62013bb" : "ba4a642810294561b9cd17034a448b49";
|
||||
|
@@ -745,7 +745,8 @@ public final class IMNetEaseManager {
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_FOLLOW_ROOM
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_SEND_MAGIC
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MULTI_GIFT
|
||||
|| customAttachment.getFirst() == CUSTOM_MSG_HEADER_TYPE_KICK_MIC
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_KICK_MIC
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MESS_TAROT
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MONSTER_HUNTING
|
||||
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_MINI_WORLD) {
|
||||
addMessages(msg);
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package com.yizhuan.xchat_android_core;
|
||||
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
import com.yizhuan.xchat_android_library.utils.pref.CommonPref;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
@@ -103,6 +105,9 @@ public class Constants {
|
||||
public static final byte TYPE_RECOMMEND = 2;
|
||||
public static final byte TYPE_ALL = 0;
|
||||
|
||||
public static final String WXPAY_REFERER = (BuildConfig.DEBUG && CommonPref.instance(BasicConfig.INSTANCE.getAppContext()).getInt("enviroment") != 0) ?
|
||||
XChatConstants.KEY_REFERER_DEBUG : XChatConstants.KEY_REFERER_RELEASE;
|
||||
|
||||
//相亲模式男神坑位下标
|
||||
public static final List<Integer> maleIndex = Arrays.asList(0, 1, 4, 5);
|
||||
}
|
||||
|
@@ -540,6 +540,11 @@ public class CustomAttachParser implements MsgAttachmentParser {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CustomAttachment.CUSTOM_MESS_TAROT:
|
||||
attachment = new TarotAttachment(CustomAttachment.CUSTOM_MESS_TAROT, CustomAttachment.CUSTOM_MESS_TAROT_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -366,8 +366,9 @@ public class CustomAttachment implements MsgAttachment {
|
||||
//推送消息
|
||||
public static final int CUSTOM_MSG_PUSH_NOTIFIFICATION = 70;
|
||||
public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM = 701;// 推送进入房间
|
||||
// public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_CHAT_ROOM = 702;// 推送进入聊天页
|
||||
// public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_DYNAMIC_MSG = 703;// 推送进入动态消息
|
||||
|
||||
public static final int CUSTOM_MESS_TAROT = 71; //塔罗牌充值消息
|
||||
public static final int CUSTOM_MESS_TAROT_SUCCESS = 711; //塔罗牌充值中奖消息
|
||||
|
||||
|
||||
//相亲模式
|
||||
|
@@ -0,0 +1,37 @@
|
||||
package com.yizhuan.xchat_android_core.im.custom.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
public class TarotAttachment extends CustomAttachment {
|
||||
private TarotMsgBean tarotMsgBean;
|
||||
|
||||
public TarotAttachment(int first, int second) {
|
||||
super(first, second);
|
||||
}
|
||||
|
||||
public TarotMsgBean getTarotMsgBean() {
|
||||
return tarotMsgBean;
|
||||
}
|
||||
|
||||
public void setTarotMsgBean(TarotMsgBean tarotMsgBean) {
|
||||
this.tarotMsgBean = tarotMsgBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void parseData(JSONObject data) {
|
||||
tarotMsgBean = new Gson().fromJson(data.toJSONString(), TarotMsgBean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JSONObject packData() {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("chargeProdId", tarotMsgBean.getChargeProdId());
|
||||
jsonObject.put("chargeProdName", tarotMsgBean.getChargeProdName());
|
||||
jsonObject.put("drawGoldNum", tarotMsgBean.getDrawGoldNum());
|
||||
jsonObject.put("nick", tarotMsgBean.getNick());
|
||||
jsonObject.put("roomUid", tarotMsgBean.getRoomUid());
|
||||
jsonObject.put("uid", tarotMsgBean.getUid());
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.yizhuan.xchat_android_core.im.custom.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TarotMsgBean {
|
||||
/**
|
||||
* 中奖用户uid
|
||||
**/
|
||||
private long uid;
|
||||
/**
|
||||
* 中奖用户昵称
|
||||
**/
|
||||
private String nick;
|
||||
/**
|
||||
* 中奖的房间uid
|
||||
**/
|
||||
private long roomUid;
|
||||
/**
|
||||
* 中奖的产品ID
|
||||
**/
|
||||
private String chargeProdId;
|
||||
/**
|
||||
* 中奖的产品名称
|
||||
**/
|
||||
private String chargeProdName;
|
||||
/**
|
||||
* 中奖的金币数量
|
||||
**/
|
||||
private long drawGoldNum;
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package com.yizhuan.xchat_android_core.room.bean;
|
||||
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityInfo {
|
||||
|
||||
/**
|
||||
* list : [{"actId":5,"actName":"51大酬宾","seqNo":1,"alertWinPic":"https://image.zhongjialx.com/Fo5iOjNLYe6vwMk69OxSXlsgqGNJ?imageslim","imageType":"png","skipType":2,"skipUrl":"https://www.baidu.com","startTime":1556985600000,"endTime":1557763199000,"packName":"测试大礼包"},{"actId":7,"actName":"测试活动xxx","seqNo":10,"alertWinPic":"https://image.zhongjialx.com/Fts-bIveVbuHZj-UOOuT0ksncp3T?imageslim","imageType":"png","skipType":1,"skipUrl":"901485","startTime":1556640000000,"endTime":1559231999000,"packName":"情人礼包"}]
|
||||
* rotateInterval : 3
|
||||
*/
|
||||
|
||||
private int rotateInterval;
|
||||
private List<ActionDialogInfo> list;
|
||||
|
||||
public int getRotateInterval() {
|
||||
return rotateInterval;
|
||||
}
|
||||
|
||||
public void setRotateInterval(int rotateInterval) {
|
||||
this.rotateInterval = rotateInterval;
|
||||
}
|
||||
|
||||
public List<ActionDialogInfo> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<ActionDialogInfo> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
}
|
@@ -31,7 +31,6 @@ import com.yizhuan.xchat_android_core.patriarch.exception.PmRoomLimitException;
|
||||
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.ActivityTimerEvent;
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.TimerBean;
|
||||
import com.yizhuan.xchat_android_core.room.bean.ActivityInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomResult;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomWelcomeConfig;
|
||||
|
@@ -5,9 +5,7 @@ import com.netease.nimlib.sdk.chatroom.model.EnterChatRoomResultData;
|
||||
import com.yizhuan.xchat_android_core.base.IModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.TimerBean;
|
||||
import com.yizhuan.xchat_android_core.room.bean.ActivityInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomResult;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomWelcomeConfig;
|
||||
|
Reference in New Issue
Block a user