修改举报崩溃问题,Pk的一些UI进行替换
This commit is contained in:
@@ -78,6 +78,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
comment_id = getIntent().getStringExtra("comment_id");
|
||||
mRecyclerView = findViewById(R.id.recyclerView);
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mAdapter = new LiveReportAdapter(mContext);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil(mContext, findViewById(android.R.id.content), this);
|
||||
LiveHttpUtil.getLiveReportList(new HttpCallback() {
|
||||
@@ -85,7 +86,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
List<LiveReportBean> list = JSON.parseArray(Arrays.toString(info), LiveReportBean.class);
|
||||
mAdapter = new LiveReportAdapter(mContext, list);
|
||||
mAdapter.setDataListFirst(list);
|
||||
mAdapter.setActionListener(LiveReportActivity.this);
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
@@ -24,6 +24,8 @@ import com.yunbao.live.bean.LiveReportBean;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imlib.NativeObject;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/12/15.
|
||||
* 增加功能:可以上传3张图片
|
||||
@@ -52,6 +54,74 @@ public class LiveReportAdapter extends RecyclerView.Adapter {
|
||||
private int photoIndex = 0;
|
||||
private File mFile1, mFile2, mFile3;
|
||||
|
||||
public LiveReportAdapter(Context context) {
|
||||
mContext = context;
|
||||
mInflater = LayoutInflater.from(mContext);
|
||||
mCheckedDrawable = ContextCompat.getDrawable(mContext, R.mipmap.icon_cash_radio_1);
|
||||
mUnCheckedDrawable = ContextCompat.getDrawable(mContext, R.mipmap.icon_cash_radio_0);
|
||||
imageUtilInit();
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Object tag = v.getTag();
|
||||
if (tag == null) {
|
||||
return;
|
||||
}
|
||||
int position = (int) tag;
|
||||
LiveReportBean bean = mList.get(position - 1);
|
||||
if (mCheckedPosition == position) {
|
||||
bean.setChecked(false);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = -1;
|
||||
mCurVideoReportBean = null;
|
||||
} else {
|
||||
if (mCheckedPosition >= 0) {
|
||||
mList.get(mCheckedPosition - 1).setChecked(false);
|
||||
notifyItemChanged(mCheckedPosition, Constants.PAYLOAD);
|
||||
}
|
||||
bean.setChecked(true);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = position;
|
||||
mCurVideoReportBean = bean;
|
||||
}
|
||||
}
|
||||
};
|
||||
mReportListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.btn_report){
|
||||
if (mFootVh != null) {
|
||||
mFootVh.submit();
|
||||
}
|
||||
}else if (v.getId() == R.id.photo1){
|
||||
photoIndex = 0;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
else if (v.getId() == R.id.photo2){
|
||||
photoIndex = 1;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
else if (v.getId() == R.id.photo3){
|
||||
photoIndex = 2;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void setDataListFirst(List<LiveReportBean> list) {
|
||||
mList = list;
|
||||
mCheckedPosition = -1;
|
||||
}
|
||||
|
||||
|
||||
public LiveReportAdapter(Context context, List<LiveReportBean> list) {
|
||||
mContext = context;
|
||||
mList = list;
|
||||
|
||||
@@ -172,7 +172,6 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
|
||||
LiveAudienceActivity.mProcessResultUtil.requestPermissions(permissions, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
HttpClient.getInstance().get("ylahuoquyonghulianmaizhuangtai", "ylahuoquyonghulianmaizhuangtai")
|
||||
.params("roomid", LiveActivity.mLiveUid)
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
|
||||
@@ -697,7 +697,7 @@ public class LiveSwLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V
|
||||
|
||||
@Override
|
||||
protected void onDRPkApply(UserBean u) {
|
||||
HttpClient.getInstance().get("Livepk.changeLive", "Livepk.changeLive").params("uid", CommonAppConfig.getInstance().getUid()).params("pkuid", u.getId()).params("type", "1").params("sign", "1").execute(new HttpCallback() {
|
||||
HttpClient.getInstance().get("ylaxiugaizhiboxinxi", "Livepk.changeLive").params("uid", CommonAppConfig.getInstance().getUid()).params("pkuid", u.getId()).params("type", "1").params("sign", "1").execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msgs, String[] info) {
|
||||
if (code == 0) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SocketSwLinkMicPkUtil {
|
||||
public void onSuccess(int code, String msgs, String[] info) {
|
||||
if (code == 0) {
|
||||
L.eSw("1111111111111111111111111111");
|
||||
HttpClient.getInstance().get("Livepk.setPK", "Livepk.setPK")
|
||||
HttpClient.getInstance().get("yolakaishipk", "Livepk.setPK")
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.params("pkuid", pkUid)
|
||||
.params("type", "1")
|
||||
|
||||
@@ -292,7 +292,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
swManager.joinChannelEx(CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, u.getId(), SWAuManager.getChannelName(u.getId()));
|
||||
}
|
||||
|
||||
HttpClient.getInstance().get("Livepk.changeLive", "Livepk.changeLive")
|
||||
HttpClient.getInstance().get("ylaxiugaizhiboxinxi", "Livepk.changeLive")
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.params("pkuid", u.getId())
|
||||
.params("type", "1")
|
||||
@@ -301,7 +301,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
@Override
|
||||
public void onSuccess(int code, String msgs, String[] info) {
|
||||
if (code == 0) {
|
||||
HttpClient.getInstance().get("Livepk.setPK", "Livepk.setPK")
|
||||
HttpClient.getInstance().get("ylakaishipk", "Livepk.setPK")
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.params("pkuid", u.getId())
|
||||
.params("type", "1")
|
||||
|
||||
Reference in New Issue
Block a user