直播间开通贵族结束
This commit is contained in:
parent
f531fd4d0e
commit
1935ac14f0
@ -52,7 +52,7 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
private RelativeLayout rootLayout;
|
private RelativeLayout rootLayout;
|
||||||
private long animationTime = 8000;
|
private long animationTime = 8000;
|
||||||
private TextView gotoRoomView, nobleNickname, userName, anchorNickname;
|
private TextView gotoRoomView, nobleNickname, userName, anchorNickname;
|
||||||
private String mSvgaName, uhead,anchorUid;
|
private String mSvgaName, uhead, anchorUid;
|
||||||
private RoleType roleType;
|
private RoleType roleType;
|
||||||
private HorizontalScrollView contextLayout;
|
private HorizontalScrollView contextLayout;
|
||||||
private RelativeLayout scrollLayout;
|
private RelativeLayout scrollLayout;
|
||||||
@ -87,6 +87,14 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
anchorNickname = rootView.findViewById(R.id.anchor_nickname);
|
anchorNickname = rootView.findViewById(R.id.anchor_nickname);
|
||||||
contextLayout.setVisibility(GONE);
|
contextLayout.setVisibility(GONE);
|
||||||
gotoRoomView.setVisibility(GONE);
|
gotoRoomView.setVisibility(GONE);
|
||||||
|
gotoRoomView.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (callBack != null) {
|
||||||
|
callBack.gotoLive();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
|
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
|
||||||
@ -409,4 +417,15 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private NobleNoticeCallBack callBack;
|
||||||
|
|
||||||
|
public NobleNoticeView setCallBack(NobleNoticeCallBack callBack) {
|
||||||
|
this.callBack = callBack;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface NobleNoticeCallBack {
|
||||||
|
void gotoLive();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -686,7 +686,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
break;
|
break;
|
||||||
case NOBLE:
|
case NOBLE:
|
||||||
Constants.isTitle = true;
|
Constants.isTitle = true;
|
||||||
String nobleUrl = CommonAppConfig.HOST + "/h5/Nobility.html?nickname=" + userInfo.getUserNicename()
|
String nobleUrl = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + userInfo.getUserNicename()
|
||||||
+ "&usernobId=" + userInfo.getNobleId()
|
+ "&usernobId=" + userInfo.getNobleId()
|
||||||
+ "&token=" + userInfo.getToken()
|
+ "&token=" + userInfo.getToken()
|
||||||
+ "&anchorUid=" + mLiveBean.getUid()
|
+ "&anchorUid=" + mLiveBean.getUid()
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
package com.yunbao.live.activity;
|
package com.yunbao.live.activity;
|
||||||
|
|
||||||
import static com.yunbao.common.CommonAppContext.logger;
|
|
||||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
|
||||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
|
||||||
|
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -30,6 +26,7 @@ import androidx.annotation.RequiresApi;
|
|||||||
import com.adjust.sdk.Adjust;
|
import com.adjust.sdk.Adjust;
|
||||||
import com.adjust.sdk.AdjustEvent;
|
import com.adjust.sdk.AdjustEvent;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.opensource.svgaplayer.SVGACallback;
|
||||||
import com.opensource.svgaplayer.SVGADrawable;
|
import com.opensource.svgaplayer.SVGADrawable;
|
||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
@ -46,6 +43,10 @@ import com.yunbao.live.R;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
import static com.yunbao.common.CommonAppContext.logger;
|
||||||
|
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||||
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
public class ZhuangBanActivity extends AbsActivity {
|
public class ZhuangBanActivity extends AbsActivity {
|
||||||
|
|
||||||
private ProgressBar mProgressBar;
|
private ProgressBar mProgressBar;
|
||||||
@ -69,8 +70,8 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||||
svga = (SVGAImageView) findViewById(R.id.svga);
|
svga = (SVGAImageView) findViewById(R.id.svga);
|
||||||
title=findViewById(R.id.ft_title);
|
title = findViewById(R.id.ft_title);
|
||||||
if (isFullWindow){
|
if (isFullWindow) {
|
||||||
title.setVisibility(View.GONE);
|
title.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
mWebView = new WebView(mContext);
|
mWebView = new WebView(mContext);
|
||||||
@ -157,6 +158,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete(SVGAVideoEntity videoItem) {
|
public void onComplete(SVGAVideoEntity videoItem) {
|
||||||
|
svga.setVisibility(View.VISIBLE);
|
||||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||||
svga.setImageDrawable(drawable);
|
svga.setImageDrawable(drawable);
|
||||||
svga.setLoops(1);
|
svga.setLoops(1);
|
||||||
@ -167,6 +169,28 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
public void onError() {
|
public void onError() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
svga.setCallback(new SVGACallback() {
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinished() {
|
||||||
|
svga.clear();
|
||||||
|
svga.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRepeat() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStep(int i, double v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -2274,49 +2274,56 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.BARON);
|
.setRoleType(NobleNoticeView.RoleType.BARON)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.VISCOUNT);
|
.setRoleType(NobleNoticeView.RoleType.VISCOUNT)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.MARQUIS);
|
.setRoleType(NobleNoticeView.RoleType.MARQUIS)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.DUKE);
|
.setRoleType(NobleNoticeView.RoleType.DUKE)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "5":
|
case "5":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.KING);
|
.setRoleType(NobleNoticeView.RoleType.KING)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "6":
|
case "6":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.EMPEROR);
|
.setRoleType(NobleNoticeView.RoleType.EMPEROR)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
case "7":
|
case "7":
|
||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getAnchorUid())
|
||||||
.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR);
|
.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR)
|
||||||
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -21,9 +20,12 @@ import android.webkit.WebViewClient;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.opensource.svgaplayer.SVGACallback;
|
||||||
import com.opensource.svgaplayer.SVGADrawable;
|
import com.opensource.svgaplayer.SVGADrawable;
|
||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
@ -184,6 +186,7 @@ public class RewardActivity extends AbsActivity {
|
|||||||
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete(SVGAVideoEntity videoItem) {
|
public void onComplete(SVGAVideoEntity videoItem) {
|
||||||
|
svga.setVisibility(View.VISIBLE);
|
||||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||||
svga.setImageDrawable(drawable);
|
svga.setImageDrawable(drawable);
|
||||||
svga.setLoops(1);
|
svga.setLoops(1);
|
||||||
@ -194,6 +197,28 @@ public class RewardActivity extends AbsActivity {
|
|||||||
public void onError() {
|
public void onError() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
svga.setCallback(new SVGACallback() {
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinished() {
|
||||||
|
svga.clear();
|
||||||
|
svga.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRepeat() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStep(int i, double v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -215,7 +240,7 @@ public class RewardActivity extends AbsActivity {
|
|||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void gotoHomePage(String indexStr) {
|
public void gotoHomePage(String indexStr) {
|
||||||
Log.e("tgasss","indexStr3"+indexStr);
|
Log.e("tgasss", "indexStr3" + indexStr);
|
||||||
|
|
||||||
if (!"".equals(indexStr) && indexStr != null) {
|
if (!"".equals(indexStr) && indexStr != null) {
|
||||||
int index = -1;
|
int index = -1;
|
||||||
|
@ -7,7 +7,6 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -21,8 +20,11 @@ import android.webkit.WebViewClient;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.opensource.svgaplayer.SVGACallback;
|
||||||
import com.opensource.svgaplayer.SVGADrawable;
|
import com.opensource.svgaplayer.SVGADrawable;
|
||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
@ -189,16 +191,40 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
new SVGAParser(mContext).parse(new URL(svg), new SVGAParser.ParseCompletion() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete(SVGAVideoEntity videoItem) {
|
public void onComplete(SVGAVideoEntity videoItem) {
|
||||||
|
svga.setVisibility(View.VISIBLE);
|
||||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||||
svga.setImageDrawable(drawable);
|
svga.setImageDrawable(drawable);
|
||||||
svga.setLoops(1);
|
svga.setLoops(1);
|
||||||
svga.startAnimation();
|
svga.startAnimation();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError() {
|
public void onError() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
svga.setCallback(new SVGACallback() {
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinished() {
|
||||||
|
svga.clear();
|
||||||
|
svga.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRepeat() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStep(int i, double v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -217,7 +243,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
|||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void gotoHomePage(String indexStr) {
|
public void gotoHomePage(String indexStr) {
|
||||||
Log.e("tgasss","indexStr2"+indexStr);
|
Log.e("tgasss", "indexStr2" + indexStr);
|
||||||
if (!"".equals(indexStr) && indexStr != null) {
|
if (!"".equals(indexStr) && indexStr != null) {
|
||||||
int index = -1;
|
int index = -1;
|
||||||
if ("0".equals(indexStr)) {
|
if ("0".equals(indexStr)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user