修改用户端多人PK视频顺序
This commit is contained in:
parent
415ed2fc9b
commit
afed0c8833
@ -135,7 +135,13 @@ public class VersionUtil {
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
upd(context,configBean,downloadUrl);
|
||||
context.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
upd(context,configBean,downloadUrl);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
.build()
|
||||
|
@ -1191,6 +1191,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
leaveHandler.removeCallbacks(leaveRunnable);
|
||||
livePushRyViewHolder.timeTitle.setVisibility(View.GONE);
|
||||
livePushRyViewHolder.mPreView.removeView(detailsView1);
|
||||
livePushRyViewHolder.cameraPreview3.setVisibility(View.GONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -542,8 +542,18 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
params.addRule(RelativeLayout.ALIGN_TOP);
|
||||
mVideoView.requestLayout();
|
||||
}
|
||||
if (detailsView != null) {
|
||||
mVideoView.removeView(detailsView);
|
||||
detailsView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void removeDetailView(){
|
||||
if (detailsView != null) {
|
||||
mVideoView.removeView(detailsView);
|
||||
detailsView = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewGroup getSmallContainer() {
|
||||
|
@ -16,8 +16,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
@ -298,6 +296,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
mask.setVisibility(View.VISIBLE);
|
||||
mLivePlayViewHolder.setLiveBean(mLiveBean);
|
||||
mLivePlayViewHolder.removeDetailView();
|
||||
mLivePlayViewHolder.setCover(mLiveBean.getAvatar());
|
||||
mLivePlayViewHolder.play(mLiveBean.getPull());
|
||||
mLivePlayViewHolder.setOnMicCallback(new LiveRoomPlayViewHolder.OnMicCallback() {
|
||||
@ -526,7 +525,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.initPkRank(null);
|
||||
}
|
||||
mLivePlayViewHolder.setViewUP(4);
|
||||
upDataPkScore(pkInfo.getJSONArray("userlist"),pkInfo.getIntValue("drpk_time"));
|
||||
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
|
||||
}
|
||||
//守护相关
|
||||
mLiveGuardInfo = new LiveGuardInfo();
|
||||
@ -1745,6 +1744,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
*/
|
||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||
if (mLivePlayViewHolder != null) {
|
||||
String liveId = mLiveBean.getUid();
|
||||
JSONObject liveModel = null;
|
||||
//调整数据
|
||||
int index = 0;
|
||||
for (int i = 0; i < pkScores.size(); i++) {
|
||||
JSONObject score = pkScores.getJSONObject(i);
|
||||
if (TextUtils.equals(score.getString("id"), liveId)) {
|
||||
liveModel = score;
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
pkScores.remove(index);
|
||||
pkScores.add(0, liveModel);
|
||||
mLivePlayViewHolder.upDataPkScore(pkScores, time);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user