Compare commits

...

8 Commits

Author SHA1 Message Date
18401019693
ee5d3bb028 送礼物更改 2022-11-22 14:52:49 +08:00
18401019693
1346a1de52 测试修改 2022-11-18 17:28:42 +08:00
18401019693
9fa0109c2e 测试更改 2022-11-18 10:50:40 +08:00
94a96ba91a 调整直播间礼物弹框高度 2022-11-18 10:40:11 +08:00
18401019693
5006b8414e 测试修改 2022-11-15 13:53:15 +08:00
18401019693
5eac127142 测试修改 2022-11-15 11:31:59 +08:00
18401019693
8e89fdfa65 测试修改 2022-11-15 10:24:37 +08:00
5f210af804 修复关闭小窗时部分机型闪退问题
修复热度加gif不播放问题
修复送礼主播会闪退问题(心愿单id冲突)
修复一处PK中的空指针问题
修复滑动直播间不显示离开图
2022-11-15 10:10:28 +08:00
28 changed files with 494 additions and 391 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#FF8D41</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#FF8D41</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#FF8D41</color>
<!--fulive demo 主配色--> <!--fulive demo 主配色-->
<color name="primary_background">#050F14</color> <color name="primary_background">#050F14</color>

View File

@ -68,7 +68,17 @@ public class MsgModel extends BaseModel {
private String taskName1; private String taskName1;
@SerializedName("taskName2") @SerializedName("taskName2")
private String taskName2; private String taskName2;
@SerializedName("activityUrl")
private String activityUrl;
public String getActivityUrl() {
return activityUrl;
}
public MsgModel setActivityUrl(String activityUrl) {
this.activityUrl = activityUrl;
return this;
}
/** /**
* 星级挑战成功IM消息 * 星级挑战成功IM消息

View File

@ -7,6 +7,11 @@ import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
@ -77,6 +82,15 @@ public class HintDialog extends AbsDialogFragment {
} }
@Override
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
try {
super.show(manager, tag);
} catch (Exception e) {
e.printStackTrace();
}
}
private HintListener listener; private HintListener listener;
public HintDialog setListener(HintListener listener) { public HintDialog setListener(HintListener listener) {

View File

@ -72,7 +72,6 @@ public class ImgLoader {
.load(url) .load(url)
.thumbnail(thumbnail) .thumbnail(thumbnail)
.dontAnimate()
.placeholder(imageView.getDrawable()); .placeholder(imageView.getDrawable());
if (width != -1 && height != -1) { if (width != -1 && height != -1) {
builder = builder.override(width, height); builder = builder.override(width, height);

View File

@ -6,9 +6,11 @@ import android.content.res.Resources;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.PorterDuff; import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode; import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.provider.MediaStore; import android.provider.MediaStore;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
@ -195,4 +197,24 @@ public class BitmapUtil {
canvas.drawBitmap(bitmap, 0, 0, paint); canvas.drawBitmap(bitmap, 0, 0, paint);
return bm; return bm;
} }
/**
* 镜像Bitmap
*
* @param bitmap
* @return
*/
public Bitmap convertMirror(Bitmap bitmap) {
int w = bitmap.getWidth();
int h = bitmap.getHeight();
Bitmap newb = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);// 创建一个新的和SRC长度宽度一样的位图
Canvas cv = new Canvas(newb);
Matrix m = new Matrix();
//m.postScale(1, -1); //镜像垂直翻转
m.postScale(-1, 1); //镜像水平翻转
//m.postRotate(-90); //旋转-90度
Bitmap new2 = Bitmap.createBitmap(bitmap, 0, 0, w, h, m, true);
cv.drawBitmap(new2, new Rect(0, 0, new2.getWidth(), new2.getHeight()), new Rect(0, 0, w, h), null);
return newb;
}
} }

View File

@ -7,16 +7,17 @@ import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.Gravity; import android.view.Gravity;
import android.view.View; import android.view.View;
import android.widget.RelativeLayout;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.enums.ShowPattern; import com.lzf.easyfloat.enums.ShowPattern;
import com.lzf.easyfloat.interfaces.FloatCallbacks; import com.lzf.easyfloat.interfaces.FloatCallbacks;
import com.lzf.easyfloat.interfaces.OnInvokeView; import com.lzf.easyfloat.interfaces.OnInvokeView;
import com.tencent.live2.V2TXLivePlayer; import com.tencent.rtmp.ITXLivePlayListener;
import com.tencent.live2.V2TXLivePlayerObserver; import com.tencent.rtmp.TXLivePlayer;
import com.tencent.live2.impl.V2TXLivePlayerImpl;
import com.tencent.rtmp.ui.TXCloudVideoView; import com.tencent.rtmp.ui.TXCloudVideoView;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveBean;
@ -24,6 +25,7 @@ import com.yunbao.common.dialog.HintDialog;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.HttpClient;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.floatingview.APPEasyFloat;
import com.yunbao.common.views.floatingview.FloatingMagnetView; import com.yunbao.common.views.floatingview.FloatingMagnetView;
@ -47,7 +49,7 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
private int mLiveTypeVal; private int mLiveTypeVal;
private FloatCallbacks.Builder builder; private FloatCallbacks.Builder builder;
private String TAG = "LiveFloatView"; private String TAG = "LiveFloatView";
private V2TXLivePlayer mPlayer; private TXLivePlayer mPlayer;
public static LiveFloatView getInstance() { public static LiveFloatView getInstance() {
if (instance == null) { if (instance == null) {
@ -68,30 +70,50 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
.setMagnetViewListener(new MagnetViewListener() { .setMagnetViewListener(new MagnetViewListener() {
@Override @Override
public void invoke(FloatingMagnetView magnetView) { public void invoke(FloatingMagnetView magnetView) {
CardView layout = magnetView.findViewById(R.id.layout);
RelativeLayout.LayoutParams cardParams = (RelativeLayout.LayoutParams) layout.getLayoutParams();
if (mLiveBean.getLandscape() == 1) {
cardParams.height = DpUtil.dp2px(130);
cardParams.width = DpUtil.dp2px(230);
} else {
cardParams.height = DpUtil.dp2px(224);
cardParams.width = DpUtil.dp2px(126);
}
TXCloudVideoView videoView = magnetView.findViewById(R.id.video_view); TXCloudVideoView videoView = magnetView.findViewById(R.id.video_view);
mPlayer = new V2TXLivePlayerImpl(mContext); mPlayer = new TXLivePlayer(mContext);
mPlayer.setRenderView(videoView); mPlayer.setPlayerView(videoView);
mPlayer.startPlay(url); mPlayer.startPlay(url, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
mPlayer.setObserver(new V2TXLivePlayerObserver() { mPlayer.setPlayListener(new ITXLivePlayListener() {
@Override @Override
public void onWarning(V2TXLivePlayer player, int code, String msg, Bundle extraInfo) { public void onPlayEvent(int event, Bundle param) {
super.onWarning(player, code, msg, extraInfo); float videoWidth = param.getInt("EVT_PARAM1", 0);
Log.e(TAG, msg + "==============" + code); float videoHeight = param.getInt("EVT_PARAM2", 0);
Log.e("视频流有", "videoWidth:" + videoWidth + " videoHeight:" + videoHeight);
if (mLiveBean.getLandscape() != 1){
if (videoWidth > 720) {
cardParams.height = DpUtil.dp2px(130);
cardParams.width = DpUtil.dp2px(230);
} else {
cardParams.height = DpUtil.dp2px(224);
cardParams.width = DpUtil.dp2px(126);
}
layout.setLayoutParams(cardParams);
}
} }
@Override @Override
public void onError(V2TXLivePlayer player, int code, String msg, Bundle extraInfo) { public void onNetStatus(Bundle bundle) {
super.onError(player, code, msg, extraInfo);
Log.e(TAG, msg + "==============" + code);
} }
}); });
ViewClicksAntiShake.clicksAntiShake(magnetView.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(magnetView.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
mPlayer.stopPlay(); mPlayer.stopPlay(true);
APPEasyFloat.getInstance().dismiss(mContext); APPEasyFloat.getInstance().dismiss(mContext);
if (IMLoginManager.get(mContext).isHint2()) { if (IMLoginManager.get(mContext).isHint2() && !((FragmentActivity) mContext).getSupportFragmentManager().isDestroyed()) {
HintDialog fragment = new HintDialog(); HintDialog fragment = new HintDialog();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putString("close", "1"); args.putString("close", "1");
@ -100,8 +122,8 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
} }
} }
}); });
ViewClicksAntiShake.clicksAntiShake(magnetView, () -> { ViewClicksAntiShake.clicksAntiShake(videoView, () -> {
mPlayer.stopPlay(); mPlayer.stopPlay(true);
APPEasyFloat.getInstance().dismiss(mContext); APPEasyFloat.getInstance().dismiss(mContext);
new Handler().post(liveCheck); new Handler().post(liveCheck);
@ -117,7 +139,7 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
@Override @Override
public void dismiss() { public void dismiss() {
if (mPlayer != null) if (mPlayer != null)
mPlayer.stopPlay(); mPlayer.stopPlay(true);
} }
}) })
.show(mContext); .show(mContext);
@ -156,15 +178,14 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
callback.invoke(aBoolean); callback.invoke(aBoolean);
} }
builder.dismiss(() -> { builder.dismiss(() -> {
if (mPlayer != null && mPlayer.isPlaying() == 1) { if (mPlayer != null && mPlayer.isPlaying()) {
mPlayer.stopPlay(); mPlayer.stopPlay(true);
} }
return null; return null;
}); });
builder.hide(view12 -> { builder.hide(view12 -> {
if (mPlayer != null && mPlayer.isPlaying() == 1) { if (mPlayer != null && mPlayer.isPlaying()) {
mPlayer.pauseAudio(); mPlayer.pause();
mPlayer.pauseVideo();
} }
return null; return null;
}); });
@ -182,14 +203,49 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
@Override @Override
public void invoke(View view) { public void invoke(View view) {
TXCloudVideoView videoView = view.findViewById(R.id.video_view); TXCloudVideoView videoView = view.findViewById(R.id.video_view);
mPlayer = new V2TXLivePlayerImpl(mContext); CardView layout = view.findViewById(R.id.layout);
mPlayer.setRenderView(videoView); RelativeLayout.LayoutParams cardParams = (RelativeLayout.LayoutParams) layout.getLayoutParams();
mPlayer.startPlay(url); if (mLiveBean.getLandscape() == 1) {
cardParams.height = DpUtil.dp2px(130);
cardParams.width = DpUtil.dp2px(230);
} else {
cardParams.height = DpUtil.dp2px(224);
cardParams.width = DpUtil.dp2px(126);
}
layout.setLayoutParams(cardParams);
mPlayer = new TXLivePlayer(mContext);
mPlayer.setPlayerView(videoView);
mPlayer.startPlay(url, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
mPlayer.setPlayListener(new ITXLivePlayListener() {
@Override
public void onPlayEvent(int event, Bundle param) {
float videoWidth = param.getInt("EVT_PARAM1", 0);
float videoHeight = param.getInt("EVT_PARAM2", 0);
Log.e("视频流有", "videoWidth:" + videoWidth + " videoHeight:" + videoHeight);
if (mLiveBean.getLandscape() != 1){
if (videoWidth > 720) {
cardParams.height = DpUtil.dp2px(130);
cardParams.width = DpUtil.dp2px(230);
} else {
cardParams.height = DpUtil.dp2px(224);
cardParams.width = DpUtil.dp2px(126);
}
layout.setLayoutParams(cardParams);
}
}
@Override
public void onNetStatus(Bundle bundle) {
}
});
ViewClicksAntiShake.clicksAntiShake(view.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(view.findViewById(R.id.btn_close), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
mPlayer.stopPlay(); mPlayer.stopPlay(true);
EasyFloat.dismiss("LiveFloatView", true); EasyFloat.dismiss("LiveFloatView", true);
if (IMLoginManager.get(mContext).isHint2() && !((FragmentActivity) mContext).getSupportFragmentManager().isDestroyed()) { if (IMLoginManager.get(mContext).isHint2() && !((FragmentActivity) mContext).getSupportFragmentManager().isDestroyed()) {
HintDialog fragment = new HintDialog(); HintDialog fragment = new HintDialog();
@ -202,7 +258,7 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
}); });
ViewClicksAntiShake.clicksAntiShake(view, () -> { ViewClicksAntiShake.clicksAntiShake(view, () -> {
mPlayer.stopPlay(); mPlayer.stopPlay(true);
new Handler().post(liveCheck); new Handler().post(liveCheck);

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="210dp" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/layout"
android:layout_width="230dp" android:layout_width="230dp"
android:layout_height="130dp" android:layout_height="130dp"
android:layout_marginStart="25dp" android:layout_marginStart="25dp"

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <style name="AppTheme" parent="Base.Theme.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="android:colorBackground">@color/background</item> <item name="android:colorBackground">@color/background</item>
<item name="android:windowAnimationStyle">@style/Animation</item> <item name="android:windowAnimationStyle">@style/Animation</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" >@color/colorPrimary</item>
</style> </style>
<style name="dialog" parent="AppTheme"> <style name="dialog" parent="AppTheme">
<item name="android:windowFrame">@null</item> <item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>

View File

@ -25,7 +25,7 @@ ext {
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
// true表示谷歌支付 false // true表示谷歌支付 false
isGooglePlay : true, isGooglePlay : false,
// //
isUploadLog : true isUploadLog : true
] ]

View File

@ -159,7 +159,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
mDialogFragmentSet = new HashSet<>(); mDialogFragmentSet = new HashSet<>();
//解压 美颜模型 //解压 美颜模型
try { /*try {
CommonAppConfig.VIDEO_TIE_MODEl_PATH = getFilesDir().getAbsolutePath() + "/model";//app安装路径 CommonAppConfig.VIDEO_TIE_MODEl_PATH = getFilesDir().getAbsolutePath() + "/model";//app安装路径
File model = new File(CommonAppConfig.VIDEO_TIE_MODEl_PATH); File model = new File(CommonAppConfig.VIDEO_TIE_MODEl_PATH);
if (model.exists() && Objects.requireNonNull(model.listFiles()).length > 0) { if (model.exists() && Objects.requireNonNull(model.listFiles()).length > 0) {
@ -169,7 +169,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.i("log", "beauty e=" + e); Log.i("log", "beauty e=" + e);
} }*/
} }
@Override @Override

View File

@ -14,6 +14,8 @@ import static com.yunbao.live.views.LiveRyAnchorViewHolder.btn_start_dr_pk_view;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
@ -21,21 +23,22 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils; import com.bumptech.glide.Glide;
import com.lzy.okgo.callback.Callback; import com.bumptech.glide.request.target.CustomTarget;
import com.lzy.okgo.model.Progress; import com.bumptech.glide.request.transition.Transition;
import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.base.Request;
import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAImageView;
import com.tencent.trtc.TRTCCloudDef; import com.tencent.trtc.TRTCCloudDef;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.LoginInvalidEvent; import com.yunbao.common.event.LoginInvalidEvent;
@ -45,6 +48,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.JsonBean; import com.yunbao.common.http.JsonBean;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.BitmapUtil;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DateFormatUtil; import com.yunbao.common.utils.DateFormatUtil;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
@ -55,12 +59,9 @@ import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.live.bean.LiveGuardInfo; import com.yunbao.live.bean.LiveGuardInfo;
import com.yunbao.live.bean.LiveKsyConfigBean; import com.yunbao.live.bean.LiveKsyConfigBean;
import com.yunbao.live.bean.LiveReceiveGiftBean; import com.yunbao.live.bean.LiveReceiveGiftBean;
import com.yunbao.live.bean.WishlistModel;
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
import com.yunbao.live.dialog.LiveLinkMicListDialogFragment; import com.yunbao.live.dialog.LiveLinkMicListDialogFragment;
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment; import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
import com.yunbao.live.dialog.LiveNewWishListDialogFragment; import com.yunbao.live.dialog.LiveNewWishListDialogFragment;
@ -71,7 +72,6 @@ import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.interfaces.LiveFunctionClickListener; import com.yunbao.live.interfaces.LiveFunctionClickListener;
import com.yunbao.live.interfaces.LivePushListener; import com.yunbao.live.interfaces.LivePushListener;
import com.yunbao.live.momo.BeautyManager;
import com.yunbao.live.music.LiveMusicDialogFragment; import com.yunbao.live.music.LiveMusicDialogFragment;
import com.yunbao.live.presenter.LiveLinkMicAnchorPresenter; import com.yunbao.live.presenter.LiveLinkMicAnchorPresenter;
import com.yunbao.live.presenter.LiveLinkMicPresenter; import com.yunbao.live.presenter.LiveLinkMicPresenter;
@ -94,6 +94,7 @@ import java.util.List;
import cn.rongcloud.rtc.api.RCRTCEngine; import cn.rongcloud.rtc.api.RCRTCEngine;
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback; import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
import cn.rongcloud.rtc.base.RCRTCRect;
import cn.rongcloud.rtc.base.RTCErrorCode; import cn.rongcloud.rtc.base.RTCErrorCode;
import io.rong.imlib.IRongCallback; import io.rong.imlib.IRongCallback;
import io.rong.imlib.RongIMClient; import io.rong.imlib.RongIMClient;
@ -103,7 +104,6 @@ import io.rong.message.TextMessage;
import pl.droidsonroids.gif.GifImageView; import pl.droidsonroids.gif.GifImageView;
/** /**
* Created by cxf on 2018/10/7. * Created by cxf on 2018/10/7.
* 主播直播间 * 主播直播间
@ -142,7 +142,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
public static int backIndex = 0;//0=未判断1=已判断 public static int backIndex = 0;//0=未判断1=已判断
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
return R.layout.activity_live_anchor; return R.layout.activity_live_anchor;
@ -230,15 +229,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
break; break;
case Constants.LIVE_FUNC_MIC://語音 case Constants.LIVE_FUNC_MIC://語音
ToastUtil.show("開發中,敬請期待"); ToastUtil.show("開發中,敬請期待");
/* //连麦说是有问题暂时隐藏
LiveMicUserDialogFragment fragment = new LiveMicUserDialogFragment();
Bundle bundle = new Bundle();
bundle.putString(Constants.LIVE_UID, mLiveUid);
bundle.putString(Constants.STREAM, mStream);
bundle.putString("By", "1");
fragment.setArguments(bundle);
fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveUserMoreDialogFragment");
LiveMicUserDialogFragment.activity = ((LiveRyAnchorActivity) mContext);*/
break; break;
case Constants.LIVE_FUNC_DR://多人PK case Constants.LIVE_FUNC_DR://多人PK
if (isDRPK != 1) { if (isDRPK != 1) {
@ -349,60 +339,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
openRedPackSendWindow(); openRedPackSendWindow();
break; break;
case Constants.LIVE_FUNC_ZSLK://暫時離開 case Constants.LIVE_FUNC_ZSLK://暫時離開
if (leave == 0) { leaveLive();
leave = 1;
mLivePushViewHolder.leave.setVisibility(View.VISIBLE);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
} else {
leave = 0;
mLivePushViewHolder.leave.setVisibility(View.GONE);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
}
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
.params("uid", CommonAppConfig.getInstance().getUid())
.params("isleave", leave)
.params("token", CommonAppConfig.getInstance().getToken())
.execute(new Callback<JsonBean>() {
@Override
public void onStart(Request<JsonBean, ? extends Request> request) {
}
@Override
public void onSuccess(Response<JsonBean> response) {
}
@Override
public void onCacheSuccess(Response<JsonBean> response) {
}
@Override
public void onError(Response<JsonBean> response) {
}
@Override
public void onFinish() {
}
@Override
public void uploadProgress(Progress progress) {
}
@Override
public void downloadProgress(Progress progress) {
}
@Override
public JsonBean convertResponse(okhttp3.Response response) throws Throwable {
return null;
}
});
break; break;
case Constants.LIVE_FUNC_WKS: case Constants.LIVE_FUNC_WKS:
String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
@ -434,6 +371,45 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
} }
/**
* 主播展示离开直播间
*/
private void leaveLive() {
RCRTCRect rect = new RCRTCRect(0f, 0f, 1.0f);
if (leave == 0) {
leave = 1;
Glide.with(mContext).asBitmap().load(R.mipmap.zslk).into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(BitmapUtil.getInstance().convertMirror(resource), rect);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_leave));
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
});
} else if (leave == 1) {
leave = 0;
// 清除水印
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(null, rect);
sendSystemMessage(WordUtil.getString(R.string.live_anchor_come_back));
}
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")
.params("uid", CommonAppConfig.getInstance().getUid())
.params("isleave", leave)
.params("token", CommonAppConfig.getInstance().getToken())
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
}
});
}
/** /**
* 打开心愿单窗口 * 打开心愿单窗口
@ -481,9 +457,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.changeFaceUnityView(); mLiveRoomViewHolder.changeFaceUnityView();
} }
/* LiveBeautyDialogFragment fragment = new LiveBeautyDialogFragment();
fragment.setiBeautyModule(BeautyManager.iBeautyModule, BeautyManager.iLookupModule, BeautyManager.iBeautyBodyModule);
fragment.show(getSupportFragmentManager(), "LiveBeautyDialogFragment");*/
} }
/** /**
@ -491,7 +464,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
*/ */
public void light() { public void light() {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
// mLiveRoomViewHolder.playLightAnim();
} }
} }
@ -1269,6 +1241,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
L.e(TAG, content); L.e(TAG, content);
LogUtil.print(mLogFile, content); LogUtil.print(mLogFile, content);
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onOpenDrawer(LiveAudienceEvent event) { public void onOpenDrawer(LiveAudienceEvent event) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();

View File

@ -8,7 +8,6 @@ import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -22,19 +21,21 @@ import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import androidx.annotation.RequiresApi;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig; import com.yunbao.common.HtmlConfig;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.live.dialog.LiveUserDialogFragment; import com.yunbao.live.dialog.LiveUserDialogFragment;
import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
@ -168,7 +169,6 @@ public class WebViewActivityMedal extends AbsActivity {
} }
} }
private LiveRoomCheckLivePresenter mCheckLivePresenter;
private void gotoLive(final String live_id) { private void gotoLive(final String live_id) {
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
@ -177,22 +177,10 @@ public class WebViewActivityMedal extends AbsActivity {
if (code == 0 && info.length > 0) { if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
if (mCheckLivePresenter == null) { LiveAudienceActivity.forward(mContext, liveBean, 0, 0, "", 0, 0);
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
@Override
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
if (liveBean == null) {
return;
}
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
}
});
}
mCheckLivePresenter.checkLive(liveBean);
} else { } else {
RouteUtil.forwardUserHome(mContext, live_id,0);
RouteUtil.forwardUserHome(mContext, String.valueOf(live_id), 0);
} }
} }
}); });

View File

@ -148,7 +148,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
window.setWindowAnimations(R.style.bottomToTopAnim); window.setWindowAnimations(R.style.bottomToTopAnim);
WindowManager.LayoutParams params = window.getAttributes(); WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT; params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.height = WindowManager.LayoutParams.WRAP_CONTENT; params.height = DpUtil.dp2px(355);
params.gravity = Gravity.BOTTOM; params.gravity = Gravity.BOTTOM;
window.setAttributes(params); window.setAttributes(params);
} }
@ -503,11 +503,11 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
} else if (i == R.id.btn_choose) { } else if (i == R.id.btn_choose) {
showGiftCount(); showGiftCount();
} else if (i == R.id.coin) { } else if (i == R.id.coin) {
forwardMyCoin(); forwardMyCoin(0);
} else if (i == R.id.goldCoin) { } else if (i == R.id.goldCoin) {
forwardMyCoin(); forwardMyCoin(2);
} else if (i == R.id.go_charge) { } else if (i == R.id.go_charge) {
forwardMyCoin(); forwardMyCoin(0);
} else if (i == R.id.btn_luck_gift_tip) { } else if (i == R.id.btn_luck_gift_tip) {
dismiss(); dismiss();
((LiveActivity) mContext).openLuckGiftTip(); ((LiveActivity) mContext).openLuckGiftTip();
@ -556,10 +556,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
/** /**
* 跳转到我的钻石 * 跳转到我的钻石
*/ */
private void forwardMyCoin() { private void forwardMyCoin(int page) {
dismiss(); dismiss();
//我们的 //我们的
ARouter.getInstance().build(PATH_COIN).withInt("p", 1).navigation(); ARouter.getInstance().build(PATH_COIN).withInt("p", page).navigation();
} }
/** /**
@ -709,6 +709,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
/** /**
* 收到礼物下载完成的通知 * 收到礼物下载完成的通知
*
* @param status * @param status
*/ */
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)

View File

@ -21,6 +21,7 @@ import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechError; import com.iflytek.cloud.SpeechError;
import com.iflytek.cloud.SpeechRecognizer; import com.iflytek.cloud.SpeechRecognizer;
import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.utils.WordsTypeUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
@ -130,6 +131,7 @@ public class VoiceDialog extends AbsDialogFragment {
* 上划取消 * 上划取消
*/ */
public void withdraw() { public void withdraw() {
mIat.stopListening();
if (!isDetached()) { if (!isDetached()) {
voiceFluctuations.setVisibility(View.GONE); voiceFluctuations.setVisibility(View.GONE);
gifView.setVisibility(View.GONE); gifView.setVisibility(View.GONE);
@ -143,6 +145,7 @@ public class VoiceDialog extends AbsDialogFragment {
* 上划取消 * 上划取消
*/ */
public void notWithdraw() { public void notWithdraw() {
startRecognize();
if (!isDetached()) { if (!isDetached()) {
if (TextUtils.isEmpty(sendMessage())) { if (TextUtils.isEmpty(sendMessage())) {
if (gifView.getVisibility() != View.VISIBLE) if (gifView.getVisibility() != View.VISIBLE)
@ -284,7 +287,8 @@ public class VoiceDialog extends AbsDialogFragment {
endOfSpeech(); endOfSpeech();
} }
builder.append(text); builder.append(text);
voiceChat.setText(builder);
voiceChat.setText(WordsTypeUtil.changeTraditional(builder.toString()));
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -12,6 +12,7 @@ import com.yunbao.common.http.JsonBean;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.VersionUtil;
import java.io.File; import java.io.File;
@ -40,6 +41,7 @@ public class LiveHttpUtil {
.params("stream", stream) .params("stream", stream)
.params("type", type) .params("type", type)
.params("p", p) .params("p", p)
.params("version", "" + VersionUtil.getVersion())
.execute(callback); .execute(callback);
} }

View File

@ -525,6 +525,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
//1. 设置自适应合流布局模式 //1. 设置自适应合流布局模式
config.setLayoutMode(RCRTCMixConfig.MixLayoutMode.ADAPTIVE); config.setLayoutMode(RCRTCMixConfig.MixLayoutMode.ADAPTIVE);
//2. 合流画布设置 //2. 合流画布设置
if(rcrtcLiveInfo!=null) {
rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() { rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() {
@Override @Override
public void onSuccess() { public void onSuccess() {
@ -537,6 +538,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
}else{
Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空" );
}
} }
} }

View File

@ -1127,7 +1127,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
htmlUrl.append(CommonAppConfig.HOST) htmlUrl.append(CommonAppConfig.HOST)
.append("/") .append("/")
.append(bean.getModel().getActivityUrl()) .append(bean.getModel().getActivityUrl())
.append("&nickname=") .append(bean.getModel().getActivityUrl().contains("?") ? "&nickname=" : "?nickname=")
.append(userInfo.getUserNicename()) .append(userInfo.getUserNicename())
.append("&token=") .append("&token=")
.append(userInfo.getToken()) .append(userInfo.getToken())
@ -1186,7 +1186,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
htmlUrl.append(CommonAppConfig.HOST) htmlUrl.append(CommonAppConfig.HOST)
.append("/") .append("/")
.append(bean.getModel().getActivityUrl()) .append(bean.getModel().getActivityUrl())
.append("&nickname=") .append(bean.getModel().getActivityUrl().contains("?") ? "&nickname=" : "?nickname=")
.append(userInfo.getUserNicename()) .append(userInfo.getUserNicename())
.append("&token=") .append("&token=")
.append(userInfo.getToken()) .append(userInfo.getToken())
@ -1405,7 +1405,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
wishListLayout.setVisibility(View.GONE); wishListLayout.setVisibility(View.GONE);
} }
((Activity) mContext).runOnUiThread(() -> { ((Activity) mContext).runOnUiThread(() -> {
wishListFlipper = (ViewFlipper) findViewById(R.id.wish_list); wishListFlipper = (ViewFlipper) findViewById(R.id.wish_list_vf);
for (int i = 0; i < wishlist.size(); i++) { for (int i = 0; i < wishlist.size(); i++) {
View wish = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); View wish = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null);
wish.setTag(wishlist.get(i).getId()); wish.setTag(wishlist.get(i).getId());

View File

@ -10,6 +10,7 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.HttpClient;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;

View File

@ -172,13 +172,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private boolean mCoinNotEnough;//余额不足 private boolean mCoinNotEnough;//余额不足
private boolean mFirstConnectSocket;//是否是第一次连接成功socket private boolean mFirstConnectSocket;//是否是第一次连接成功socket
private int liveBg = -1; private int liveBg = -1;
private int leave=-1;//是否正在休息 1为休息 0为直播
private LiveImDeletUtil liveImDeletUtil; private LiveImDeletUtil liveImDeletUtil;
private List<String> greetings = new ArrayList<>(); private List<String> greetings = new ArrayList<>();
private Handler liveHandler = new Handler(); private Handler liveHandler = new Handler();
//公共參數 //公共參數
private OpenParametersModel openParametersModel = null; private OpenParametersModel openParametersModel = null;
//星级活动地址 //星级活动地址
private String activityUrl = "";
//标记是调用正常退出还是手动切后台 //标记是调用正常退出还是手动切后台
private boolean isQuitF = false; private boolean isQuitF = false;
@ -1069,7 +1069,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mChatLevel = obj.getIntValue("speak_limit"); mChatLevel = obj.getIntValue("speak_limit");
mDanMuLevel = obj.getIntValue("barrage_limit"); mDanMuLevel = obj.getIntValue("barrage_limit");
liveBg = obj.getIntValue("live_bg"); liveBg = obj.getIntValue("live_bg");
leave = obj.getInteger("isleave");
if (obj.containsKey("greetings")) { if (obj.containsKey("greetings")) {
greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class); greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class);
} }
@ -1197,10 +1197,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.startRequestTimeCharge(); mLiveRoomViewHolder.startRequestTimeCharge();
} }
} }
if (leave==1) {
if (TextUtils.equals(obj.getString("isleave"), "1")) { if (LivePlayRyViewHolder.leave != null) {
if (LivePlayKsyViewHolder.leave != null) { LivePlayRyViewHolder.leave.setVisibility(View.VISIBLE);
LivePlayKsyViewHolder.leave.setVisibility(View.VISIBLE);
} }
} }
//判断是否有连麦要显示连麦窗口 //判断是否有连麦要显示连麦窗口
@ -1596,7 +1595,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder mLiveRoomViewHolder
.showStart( .showStart(
new StarChallengeStatusModel(activityUrl) new StarChallengeStatusModel(msgModel.getActivityUrl())
.setTaskNum(msgModel.getTaskNum()) .setTaskNum(msgModel.getTaskNum())
.setTaskName1(msgModel.getTaskName1()) .setTaskName1(msgModel.getTaskName1())
.setTaskName2(msgModel.getTaskName2()) .setTaskName2(msgModel.getTaskName2())

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="360dp" android:height="306dp"> <item android:width="360dp" >
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="#E6000000" /> <solid android:color="#E6000000" />
<gradient android:type="linear" android:useLevel="true" android:startColor="#ff181a34" android:endColor="#ff080a1b" android:angle="0" /> <gradient android:type="linear" android:useLevel="true" android:startColor="#ff181a34" android:endColor="#ff080a1b" android:angle="0" />

View File

@ -2,24 +2,25 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="350dp"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:orientation="horizontal" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_height="wrap_content"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/live_gift_download_all" android:id="@+id/live_gift_download_all"
android:layout_width="155dp" android:layout_width="155dp"
android:layout_height="32dp" android:layout_height="32dp"
android:layout_marginStart="12dp"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_marginStart="12dp"
android:background="@drawable/bg_live_gift_download_all" android:background="@drawable/bg_live_gift_download_all"
android:gravity="center" android:gravity="center"
android:visibility="invisible" android:orientation="horizontal"
android:orientation="horizontal"> android:visibility="invisible">
<ImageView <ImageView
android:layout_width="19dp" android:layout_width="19dp"
@ -31,16 +32,17 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:visibility="visible"
android:text="一鍵下載所有禮物動畫" android:text="一鍵下載所有禮物動畫"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="visible" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_luck_gift_tip" android:id="@+id/btn_luck_gift_tip"
android:layout_width="105.27dp" android:layout_width="105.27dp"
android:layout_alignParentEnd="true"
android:layout_height="32dp" android:layout_height="32dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:background="@drawable/bg_live_vip_blue" android:background="@drawable/bg_live_vip_blue"
android:gravity="center" android:gravity="center"
@ -53,56 +55,63 @@
android:layout_marginEnd="7dp" android:layout_marginEnd="7dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/icon_vip_gold" /> android:src="@mipmap/icon_vip_gold" />
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start" android:gravity="start"
android:layout_height="wrap_content"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/vipGoldTitle" android:id="@+id/vipGoldTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:textColor="#FFFFFF"
android:text="@string/live_gift_buy_gold" android:text="@string/live_gift_buy_gold"
android:textColor="#FFFFFF"
android:textSize="11.52sp" /> android:textSize="11.52sp" />
<TextView <TextView
android:id="@+id/vipGoldDesc" android:id="@+id/vipGoldDesc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:textColor="#999999"
android:text="@string/live_gift_buy_gold_desc" android:text="@string/live_gift_buy_gold_desc"
android:textColor="#999999"
android:textSize="7.68sp" /> android:textSize="7.68sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_live_gift"> android:background="@drawable/bg_live_gift">
<LinearLayout <LinearLayout
android:id="@+id/gift_tab_layout" android:id="@+id/gift_tab_layout"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center" android:gravity="center"
android:layout_height="50dp"> android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/items" android:id="@+id/items"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="5dp" /> android:layout_marginEnd="5dp"
android:layout_weight="1" />
<ImageView <ImageView
android:layout_marginEnd="15dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:src="@drawable/bg_live_gift_package_line" android:layout_height="23dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_height="23dp"/> android:layout_marginEnd="15dp"
android:src="@drawable/bg_live_gift_package_line" />
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
android:id="@+id/btn_gift_package" android:id="@+id/btn_gift_package"
android:layout_width="36dp" android:layout_width="36dp"
@ -121,62 +130,68 @@
android:id="@+id/group" android:id="@+id/group"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="300dp" android:layout_height="300dp"
android:gravity="bottom"
android:layout_below="@id/gift_tab_layout" android:layout_below="@id/gift_tab_layout"
android:gravity="bottom"
android:orientation="vertical"> android:orientation="vertical">
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager" android:id="@+id/viewPager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginBottom="8dp"/> android:layout_weight="1" />
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/vpWrapList" android:id="@+id/vpWrapList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="3dp"
android:layout_weight="1"
android:visibility="gone" /> android:visibility="gone" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="66dp"
android:layout_weight="0">
<RadioGroup <RadioGroup
android:id="@+id/radio_group" android:id="@+id/radio_group"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="6dp" android:layout_height="6dp"
android:layout_marginEnd="30dp"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginTop="3.5dp"
android:layout_marginEnd="20dp"
android:gravity="end"
android:orientation="horizontal" /> android:orientation="horizontal" />
<RadioGroup <RadioGroup
android:id="@+id/radio_group_wrap" android:id="@+id/radio_group_wrap"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="20dp"
android:layout_height="6dp" android:layout_height="6dp"
android:layout_gravity="center_horizontal" android:layout_gravity="end"
android:layout_marginTop="3.5dp"
android:gravity="end"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone" /> android:visibility="visible" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="66dp"
android:layout_weight="0"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<RelativeLayout <RelativeLayout
android:id="@+id/btn_send_group" android:id="@+id/btn_send_group"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp">
<TextView <TextView
android:id="@+id/btn_send" android:id="@+id/btn_send"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_alignParentBottom="true"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_live_gift_send_2" android:background="@drawable/bg_live_gift_send_2"
android:enabled="false" android:enabled="false"
android:gravity="center" android:gravity="center"
@ -188,7 +203,8 @@
android:id="@+id/btn_choose" android:id="@+id/btn_choose"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_centerVertical="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
android:layout_toLeftOf="@id/btn_send" android:layout_toLeftOf="@id/btn_send"
android:background="@drawable/bg_live_gift_choose" android:background="@drawable/bg_live_gift_choose"
android:gravity="center" android:gravity="center"
@ -202,31 +218,35 @@
android:id="@+id/arrow" android:id="@+id/arrow"
android:layout_width="13dp" android:layout_width="13dp"
android:layout_height="7dp" android:layout_height="7dp"
android:layout_centerVertical="true" android:layout_alignParentBottom="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:layout_marginBottom="22dp"
android:layout_toLeftOf="@id/btn_send" android:layout_toLeftOf="@id/btn_send"
android:src="@mipmap/icon_live_gift_2" android:src="@mipmap/icon_live_gift_2"
app:tint="@color/global" android:visibility="invisible"
android:visibility="invisible" /> app:tint="@color/global" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:layout_width="wrap_content"
android:gravity="bottom" android:layout_height="match_parent"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:layout_width="wrap_content" android:gravity="bottom"
android:layout_height="match_parent"> android:layout_marginStart="20dp"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
android:id="@+id/goldCoin" android:id="@+id/goldCoin"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/white" android:textColor="@color/white"
@ -253,16 +273,17 @@
app:dt_right_width="14dp" /> app:dt_right_width="14dp" />
</LinearLayout> </LinearLayout>
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
android:id="@+id/go_charge" android:id="@+id/go_charge"
android:layout_width="42dp" android:layout_width="42dp"
android:layout_height="22dp" android:layout_height="22dp"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:background="@drawable/bg_live_gift_buy"
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:gravity="center" android:gravity="center"
android:text="@string/charge" android:text="@string/charge"
android:background="@drawable/bg_live_gift_buy"
android:textColor="@color/yellow5" android:textColor="@color/yellow5"
android:textSize="12sp" android:textSize="12sp"
app:dt_left_height="20dp" app:dt_left_height="20dp"

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.yunbao.common.custom.MyFrameLayout2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="92dp"
app:mfl_ratio="1.1"
android:background="@drawable/bg_live_gift_items" android:background="@drawable/bg_live_gift_items"
> app:mfl_ratio="1">
<com.yunbao.common.custom.MyRadioButton <com.yunbao.common.custom.MyRadioButton
android:id="@+id/radioButton" android:id="@+id/radioButton"
@ -14,15 +12,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_live_gift_item" android:background="@drawable/bg_live_gift_item"
android:button="@null" android:button="@null"
android:checked="true" android:checked="true" />
/>
<com.yunbao.live.custom.GiftMarkView <com.yunbao.live.custom.GiftMarkView
android:id="@+id/mark" android:id="@+id/mark"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="1dp" android:layout_marginTop="1dp"
android:layout_marginTop="1dp"/> android:layout_marginRight="1dp" />
<RelativeLayout <RelativeLayout
android:layout_width="45dp" android:layout_width="45dp"
@ -34,20 +31,21 @@
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_centerVertical="true" android:layout_centerHorizontal="true"
android:layout_centerHorizontal="true"/> android:layout_centerVertical="true" />
<TextView android:id="@+id/expire" <TextView
android:id="@+id/expire"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:textColor="@color/color_white"
android:gravity="center"
android:background="#D996cff0"
android:visibility="gone"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:textSize="8sp"/> android:background="#D996cff0"
android:gravity="center"
android:textColor="@color/color_white"
android:textSize="8sp"
android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
@ -56,11 +54,12 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|center" android:layout_gravity="bottom|center"
android:gravity="center"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView android:id="@+id/pay_ico" <ImageView
android:id="@+id/pay_ico"
android:layout_width="10dp" android:layout_width="10dp"
android:layout_height="10dp" /> android:layout_height="10dp" />
@ -68,8 +67,8 @@
android:id="@+id/price" android:id="@+id/price"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/gray3"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:textColor="@color/gray3"
android:textSize="11sp" /> android:textSize="11sp" />
</LinearLayout> </LinearLayout>
@ -78,18 +77,17 @@
android:id="@+id/name" android:id="@+id/name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="23dp" android:layout_marginBottom="23dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp" />
android:layout_gravity="bottom"
/>
<TextView <TextView
android:visibility="gone"
android:layout_gravity="right"
android:id="@+id/tvRedpoint" android:id="@+id/tvRedpoint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="14dp" android:layout_height="14dp"
android:layout_gravity="right"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:background="@drawable/bg_red_point" android:background="@drawable/bg_red_point"
android:gravity="center" android:gravity="center"
@ -98,7 +96,8 @@
android:paddingLeft="3dp" android:paddingLeft="3dp"
android:paddingRight="3dp" android:paddingRight="3dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="gone" />
<LinearLayout <LinearLayout
android:id="@+id/gift_loading_layout" android:id="@+id/gift_loading_layout"
@ -117,4 +116,4 @@
</LinearLayout> </LinearLayout>
</com.yunbao.common.custom.MyFrameLayout2> </FrameLayout>

View File

@ -372,7 +372,7 @@
android:src="@mipmap/live_icon_wishlist" /> android:src="@mipmap/live_icon_wishlist" />
<ViewFlipper <ViewFlipper
android:id="@+id/wish_list" android:id="@+id/wish_list_vf"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"

View File

@ -41,7 +41,7 @@ import com.google.firebase.messaging.FirebaseMessaging;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.jakewharton.rxbinding3.view.RxView; import com.jakewharton.rxbinding3.view.RxView;
import com.lzf.easyfloat.interfaces.OnPermissionResult; import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.permission.PermissionUtils; import com.lzf.easyfloat.permission.PermissionUtils;
import com.tencent.imsdk.v2.V2TIMCallback; import com.tencent.imsdk.v2.V2TIMCallback;
import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMManager;
@ -88,8 +88,8 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.VersionUtil; import com.yunbao.common.utils.VersionUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.common.views.floatingview.APPEasyFloat;
import com.yunbao.common.views.weight.LiveFloatView; import com.yunbao.common.views.weight.LiveFloatView;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.http.LiveHttpUtil;
@ -628,9 +628,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
// }); // });
public void mainClick(View v) { public void mainClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (!canClick()) { if (!canClick()) {
return; return;
} }
@ -645,8 +643,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} else if (i == R.id.img_trophy) { } else if (i == R.id.img_trophy) {
MainListActivity.forward(mContext, 0); MainListActivity.forward(mContext, 0);
} }
}
});
} }
@ -948,6 +945,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
ToastUtil.show(R.string.main_click_next_exit); ToastUtil.show(R.string.main_click_next_exit);
return; return;
} }
APPEasyFloat.getInstance().dismiss(mContext);
//判断是否有直播悬浮窗有直接关闭
if (EasyFloat.isShow("LiveFloatView")) {
EasyFloat.dismiss("LiveFloatView", true);
}
super.onBackPressed(); super.onBackPressed();
} }
} }

View File

@ -23,10 +23,9 @@ import com.yunbao.common.custom.MyRadioButton;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.utils.CommonIconUtil; import com.yunbao.common.utils.CommonIconUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R; import com.yunbao.main.R;
import com.yunbao.main.bean.ListBean; import com.yunbao.main.bean.ListBean;
@ -69,7 +68,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
mItemClickListener = new View.OnClickListener() { mItemClickListener = new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
Object tag = v.getTag(); Object tag = v.getTag();
if (tag != null && mOnItemClickListener != null) { if (tag != null && mOnItemClickListener != null) {
ListBean model = (ListBean) tag; ListBean model = (ListBean) tag;
@ -80,14 +79,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
} }
} }
});
} }
}; };
mFollowClickListener1 = new View.OnClickListener() { mFollowClickListener1 = new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
if (!canClick()) { if (!canClick()) {
return; return;
} }
@ -96,14 +95,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
final ListBean bean = (ListBean) tag; final ListBean bean = (ListBean) tag;
CommonHttpUtil.setAttention(bean.getUid(), null); CommonHttpUtil.setAttention(bean.getUid(), null);
} }
});
} }
}; };
mFollowClickListener2 = new View.OnClickListener() { mFollowClickListener2 = new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
if (!canClick()) { if (!canClick()) {
return; return;
} }
@ -113,7 +112,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
final ListBean bean = mList.get(position); final ListBean bean = mList.get(position);
CommonHttpUtil.setAttention(bean.getUid(), null); CommonHttpUtil.setAttention(bean.getUid(), null);
} }
});
} }
}; };

View File

@ -45,7 +45,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnClickListener = new View.OnClickListener() { mOnClickListener = new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
Object tag = v.getTag(); Object tag = v.getTag();
if (tag != null) { if (tag != null) {
int position = (int) tag; int position = (int) tag;
@ -54,7 +54,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnItemClickListener.onItemClick(bean, position); mOnItemClickListener.onItemClick(bean, position);
} }
} }
});
} }
}; };

View File

@ -452,7 +452,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
int i = v.getId(); int i = v.getId();
if (i == R.id.lt_name) { if (i == R.id.lt_name) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
@ -477,7 +477,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid(); String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
ZhuangBanActivity.forward(mContext, url, false); ZhuangBanActivity.forward(mContext, url, false);
} }
});

View File

@ -92,10 +92,17 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="5dp"
android:layout_weight="1" android:layout_weight="1"
android:gravity="right"> android:gravity="right">