1:修改拍卖房和互娱房展示离线状态
2:修改在线列表为用户列表 3:修改扩列展示用户性别
This commit is contained in:
@@ -40,6 +40,7 @@ public class RoomAuction implements Serializable {
|
|||||||
private String nobility_image;//贵族图标
|
private String nobility_image;//贵族图标
|
||||||
private String nickname_color;//昵称颜色
|
private String nickname_color;//昵称颜色
|
||||||
private String mic_cycle;//麦圈
|
private String mic_cycle;//麦圈
|
||||||
|
private int is_online=1;//是否在线 : 1在线 2离线
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -97,4 +97,32 @@ public class MeHeadView extends ConstraintLayout {
|
|||||||
mIvSex.setVisibility(VISIBLE);
|
mIvSex.setVisibility(VISIBLE);
|
||||||
mIvSex.setImageResource(sex == 1 ? R.mipmap.nan : R.mipmap.nv);
|
mIvSex.setImageResource(sex == 1 ? R.mipmap.nan : R.mipmap.nv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置头像,性别,头像框,贵族
|
||||||
|
* @param sex
|
||||||
|
* @param headPicture
|
||||||
|
* @param framePicture
|
||||||
|
* @param nobilityImage
|
||||||
|
*/
|
||||||
|
public void setAll(int sex,String headPicture, String framePicture, String nobilityImage) {
|
||||||
|
if (!TextUtils.isEmpty(headPicture)) {
|
||||||
|
ImageUtils.loadHead(headPicture, mRiv);
|
||||||
|
}
|
||||||
|
if (TextUtils.isEmpty(framePicture)) {
|
||||||
|
mIvFrame.setVisibility(GONE);
|
||||||
|
} else {
|
||||||
|
mIvFrame.setVisibility(VISIBLE);
|
||||||
|
mIvFrame.setSource(framePicture, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mIvSex.setImageResource(sex == 1 ? R.mipmap.nan : R.mipmap.nv);
|
||||||
|
if (nobilityImage != null && !TextUtils.isEmpty(nobilityImage)) {
|
||||||
|
iv_frame_bg.setVisibility(VISIBLE);
|
||||||
|
ImageUtils.loadRoomItem(nobilityImage, iv_frame_bg);
|
||||||
|
} else {
|
||||||
|
iv_frame_bg.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,15 +22,7 @@
|
|||||||
app:layout_constraintWidth_percent="0.95"
|
app:layout_constraintWidth_percent="0.95"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_sex"
|
|
||||||
android:layout_width="@dimen/dp_16"
|
|
||||||
android:layout_height="@dimen/dp_16"
|
|
||||||
android:background="@mipmap/nan"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
android:id="@+id/iv_frame"
|
android:id="@+id/iv_frame"
|
||||||
@@ -65,6 +57,16 @@
|
|||||||
tools:src="@mipmap/me_sj"
|
tools:src="@mipmap/me_sj"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_sex"
|
||||||
|
android:layout_width="@dimen/dp_16"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:background="@mipmap/nan"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_master_bg"
|
android:id="@+id/iv_master_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -4449,6 +4449,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
roomPitBean.sex = messageEvent.text.list[j].sex.toString() + ""
|
roomPitBean.sex = messageEvent.text.list[j].sex.toString() + ""
|
||||||
roomPitBean.dress = messageEvent.text.list[j].dress
|
roomPitBean.dress = messageEvent.text.list[j].dress
|
||||||
roomPitBean.charm = messageEvent.text.list[j].charm
|
roomPitBean.charm = messageEvent.text.list[j].charm
|
||||||
|
roomPitBean.is_online=messageEvent.text.list[j].is_online
|
||||||
return roomPitBean
|
return roomPitBean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
pitBean.setSex(fromUserInfo.getSex() + "");
|
pitBean.setSex(fromUserInfo.getSex() + "");
|
||||||
pitBean.setCharm(fromUserInfo.getCharm());
|
pitBean.setCharm(fromUserInfo.getCharm());
|
||||||
pitBean.setDress(fromUserInfo.getDress());
|
pitBean.setDress(fromUserInfo.getDress());
|
||||||
|
pitBean.setIs_online(fromUserInfo.getIs_online());
|
||||||
mWheatViews.get(Integer.parseInt(pitNumber) - 1).setData(pitBean);
|
mWheatViews.get(Integer.parseInt(pitNumber) - 1).setData(pitBean);
|
||||||
if (userId == SpUtil.getUserId()) {
|
if (userId == SpUtil.getUserId()) {
|
||||||
myPitNumber = Integer.parseInt(pitNumber);
|
myPitNumber = Integer.parseInt(pitNumber);
|
||||||
@@ -909,6 +909,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
roomPitBean.setNickname(pitBean.getNickname());
|
roomPitBean.setNickname(pitBean.getNickname());
|
||||||
roomPitBean.setAvatar(pitBean.getAvatar());
|
roomPitBean.setAvatar(pitBean.getAvatar());
|
||||||
roomPitBean.setSex(pitBean.getSex());
|
roomPitBean.setSex(pitBean.getSex());
|
||||||
|
roomPitBean.setIs_online(pitBean.getIs_online());
|
||||||
friendshipWheatView.setData(roomPitBean);
|
friendshipWheatView.setData(roomPitBean);
|
||||||
if (pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
if (pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
myPitNumber = Integer.parseInt(pitBean.getPit_number());
|
myPitNumber = Integer.parseInt(pitBean.getPit_number());
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
roomPitBean1.setDress(auctionUserBean.getDress());
|
roomPitBean1.setDress(auctionUserBean.getDress());
|
||||||
roomPitBean1.setSex(auctionUserBean.getSex());
|
roomPitBean1.setSex(auctionUserBean.getSex());
|
||||||
roomPitBean1.setPit_number("888");
|
roomPitBean1.setPit_number("888");
|
||||||
|
roomPitBean1.setIs_online(auctionUserBean.getIs_online());
|
||||||
roomPitBean1.setIs_pm(1);
|
roomPitBean1.setIs_pm(1);
|
||||||
wheatView2.setData(roomPitBean1);
|
wheatView2.setData(roomPitBean1);
|
||||||
mBinding.tvPB.setText(StringUtil.toWan2(auctionUserBean.getCharm(), 1));
|
mBinding.tvPB.setText(StringUtil.toWan2(auctionUserBean.getCharm(), 1));
|
||||||
@@ -1268,6 +1269,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||||
|
pitBean.setIs_online(messageEvent.getText().getFromUserInfo().getIs_online());
|
||||||
return pitBean;
|
return pitBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
|
|||||||
@Override
|
@Override
|
||||||
protected void convert(BaseViewHolder helper, ExpandColumnBean item) {
|
protected void convert(BaseViewHolder helper, ExpandColumnBean item) {
|
||||||
helper.addOnClickListener(R.id.dy_head_image);
|
helper.addOnClickListener(R.id.dy_head_image);
|
||||||
|
ImageView iv_sex=helper.getView(R.id.iv_user_sex);
|
||||||
//先让单图,多图,音频的布局显示
|
//先让单图,多图,音频的布局显示
|
||||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||||
helper.setText(R.id.tv_agree,(item.getAgree()!=null?item.getAgree():"0")+"岁");
|
helper.setText(R.id.tv_agree,(item.getAgree()!=null?item.getAgree():"0")+"岁");
|
||||||
@@ -95,7 +95,7 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
|
|||||||
// ImageUtils.loadHeadCC(item.getAvatar(), (ImageView) helper.getView(R.id.dy_head_image));
|
// ImageUtils.loadHeadCC(item.getAvatar(), (ImageView) helper.getView(R.id.dy_head_image));
|
||||||
MeHeadView headView = helper.getView(R.id.dy_head_image);
|
MeHeadView headView = helper.getView(R.id.dy_head_image);
|
||||||
headView.setData(item.getAvatar(), "", item.getNobility_image());
|
headView.setData(item.getAvatar(), "", item.getNobility_image());
|
||||||
|
iv_sex.setImageResource(item.getSex().equals("1") ? com.xscm.moduleutil.R.mipmap.nan : com.xscm.moduleutil.R.mipmap.nv);
|
||||||
if (item.getHome_bgimages() != null && !item.getHome_bgimages().isEmpty()) {
|
if (item.getHome_bgimages() != null && !item.getHome_bgimages().isEmpty()) {
|
||||||
// String[] arrIv = item.getHome_bgimages().toArray(new String[item.getHome_bgimages().size()]);
|
// String[] arrIv = item.getHome_bgimages().toArray(new String[item.getHome_bgimages().size()]);
|
||||||
String[] arrIv = item.getHome_bgimages().split(",");
|
String[] arrIv = item.getHome_bgimages().split(",");
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
|||||||
|
|
||||||
// 只有当获取到有效数据时才更新总数显示
|
// 只有当获取到有效数据时才更新总数显示
|
||||||
if (onlineBean.getOn_pit() != null || onlineBean.getOff_pit() != null) {
|
if (onlineBean.getOn_pit() != null || onlineBean.getOff_pit() != null) {
|
||||||
mBinding.tvNum.setText("在线用户(" + total + ")人");
|
mBinding.tvNum.setText("用户列表(" + total + ")人");
|
||||||
if (getActivity() instanceof RoomActivity) {
|
if (getActivity() instanceof RoomActivity) {
|
||||||
((RoomActivity) getActivity()).setOnlineNumber(total);
|
((RoomActivity) getActivity()).setOnlineNumber(total);
|
||||||
}
|
}
|
||||||
@@ -313,7 +313,7 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding.tvNum.setText("在线用户(" + currentTotal + ")人");
|
mBinding.tvNum.setText("用户列表(" + currentTotal + ")人");
|
||||||
if (getActivity() instanceof RoomActivity) {
|
if (getActivity() instanceof RoomActivity) {
|
||||||
((RoomActivity) getActivity()).setOnlineNumber(currentTotal);
|
((RoomActivity) getActivity()).setOnlineNumber(currentTotal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="在线用户(0)" />
|
tools:text="用户列表(0)" />
|
||||||
|
|
||||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||||
android:id="@+id/srl"
|
android:id="@+id/srl"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
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="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
android:layout_marginBottom="@dimen/dp_12"
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -46,6 +47,14 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_user_sex"
|
||||||
|
android:layout_width="@dimen/dp_16"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:layout_marginEnd="@dimen/dp_3"
|
||||||
|
/>
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.ShineTextView
|
<com.xscm.moduleutil.widget.ShineTextView
|
||||||
android:id="@+id/dy_name_text"
|
android:id="@+id/dy_name_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user