修改举报崩溃问题,Pk的一些UI进行替换
This commit is contained in:
parent
3f03230cd3
commit
50937bdd42
@ -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")
|
||||
|
@ -351,7 +351,7 @@ public class MainHttpUtil {
|
||||
public static void getSettingList(HttpCallback callback) {
|
||||
HttpClient.getInstance().get("ylahuoqugexingshezhiliebiao", MainHttpConsts.GET_SETTING_LIST)
|
||||
.params("version", VersionUtil.getVersion())
|
||||
.params("package_name","panduo")
|
||||
.params("package_name","yola")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
//展示普通布局,隐藏周星榜布局
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.VISIBLE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||
itemView.findViewById(R.id.live_default_gone).setVisibility(View.GONE);
|
||||
mCover = itemView.findViewById(R.id.cover);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
dragon_money = itemView.findViewById(R.id.dragon_money);
|
||||
@ -98,13 +99,9 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
mName.setText(bean.getUserNiceName());
|
||||
if (TextUtils.isEmpty(bean.getTitle())) {
|
||||
if (mTitle.getVisibility() == View.VISIBLE) {
|
||||
mTitle.setVisibility(View.GONE);
|
||||
}
|
||||
mTitle.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (mTitle.getVisibility() != View.VISIBLE) {
|
||||
mTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mTitle.setVisibility(View.VISIBLE);
|
||||
mTitle.setText(bean.getTitle());
|
||||
}
|
||||
mNum.setText(formatBigNum.formatBigNum(bean.getHot_num()));
|
||||
|
@ -51,6 +51,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -193,8 +194,13 @@
|
||||
android:id="@+id/live_info_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="cover,bgs,live_type,views,tv_live_ico,tv_live_state,type,name,num"/>
|
||||
app:constraint_referenced_ids="cover,bgs,views,tv_live_state,name,num"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/live_default_gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="type,dr_pk_ico,pk_ico,pk_avatar"/>
|
||||
<!-- 这里从下面开始布局 这里是周星榜的-->
|
||||
<ViewFlipper
|
||||
android:id="@+id/viewflipper_banner"
|
||||
|
Loading…
Reference in New Issue
Block a user