修复bug
This commit is contained in:
@@ -1017,7 +1017,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveEndViewHolder.subscribeActivityLifeCycle();
|
||||
mLiveEndViewHolder.addToParent();
|
||||
mLiveEndViewHolder.showData(mLiveBean, mStream);
|
||||
mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")),datas.getString("level"),datas.getString("votestotal"),datas.getString("level_up"),datas.getString("next_level_exp"),datas.getString("starttime"),datas.getString("endtime"),datas.getString("hot_strategy"));
|
||||
mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")),datas.getString("level"),datas.getString("votestotal"),datas.getString("level_up"),datas.getString("next_level_exp"),datas.getString("starttime")+"000",datas.getString("endtime")+"000",datas.getString("hot_strategy"));
|
||||
if (banEvent != null) {
|
||||
mLiveEndViewHolder.showBanDownLive(banEvent);
|
||||
banEvent = null;
|
||||
|
||||
@@ -729,12 +729,11 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
mList.remove(bean.getHeart());
|
||||
notifyItemRemoved(bean.getHeart());
|
||||
notifyItemRangeChanged(bean.getHeart(), getItemCount());
|
||||
|
||||
if(bean.getHeart()<mList.size()){//防止数组越界
|
||||
mList.remove(bean.getHeart());
|
||||
notifyItemRemoved(bean.getHeart());
|
||||
notifyItemRangeChanged(bean.getHeart(), getItemCount());
|
||||
}
|
||||
}
|
||||
|
||||
public void scrollToBottom() {
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DateFormatUtil;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
@@ -426,8 +427,10 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
level_progress.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
level_progress.setMax(Integer.parseInt(level_up));
|
||||
level_progress.setProgress(Integer.parseInt(votestotal));
|
||||
if(level_up!=null&&votestotal!=null){
|
||||
level_progress.setMax(Integer.parseInt(level_up));
|
||||
level_progress.setProgress(Integer.parseInt(votestotal));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1009,23 +1009,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
firstFollowLookHandler.removeCallbacks(firstFollowLookRunnable);
|
||||
firstFollowLookHandler.postDelayed(firstFollowLookRunnable, 7000);
|
||||
notify_follow_layout.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
mDp500 = DpUtil.dp2px(-400);
|
||||
animatorFollowFirstLook(true);
|
||||
}
|
||||
|
||||
public void animatorFollowFirstLook(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_follow_first_look = ObjectAnimator.ofFloat(notify_follow_layout, "translationX", mDp500, 0);
|
||||
animator_follow_first_look.setDuration(800);
|
||||
animator_follow_first_look.setDuration(1000);
|
||||
} else {
|
||||
animator_follow_first_look = ObjectAnimator.ofFloat(notify_follow_layout, "translationX", 0, mDp500);
|
||||
animator_follow_first_look.setDuration(800);
|
||||
animator_follow_first_look.setDuration(1000);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
notify_follow_layout.setVisibility(View.GONE);
|
||||
}
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
}
|
||||
animator_follow_first_look.setInterpolator(new LinearInterpolator());
|
||||
animator_follow_first_look.start();
|
||||
@@ -1069,23 +1069,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
firstTaskDetailsHandler.removeCallbacks(firstTaskDetailsRunnable);
|
||||
firstTaskDetailsHandler.postDelayed(firstTaskDetailsRunnable, 7000);
|
||||
new_task_gift_notify.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
mDp500 = DpUtil.dp2px(-400);
|
||||
animatorTaskDetails(true);
|
||||
}
|
||||
|
||||
public void animatorTaskDetails(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_first_task_details = ObjectAnimator.ofFloat(new_task_gift_notify, "translationX", mDp500, 0);
|
||||
animator_first_task_details.setDuration(800);
|
||||
animator_first_task_details.setDuration(1000);
|
||||
} else {
|
||||
animator_first_task_details = ObjectAnimator.ofFloat(new_task_gift_notify, "translationX", 0, mDp500);
|
||||
animator_first_task_details.setDuration(800);
|
||||
animator_first_task_details.setDuration(1000);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new_task_gift_notify.setVisibility(View.GONE);
|
||||
}
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
}
|
||||
animator_first_task_details.setInterpolator(new LinearInterpolator());
|
||||
animator_first_task_details.start();
|
||||
@@ -1129,23 +1129,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
firstTaskDetailsHandler1.removeCallbacks(firstTaskDetailsRunnable1);
|
||||
firstTaskDetailsHandler1.postDelayed(firstTaskDetailsRunnable1, 7000);
|
||||
new_task_gift_notify1.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
mDp500 = DpUtil.dp2px(-400);
|
||||
animatorTaskDetails1(true);
|
||||
}
|
||||
|
||||
public void animatorTaskDetails1(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_first_task_details1 = ObjectAnimator.ofFloat(new_task_gift_notify1, "translationX", mDp500, 0);
|
||||
animator_first_task_details1.setDuration(800);
|
||||
animator_first_task_details1.setDuration(1000);
|
||||
} else {
|
||||
animator_first_task_details1 = ObjectAnimator.ofFloat(new_task_gift_notify1, "translationX", 0, mDp500);
|
||||
animator_first_task_details1.setDuration(800);
|
||||
animator_first_task_details1.setDuration(1000);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new_task_gift_notify1.setVisibility(View.GONE);
|
||||
}
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
}
|
||||
animator_first_task_details1.setInterpolator(new LinearInterpolator());
|
||||
animator_first_task_details1.start();
|
||||
@@ -1192,23 +1192,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
sendGiftTaskHandler.removeCallbacks(sendGiftTaskRunnable);
|
||||
sendGiftTaskHandler.postDelayed(sendGiftTaskRunnable, 10000);
|
||||
new_task_send_gift_notify.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
mDp500 = DpUtil.dp2px(-400);
|
||||
animatorSendGiftTask(true);
|
||||
}
|
||||
|
||||
public void animatorSendGiftTask(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_send_gift_task = ObjectAnimator.ofFloat(new_task_send_gift_notify, "translationX", mDp500, 0);
|
||||
animator_send_gift_task.setDuration(800);
|
||||
animator_send_gift_task.setDuration(1000);
|
||||
} else {
|
||||
animator_send_gift_task = ObjectAnimator.ofFloat(new_task_send_gift_notify, "translationX", 0, mDp500);
|
||||
animator_send_gift_task.setDuration(800);
|
||||
animator_send_gift_task.setDuration(1000);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new_task_send_gift_notify.setVisibility(View.GONE);
|
||||
}
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
}
|
||||
animator_send_gift_task.setInterpolator(new LinearInterpolator());
|
||||
animator_send_gift_task.start();
|
||||
@@ -1218,7 +1218,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void showH5Dialog() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/h5/activity/pdlNewUes/index.html?1=1");
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/h5/activity/pdlNewUes/index.html?uid="+CommonAppConfig.getInstance().getUid()+"&token="+CommonAppConfig.getInstance().getToken());
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
@@ -2283,20 +2283,44 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
initPrankAdapter();
|
||||
|
||||
notify_follow_layout = findViewById(R.id.notify_follow_layout);
|
||||
notify_follow_layout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
L.e("其他區域");
|
||||
}
|
||||
});
|
||||
notify_follow_coin = findViewById(R.id.notify_follow_coin);
|
||||
notify_follow_name = findViewById(R.id.notify_follow_name);
|
||||
follow_first_look = findViewById(R.id.follow_first_look);
|
||||
close_first_look_follow = findViewById(R.id.close_first_look_follow);
|
||||
|
||||
new_task_gift_notify = findViewById(R.id.new_task_gift_notify);
|
||||
new_task_gift_notify.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
L.e("其他區域");
|
||||
}
|
||||
});
|
||||
new_task_gift_details = findViewById(R.id.new_task_gift_details);
|
||||
close_task_receive_close = findViewById(R.id.close_task_receive_close);
|
||||
|
||||
new_task_gift_notify1 = findViewById(R.id.new_task_gift_notify1);
|
||||
new_task_gift_notify1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
L.e("其他區域");
|
||||
}
|
||||
});
|
||||
new_task_gift_details1 = findViewById(R.id.new_task_gift_details1);
|
||||
close_task_receive_close1 = findViewById(R.id.close_task_receive_close1);
|
||||
|
||||
new_task_send_gift_notify = findViewById(R.id.new_task_send_gift_notify);
|
||||
new_task_send_gift_notify.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
L.e("其他區域");
|
||||
}
|
||||
});
|
||||
new_task_send_gift_details = findViewById(R.id.new_task_send_gift_details);
|
||||
close_task_send_gift_close = findViewById(R.id.close_task_send_gift_close);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.live.views;
|
||||
|
||||
import static com.yunbao.live.activity.LiveActivity.isSw;
|
||||
import static com.yunbao.live.activity.LiveActivity.mLiveUid;
|
||||
import static com.yunbao.live.activity.LiveActivity.mStream;
|
||||
import static com.yunbao.live.activity.LiveSwAnchorActivity.PKing;
|
||||
import static com.yunbao.live.activity.LiveSwAnchorActivity.pk_nub;
|
||||
import static com.yunbao.live.event.LiveAudienceEvent.LiveAudienceType.START_MESSAGE;
|
||||
@@ -52,6 +53,7 @@ import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveSwAnchorActivity;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.WishlistModel;
|
||||
import com.yunbao.live.dialog.LiveDataInfoDialog;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTaskDialog;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
@@ -244,6 +246,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
new XPopup.Builder(mContext).asCustom(new LiveAnchorMessageCustomPopup(mContext, mLiveUid)).show();
|
||||
}
|
||||
});
|
||||
findViewById(R.id.live_time).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new LiveDataInfoDialog(mContext,mLiveUid, mStream).showDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Map<String, String> yaoqing = new HashMap<>();
|
||||
|
||||
@@ -906,6 +906,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
//初始化整蠱列表
|
||||
mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2);
|
||||
mLiveRoomViewHolder.setComAll(data.getEnterRoomInfo().getIsComAll().equals("1"));
|
||||
L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry());
|
||||
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
|
||||
L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention());
|
||||
//检测是否是首次观看该直播间
|
||||
if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")&&data.getEnterRoomInfo().getIsattention().equals("0")){
|
||||
mLiveRoomViewHolder.firstLookLiveNotify();
|
||||
|
||||
@@ -3265,7 +3265,6 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
android:layout_toEndOf="@+id/notify_gift_receive_icon"
|
||||
android:ellipsize="marquee"
|
||||
android:scrollHorizontally="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:id="@+id/live_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="23dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginTop="88dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
Reference in New Issue
Block a user