Merge branch 'master' into dev_live_new_user_icon

This commit is contained in:
zlzw 2022-08-24 15:47:50 +08:00
commit b1c899a92b
21 changed files with 271 additions and 75 deletions

View File

@ -38,6 +38,7 @@ public abstract class AbsActivity extends AppCompatActivity {
protected String mTag;
protected Activity mContext;
protected List<LifeCycleListener> mLifeCycleListeners;
protected boolean isFullWindow;
@Override
public Resources getResources() {
@ -51,6 +52,11 @@ public abstract class AbsActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
isFullWindow=getIntent().getBooleanExtra("isFull",false);
if(isFullWindow){
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
super.onCreate(savedInstanceState);
mTag = this.getClass().getSimpleName();
setStatusBar();

View File

@ -7,7 +7,6 @@ import android.view.WindowManager;
import android.widget.ImageView;
import com.yunbao.common.R;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@ -37,11 +36,10 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo();
specialSwitch = (ImageView) findViewById(R.id.special_switch);
specialMountSwitch = (ImageView) findViewById(R.id.special_mount_switch);
giftEffect = userInfo.isGiftEffect();
mountEffect = userInfo.isMountEffect();
giftEffect = IMLoginManager.get(getActivity()).isGiftEffect();
mountEffect = IMLoginManager.get(getActivity()).isMountEffect();
if (giftEffect) {
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
} else {
@ -61,7 +59,8 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialSwitch);
}
//更新特效开关
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setGiftEffect(giftEffect));
IMLoginManager.get(getContext()).setGiftEffect(giftEffect);
}
);
//坐骑特效开关
@ -73,7 +72,7 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialMountSwitch);
}
//更新特效开关
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setMountEffect(mountEffect));
IMLoginManager.get(getContext()).setMountEffect(mountEffect);
}
);
}

View File

@ -27,6 +27,8 @@ public class IMLoginManager extends BaseCacheManager {
private IMLoginModel userInfo;
private final static String isNewUserGif = "isNewUserGif";
private final static String isNewUserOne = "isNewUserOne";
private final static String GiftEffect = "giftEffect";
private final static String MountEffect = "mountEffect";
//暂时缓存token
private String token = "";
@ -82,9 +84,12 @@ public class IMLoginManager extends BaseCacheManager {
if (null == userInfo) {
userInfo = new Gson().fromJson(
getString(KEY_USER_INFO), IMLoginModel.class);
if (userInfo != null)
if (userInfo != null) {
token = userInfo.getToken();
}
}
return userInfo;
}
@ -144,6 +149,23 @@ public class IMLoginManager extends BaseCacheManager {
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo));
}
public void setGiftEffect(boolean giftEffect) {
put(GiftEffect, giftEffect);
}
public void setMountEffect(boolean mountEffect) {
put(MountEffect, mountEffect);
}
public boolean isMountEffect() {
return getBoolean(MountEffect, false);
}
public boolean isGiftEffect() {
return getBoolean(GiftEffect, false);
}
/**
* 重新请求管理员身份信息
*/

View File

@ -26,6 +26,7 @@ import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.SlideInfoModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.EffectsSettingsDialog;
import com.yunbao.common.dialog.LiveChargeDialogFragment;
@ -214,7 +215,6 @@ public class LiveAudienceActivity extends LiveActivity {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
@ -236,7 +236,6 @@ public class LiveAudienceActivity extends LiveActivity {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
@ -274,6 +273,7 @@ public class LiveAudienceActivity extends LiveActivity {
});
getDrawer();
}
private void loadData(ViewGroup viewGroup, int currentItem) {
@ -294,6 +294,7 @@ public class LiveAudienceActivity extends LiveActivity {
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
LiveRoomCheckLivePresenter.isRoom = true;
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
//主播正在直播
if (liveBean1 == null) {
@ -700,6 +701,8 @@ public class LiveAudienceActivity extends LiveActivity {
//从右边打开侧边栏
SidebarLiveAudience sidebarLiveAudience = new SidebarLiveAudience();
bundle.putString("Avatar", mLiveBean.getAvatar());
bundle.putString("banner", GsonUtils.toJson(slideInfoModels));
bundle.putString("list", GsonUtils.toJson(list));
sidebarLiveAudience.setArguments(bundle);
sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience");
// manager.openDrawer();
@ -824,11 +827,10 @@ public class LiveAudienceActivity extends LiveActivity {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
Log.i("tag", url);
Bundle bundle1 = new Bundle();
bundle1.putString("url", url);
liveHDDialogFragment = new LiveHDDialogFragment(true);
liveHDDialogFragment.setArguments(bundle1);
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
Intent intent=new Intent(mContext,ZhuangBanActivity.class);
intent.putExtra("url", url);
intent.putExtra("isFull",true);
mContext.startActivity(intent);
break;
}
@ -857,5 +859,39 @@ public class LiveAudienceActivity extends LiveActivity {
context.startActivity(intent);
}
/**
* 获取侧边栏数据
*/
private List<SlideInfoModel> slideInfoModels = new ArrayList<>();
private List<AnchorRecommendItemModel> list = new ArrayList<>();
private void getDrawer() {
//侧边栏轮播
MainNetManager.get(mContext)
.getHot(1, new com.yunbao.common.http.base.HttpCallback<List<SlideInfoModel>>() {
@Override
public void onSuccess(List<SlideInfoModel> data) {
slideInfoModels = data;
}
@Override
public void onError(String error) {
}
});
//推荐位
MainNetManager.get(mContext)
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
@Override
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
list = anchorRecommendModel.getList();
}
@Override
public void onError(String error) {
}
});
}
}

View File

@ -1,5 +1,9 @@
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.ClipboardManager;
import android.content.Context;
@ -7,7 +11,6 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
@ -18,9 +21,12 @@ import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import androidx.annotation.RequiresApi;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent;
import com.alibaba.android.arouter.launcher.ARouter;
@ -40,10 +46,6 @@ import com.yunbao.live.R;
import java.net.MalformedURLException;
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 {
private ProgressBar mProgressBar;
@ -53,10 +55,11 @@ public class ZhuangBanActivity extends AbsActivity {
private ValueCallback<Uri> mValueCallback;
private ValueCallback<Uri[]> mValueCallback2;
private SVGAImageView svga;
private FrameLayout title;
@Override
protected int getLayoutId() {
return R.layout.activity_zhuang_ban;
return R.layout.activity_zhuang_ban_new;
}
@Override
@ -66,9 +69,12 @@ public class ZhuangBanActivity extends AbsActivity {
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
svga = (SVGAImageView) findViewById(R.id.svga);
title=findViewById(R.id.ft_title);
if (isFullWindow){
title.setVisibility(View.GONE);
}
mWebView = new WebView(mContext);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
mWebView.setLayoutParams(params);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);

View File

@ -1,16 +1,20 @@
package com.yunbao.live.dialog;
import android.app.Dialog;
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.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.webkit.JavascriptInterface;
import android.webkit.WebSettings;
@ -20,7 +24,6 @@ import android.webkit.WebViewClient;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent;
import com.alibaba.android.arouter.launcher.ARouter;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.JsWishBean;
import com.yunbao.common.dialog.AbsDialogFragment;
@ -29,10 +32,6 @@ import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
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 LiveHDDialogFragment extends AbsDialogFragment {
private WebView mWebView;
@ -73,7 +72,24 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
if(isFullWindow){
Display display=null;
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT,WindowManager.LayoutParams.MATCH_PARENT);
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.R) {
display= requireContext().getDisplay();
window.getInsetsController().hide(WindowInsets.Type.statusBars());
window.getInsetsController().hide(WindowInsets.Type.navigationBars());
}else {
display=window.getWindowManager().getDefaultDisplay();
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
window.getDecorView().setBackgroundColor(Color.parseColor("#10000000"));
params.height = WindowManager.LayoutParams.MATCH_PARENT;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
window.getDecorView().setMinimumHeight(display.getMode().getPhysicalHeight());
window.getDecorView().setMinimumWidth(display.getMode().getPhysicalWidth());
}
window.getDecorView().setPadding(10,-10,0,0);
}else {
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
}
@ -192,6 +208,10 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
dismiss();
((LiveAudienceActivity) mContext).openGiftWindow();
}
@JavascriptInterface
public void androidGoBack(){
dismiss();
}
}
/**

View File

@ -199,7 +199,6 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
break;
@ -327,7 +326,6 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}

View File

@ -64,7 +64,6 @@ public class LiveTotalDialog extends AbsDialogFragment {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
//粉丝团

View File

@ -1,6 +1,5 @@
package com.yunbao.live.dialog;
import android.os.Build;
import android.os.Bundle;
import android.view.Display;
import android.view.Gravity;
@ -12,6 +11,8 @@ import android.widget.ImageView;
import androidx.recyclerview.widget.GridLayoutManager;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.GsonUtils;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.SlideInfoModel;
@ -30,6 +31,7 @@ import com.yunbao.live.bean.LiveBean;
import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
import java.util.ArrayList;
import java.util.List;
/**
@ -43,6 +45,8 @@ public class SidebarLiveAudience extends AbsDialogFragment {
//侧边栏适配器
private SidebarAdapter sidebarAdapter;
private List<SlideInfoModel> slideInfoModels = new ArrayList<>();
private List<AnchorRecommendItemModel> list = new ArrayList<>();
@Override
protected int getLayoutId() {
@ -61,8 +65,13 @@ public class SidebarLiveAudience extends AbsDialogFragment {
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
if (bundle != null) {
String avatar = bundle.getString("Avatar");
slideInfoModels = GsonUtils.fromJson(bundle.getString("banner"), new TypeToken<List<SlideInfoModel>>() {
}.getType());
list = GsonUtils.fromJson(bundle.getString("list"), new TypeToken<List<AnchorRecommendItemModel>>() {
}.getType());
//侧边栏背景
ImgLoader.displayBlurLive(mContext, avatar, sidebarBack);
}
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false);
@ -85,6 +94,10 @@ public class SidebarLiveAudience extends AbsDialogFragment {
sidebarAdapter = new SidebarAdapter(mContext, mDisplay.getHeight());
sidebarAdapter.setHasStableIds(true);
sidebarList.setRecyclerViewAdapter(sidebarAdapter);
if (sidebarAdapter != null) {
sidebarAdapter.addData(list);
sidebarAdapter.setData(slideInfoModels);
}
sidebarList.setDataHelperNew(new CommonRefreshView.DataHelperNew() {
@Override
public void loadData(int p) {
@ -98,7 +111,6 @@ public class SidebarLiveAudience extends AbsDialogFragment {
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
@Override
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
if (getActivity().isFinishing()) return;
//侧边栏
MainNetManager.get(getActivity())
.getHot(1, new com.yunbao.common.http.base.HttpCallback<List<SlideInfoModel>>() {
@ -136,12 +148,12 @@ public class SidebarLiveAudience extends AbsDialogFragment {
@Override
protected void setWindowAttributes(Window window) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(0);
}
window.setWindowAnimations(com.yunbao.common.R.style.RightLeftToAnim);
WindowManager.LayoutParams params = window.getAttributes();
params.width = DeviceUtils.getScreenWidth(getActivity()) / 3 * 2;
@ -151,7 +163,6 @@ public class SidebarLiveAudience extends AbsDialogFragment {
}
/**
* 前往直播间
*/

View File

@ -24,6 +24,7 @@ import android.widget.MediaController;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.opensource.svgaplayer.SVGACallback;
import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
@ -313,10 +314,35 @@ public class LiveEnterRoomAnimPresenter {
}
} else {
if (mSVGImageView != null) {
mSVGImageView.setVisibility(View.VISIBLE);
SVGARect rect = svgaVideoEntity.getVideoSize();
mSVGImageView.setVideoItem(svgaVideoEntity);
mSVGImageView.setLoops(1);
mSVGImageView.startAnimation();
mSVGImageView.setCallback(new SVGACallback() {
@Override
public void onPause() {
}
@Override
public void onFinished() {
mSVGImageView.clear();
mSVGImageView.setVisibility(View.GONE);
mIsAnimating = false;
}
@Override
public void onRepeat() {
}
@Override
public void onStep(int i, double v) {
}
});
}
}
mIsAnimating = false;
@ -414,8 +440,10 @@ public class LiveEnterRoomAnimPresenter {
colocNow = "#" + car.getCar_colour();
playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room);
}
if (IMLoginManager.get(mContext).getUserInfo().isMountEffect()){
if (IMLoginManager.get(mContext).isMountEffect()) {
GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback);
} else {
mIsAnimating = false;
}
}

View File

@ -796,7 +796,7 @@ public class LiveGiftAnimPresenter {
}
} else {
if ((bean.getGifUrl().contains("svga") || bean.getGifUrl().contains("gif")) &&
IMLoginManager.get(mContext).getUserInfo().isGiftEffect()) {
IMLoginManager.get(mContext).isGiftEffect()) {
//同一直播间玩家自己送礼物也能看到全服通知
//同一直播间其他玩家也能看到全服通知
@ -859,12 +859,6 @@ public class LiveGiftAnimPresenter {
AllMsgTextRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
//下载横幅前面的动画
// ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
// String testUrl = configBean.getAllServerGiftIcon();
// if (!testUrl.isEmpty() && testUrl != null)
// GifCacheUtil.getFile(Constants.GIF_GIFT_PREFIX + GIFTFRONT_ID, testUrl, "1", mDownloadIconCallback);
}
}
@ -1224,6 +1218,7 @@ public class LiveGiftAnimPresenter {
*/
private void playSVGA(SVGAVideoEntity svgaVideoEntity) {
if (mSVGAImageView != null) {
mSVGAImageView.setVisibility(View.VISIBLE);
SVGARect rect = svgaVideoEntity.getVideoSize();
resizeSvgaImageView(rect.getWidth(), rect.getHeight());
mSvgaPlayTime = System.currentTimeMillis();
@ -1239,6 +1234,7 @@ public class LiveGiftAnimPresenter {
public void onFinished() {
mSVGAImageView.clear();
mSVGAImageView.setVisibility(View.GONE);
mShowGif = false;
}
@Override

View File

@ -32,7 +32,7 @@ public class LiveRoomCheckLivePresenter {
private ActionListener mActionListener;
private int mLiveSdk;
//搜索页面不提示密码
public static boolean isSearch = false;
public static boolean isRoom = false;
public LiveRoomCheckLivePresenter(Context context, ActionListener actionListener) {
mContext = context;
@ -102,7 +102,7 @@ public class LiveRoomCheckLivePresenter {
* 前往密码房间
*/
private void forwardPwdRoom() {
if (!isSearch) {
if (!isRoom) {
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
@ -121,7 +121,7 @@ public class LiveRoomCheckLivePresenter {
});
}else {
enterLiveRoom();
isSearch = false;
isRoom = false;
}
}

View File

@ -61,6 +61,7 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
/**
@ -126,6 +127,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
private void svga_new_user_gif() {
svga_new_user_gif.setVisibility(View.VISIBLE);
new SVGAParser(mContext).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
@ -142,6 +144,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
}
private void svga_new_user_double() {
svga_new_user_double.setVisibility(View.VISIBLE);
new SVGAParser(mContext).decodeFromAssets("double_click_tip.svga", new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
@ -159,6 +162,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
}
private void svga_new_user_follow() {
svga_new_user_follow.setVisibility(View.VISIBLE);
new SVGAParser(mContext).decodeFromAssets("live_follow_tip.svga", new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
@ -375,7 +379,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
liveNewPeople.setVisibility(View.VISIBLE);
newPeopleUrl = peopleInfo.getLink();
}
}).isDisposed();
}, Throwable::printStackTrace).isDisposed();
}
@Override

View File

@ -240,7 +240,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
});

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/ft_title"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@color/white"
android:paddingTop="19dp">
<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"
android:tint="@color/textColor" />
</RelativeLayout>
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progressbar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="3dp"
android:progressDrawable="@drawable/bg_horizontal_progressbar"/>
<LinearLayout
android:orientation="vertical"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"/>
</RelativeLayout>
</LinearLayout>

View File

@ -26,9 +26,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingTop="10dp"
android:paddingEnd="8dp">
android:paddingTop="26dp">
<com.yunbao.common.custom.CommonRefreshView

View File

@ -6,21 +6,29 @@
<LinearLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="4dp"
app:cardElevation="4dp">
<com.ms.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="77dp"
android:layout_marginBottom="5dp"
app:delay_time="3000"
app:indicator_drawable_selected="@drawable/bg_home_indicator_selected"
app:indicator_drawable_unselected="@drawable/bg_home_indicator_unselected"
app:indicator_height="8dp"
app:indicator_margin="6dp"
app:indicator_width="8dp" />
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="match_parent"

View File

@ -175,7 +175,7 @@ public class SearchActivity extends AbsActivity {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
LiveRoomCheckLivePresenter.isSearch = true;
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
if (liveBean1 == null) {
return;

View File

@ -61,7 +61,6 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}

View File

@ -85,7 +85,6 @@ public class SearchRecommendFragment extends BaseFragment {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}

View File

@ -53,7 +53,6 @@ public class SearchRecommendBodyViewHolder extends RecyclerView.ViewHolder {
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}