1:添加在房间点击用户头像,展示有师傅的头像,并且添加点击事件
2:点击用户头像,进入用户主页的时候,展示师傅的头像
This commit is contained in:
@@ -23,6 +23,7 @@ public class MeHeadView extends ConstraintLayout {
|
||||
private ImageView mIvSex;
|
||||
private ImageView mIvOnline;
|
||||
private ImageView iv_frame_bg;
|
||||
private ImageView iv_master_bg;
|
||||
|
||||
public MeHeadView(Context context) {
|
||||
this(context, null, 0);
|
||||
@@ -43,7 +44,8 @@ public class MeHeadView extends ConstraintLayout {
|
||||
mIvFrame = findViewById(R.id.iv_frame);
|
||||
mIvSex = findViewById(R.id.iv_sex);
|
||||
mIvOnline = findViewById(R.id.iv_online);
|
||||
iv_frame_bg=findViewById(R.id.iv_frame_bg);
|
||||
iv_frame_bg = findViewById(R.id.iv_frame_bg);
|
||||
iv_master_bg = findViewById(R.id.iv_master_bg);
|
||||
mIvSex.setVisibility(GONE);
|
||||
}
|
||||
|
||||
@@ -59,21 +61,30 @@ public class MeHeadView extends ConstraintLayout {
|
||||
mIvFrame.setSource(framePicture, 1);
|
||||
}
|
||||
|
||||
if (nobilityImage!=null && !TextUtils.isEmpty(nobilityImage)){
|
||||
if (nobilityImage != null && !TextUtils.isEmpty(nobilityImage)) {
|
||||
iv_frame_bg.setVisibility(VISIBLE);
|
||||
ImageUtils.loadRoomItem(nobilityImage, iv_frame_bg);
|
||||
}else {
|
||||
} else {
|
||||
iv_frame_bg.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setMaster(String headPicture) {
|
||||
if (!TextUtils.isEmpty(headPicture)) {
|
||||
ImageUtils.loadHead(headPicture, mRiv);
|
||||
}
|
||||
|
||||
iv_master_bg.setVisibility(VISIBLE);
|
||||
iv_master_bg.setImageResource(R.mipmap.icon_master);
|
||||
}
|
||||
|
||||
public void setOnline(boolean isOnline) {
|
||||
mIvOnline.setVisibility(VISIBLE);
|
||||
mIvOnline.setImageResource(isOnline ? R.mipmap.me_online_icon : R.mipmap.me_icon_unchecked);
|
||||
}
|
||||
|
||||
public void setSex(int sex,String headPicture,String dress) {
|
||||
public void setSex(int sex, String headPicture, String dress) {
|
||||
if (!TextUtils.isEmpty(headPicture)) {
|
||||
ImageUtils.loadHead(headPicture, mRiv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user