fixed "default constructor not found."
This commit is contained in:
@@ -148,7 +148,8 @@ android {
|
||||
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
|
||||
buildConfigField "String", "BASE_URL_STAGING", "BASE_URL"
|
||||
buildConfigField "String", "BASE_URL_RELEASE", "BASE_URL"
|
||||
minifyEnabled false // 是否混淆
|
||||
minifyEnabled true // 是否混淆
|
||||
// shrinkResources true // 开了混淆的时候才能开启 是否去除无效的资源文件
|
||||
crunchPngs false // 停用 PNG 压缩
|
||||
signingConfig signingConfigs.v2
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
|
@@ -100,6 +100,7 @@ import com.yizhuan.xchat_android_core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.FairyMsgAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Attachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Info;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomLuckySeaAttachment;
|
||||
@@ -1264,7 +1265,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
break;
|
||||
case CustomAttachment.CUSTOM_MSG_NOTIFY_H5:
|
||||
if (baseProtocol.getSecond() == CustomAttachment.CUSTOM_MSG_NOTIFY_H5_SUB_WHOLE_SERVICE) {
|
||||
NotifyH5Attachment.Bean bean = JSON.parseObject(String.valueOf(baseProtocol.getData()), NotifyH5Attachment.Bean.class);
|
||||
NotifyH5Info bean = JSON.parseObject(String.valueOf(baseProtocol.getData()), NotifyH5Info.class);
|
||||
NotifyH5Attachment notifyH5Attachment = new NotifyH5Attachment(baseProtocol.getSecond());
|
||||
notifyH5Attachment.setBean(bean);
|
||||
ChatRoomMessage notifyH5Msg = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
|
@@ -871,7 +871,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
|
||||
private fun showNotifyH5(data: NotifyH5Attachment.Bean) {
|
||||
private fun showNotifyH5(data: NotifyH5Info) {
|
||||
val textView = LayoutInflater.from(mContext)
|
||||
.inflate(R.layout.layout_notify_h5, null) as TextView
|
||||
textView.text = data.content
|
||||
@@ -891,7 +891,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}, CLOSE_TIME.toLong())
|
||||
}
|
||||
|
||||
private fun showNotifyH5WithAnim(data: NotifyH5Attachment.Bean) {
|
||||
private fun showNotifyH5WithAnim(data: NotifyH5Info) {
|
||||
|
||||
val svgaImageView = SVGAImageView(mContext)
|
||||
svgaImageView.loops = 1
|
||||
|
@@ -104,6 +104,7 @@ import com.yizhuan.xchat_android_core.bean.BaseProtocol;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Attachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Info;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.PlayEffectInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomLuckySeaMsgBean;
|
||||
@@ -1065,7 +1066,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (baseProtocol.getSecond() == CustomAttachment.CUSTOM_MSG_NOTIFY_H5_SUB_WHOLE_SERVICE) {
|
||||
NotifyH5Attachment.Bean bean = JSON.parseObject(String.valueOf(baseProtocol.getData()), NotifyH5Attachment.Bean.class);
|
||||
NotifyH5Info bean = JSON.parseObject(String.valueOf(baseProtocol.getData()), NotifyH5Info.class);
|
||||
PlayEffectInfo playEffectInfo = new PlayEffectInfo();
|
||||
playEffectInfo.setSecond(CUSTOM_MSG_NOTIFY_H5_SUB_WHOLE_SERVICE);
|
||||
playEffectInfo.setNotifyH5(bean);
|
||||
|
@@ -26,9 +26,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMessage;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGADynamicEntity;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
@@ -43,21 +40,15 @@ import com.yizhuan.erban.utils.RegexUtil;
|
||||
import com.yizhuan.erban.utils.SpannableBuilder;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Attachment;
|
||||
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.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
import com.yizhuan.xchat_android_core.treasurefairy.FairyMsgInfoBean;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NotifyH5Info;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.PlayEffectInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomLuckySeaMsgBean;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.TarotMsgBean;
|
||||
import com.yizhuan.xchat_android_core.treasurefairy.FairyMsgInfoBean;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.StringUtils;
|
||||
|
||||
import lombok.val;
|
||||
|
||||
public class AllPlayEffectDialog extends BaseDialog {
|
||||
|
||||
private final PlayEffectInfo playEffectInfo;
|
||||
@@ -358,7 +349,7 @@ public class AllPlayEffectDialog extends BaseDialog {
|
||||
}
|
||||
}
|
||||
|
||||
private void showNotifyH5BySvga(NotifyH5Attachment.Bean info) {
|
||||
private void showNotifyH5BySvga(NotifyH5Info info) {
|
||||
SVGAImageView svgaImageView = new SVGAImageView(getContext());
|
||||
svgaImageView.setLoops(1);
|
||||
svgaImageView.setClearsAfterDetached(true);
|
||||
|
@@ -4,19 +4,8 @@ import com.alibaba.fastjson.JSONObject
|
||||
import com.google.gson.Gson
|
||||
|
||||
class NotifyH5Attachment(second: Int) : CustomAttachment(CUSTOM_MSG_NOTIFY_H5, second) {
|
||||
var bean: Bean? = null
|
||||
var bean: NotifyH5Info? = null
|
||||
override fun parseData(data: JSONObject) {
|
||||
bean = Gson().fromJson(data.toJSONString(), Bean::class.java)
|
||||
bean = Gson().fromJson(data.toJSONString(), NotifyH5Info::class.java)
|
||||
}
|
||||
|
||||
data class Bean(
|
||||
val roomUid: Int? = 0,
|
||||
|
||||
/**
|
||||
* 飘屏类型 0 房间静态飘屏 1 全服动态飘屏
|
||||
*/
|
||||
val floatingType: Int? = 0,
|
||||
|
||||
val content: String? = "",
|
||||
)
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
package com.yizhuan.xchat_android_core.im.custom.bean
|
||||
|
||||
class NotifyH5Info (
|
||||
val roomUid: Int? = 0,
|
||||
|
||||
/**
|
||||
* 飘屏类型 0 房间静态飘屏 1 全服动态飘屏
|
||||
*/
|
||||
val floatingType: Int? = 0,
|
||||
|
||||
val content: String? = "",
|
||||
)
|
@@ -16,5 +16,5 @@ public class PlayEffectInfo {
|
||||
|
||||
private TarotMsgBean tarotMsgBean;
|
||||
|
||||
private NotifyH5Attachment.Bean notifyH5;
|
||||
private NotifyH5Info notifyH5;
|
||||
}
|
Reference in New Issue
Block a user