fix bugs.
This commit is contained in:
@@ -120,17 +120,17 @@ public class UserInfo extends BaseEvent implements Serializable {
|
|||||||
|
|
||||||
private long createtime;
|
private long createtime;
|
||||||
|
|
||||||
public String name = "";
|
public String name = "-1";
|
||||||
public String level = "";
|
public String level = "-1";
|
||||||
public String exp = "";
|
public String exp = "-1";
|
||||||
public String pendant = "";
|
public String pendant = "-1";
|
||||||
public String direction;
|
public String direction = "-1";
|
||||||
public UserInfo1 user_info1;
|
public UserInfo1 user_info1;
|
||||||
public UserInfo2 user_info2;
|
public UserInfo2 user_info2;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemType() {
|
public int getItemType() {
|
||||||
if (!name.isEmpty()) {
|
if (name != null && !name.isEmpty()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
|||||||
BaseMvpFragment<MentorShipPresenter, FragmentMentorShipBinding>(), MentorShipContacts.View,
|
BaseMvpFragment<MentorShipPresenter, FragmentMentorShipBinding>(), MentorShipContacts.View,
|
||||||
View.OnClickListener {
|
View.OnClickListener {
|
||||||
|
|
||||||
|
// 无参构造函数
|
||||||
|
constructor() : this(null)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
fun newInstance(roomInfoResp: RoomInfoResp): RoomMentorShipFragment {
|
fun newInstance(roomInfoResp: RoomInfoResp): RoomMentorShipFragment {
|
||||||
|
|||||||
@@ -102,13 +102,13 @@ class HeartCpActivity : BaseMvpActivity<HeartCpPresenter, ActivityHeartCpBinding
|
|||||||
mHeartData = heartCpBean
|
mHeartData = heartCpBean
|
||||||
|
|
||||||
if (userId == heartCpBean.user_id1) {
|
if (userId == heartCpBean.user_id1) {
|
||||||
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadLeft)
|
ImageUtils.loadHeadCC(heartCpBean.user_info1.avatar, mBinding.ivHeadLeft)
|
||||||
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadRight)
|
ImageUtils.loadHeadCC(heartCpBean.user_info2.avatar, mBinding.ivHeadRight)
|
||||||
leftUserId = heartCpBean.user_id1
|
leftUserId = heartCpBean.user_id1
|
||||||
rightUserId = heartCpBean.user_id2
|
rightUserId = heartCpBean.user_id2
|
||||||
} else {
|
} else {
|
||||||
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadLeft)
|
ImageUtils.loadHeadCC(heartCpBean.user_info2.avatar, mBinding.ivHeadLeft)
|
||||||
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadRight)
|
ImageUtils.loadHeadCC(heartCpBean.user_info1.avatar, mBinding.ivHeadRight)
|
||||||
leftUserId = heartCpBean.user_id2
|
leftUserId = heartCpBean.user_id2
|
||||||
rightUserId = heartCpBean.user_id1
|
rightUserId = heartCpBean.user_id1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
|||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ActivityUtils;
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.google.android.flexbox.FlexboxLayout;
|
import com.google.android.flexbox.FlexboxLayout;
|
||||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||||
@@ -170,15 +171,15 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
mBinding.headerInfo.imBeautiful.setVisibility(View.GONE);
|
mBinding.headerInfo.imBeautiful.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(userInfo.getMaster()!=null){
|
if (userInfo.getMaster() != null) {
|
||||||
mBinding.headerInfo.ivRightAvatar.setVisibility(VISIBLE);
|
mBinding.headerInfo.ivRightAvatar.setVisibility(VISIBLE);
|
||||||
mBinding.headerInfo.ivRightAvatar.setMaster(userInfo.getMaster().getAvatar());
|
mBinding.headerInfo.ivRightAvatar.setMaster(userInfo.getMaster().getAvatar());
|
||||||
}else {
|
} else {
|
||||||
mBinding.headerInfo.ivRightAvatar.setVisibility(GONE);
|
mBinding.headerInfo.ivRightAvatar.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!userInfo.getIcon().isEmpty()){
|
if (!userInfo.getIcon().isEmpty()) {
|
||||||
mBinding.headerInfo.flexEntry.setVisibility(VISIBLE);
|
mBinding.headerInfo.flexEntry.setVisibility(VISIBLE);
|
||||||
for (String url : userInfo.getIcon()) {
|
for (String url : userInfo.getIcon()) {
|
||||||
if (url.contains("http")) {
|
if (url.contains("http")) {
|
||||||
@@ -187,16 +188,16 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||||
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||||
);
|
);
|
||||||
params.setMargins(0, 0,Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10), 0); // 右边距
|
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10), 0); // 右边距
|
||||||
imageView1.setLayoutParams(params);
|
imageView1.setLayoutParams(params);
|
||||||
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||||
|
|
||||||
// 使用 Glide 加载图片
|
// 使用 Glide 加载图片
|
||||||
ImageUtils.loadHeadCC(url, imageView1,params);
|
ImageUtils.loadHeadCC(url, imageView1, params);
|
||||||
mBinding.headerInfo.flexEntry.addView(imageView1);
|
mBinding.headerInfo.flexEntry.addView(imageView1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
mBinding.headerInfo.flexEntry.setVisibility(GONE);
|
mBinding.headerInfo.flexEntry.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +218,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
);
|
);
|
||||||
|
|
||||||
params.setMargins(0, 15, 15, 0);
|
params.setMargins(0, 15, 15, 0);
|
||||||
textView.setLayoutParams( params);
|
textView.setLayoutParams(params);
|
||||||
mBinding.headerInfo.flexText.addView(textView);
|
mBinding.headerInfo.flexText.addView(textView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -239,6 +240,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
|
|
||||||
mBinding.headerInfo.imGiftW.setOnClickListener(this::onClick);
|
mBinding.headerInfo.imGiftW.setOnClickListener(this::onClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showCp() {
|
private void showCp() {
|
||||||
if (userInfo.getCp_info() != null) {
|
if (userInfo.getCp_info() != null) {
|
||||||
mBinding.headerInfo.llCp.setVisibility(VISIBLE);
|
mBinding.headerInfo.llCp.setVisibility(VISIBLE);
|
||||||
@@ -248,7 +250,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent intent = new Intent(ActivityUtils.getTopActivity(), HeartCpActivity.class);
|
Intent intent = new Intent(ActivityUtils.getTopActivity(), HeartCpActivity.class);
|
||||||
intent.putExtra("userId",userInfo.getUser_id());
|
intent.putExtra("userId", userInfo.getUser_id());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -275,59 +277,64 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
||||||
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
||||||
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
||||||
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
try {
|
||||||
case 0:
|
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
case 0:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.bottomToTop = mBinding.headerInfo.topGuideline.getId();
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
params.bottomToTop = mBinding.headerInfo.topGuideline.getId();
|
||||||
break;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
case 1:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 1:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 2:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 2:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 3:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 3:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 4:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
case 4:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToBottom = mBinding.headerInfo.bottomGuideline.getId();
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.topToBottom = mBinding.headerInfo.bottomGuideline.getId();
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 5:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 5:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 6:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 6:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 7:
|
break;
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 7:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.headerInfo.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
LogUtils.e("cp_info.direction is null" + e.toString());
|
||||||
}
|
}
|
||||||
mBinding.headerInfo.llCpAnimAvatar.setLayoutParams(params);
|
mBinding.headerInfo.llCpAnimAvatar.setLayoutParams(params);
|
||||||
}else {
|
} else {
|
||||||
mBinding.headerInfo.llCp.setVisibility(GONE);
|
mBinding.headerInfo.llCp.setVisibility(GONE);
|
||||||
mBinding.headerInfo.rlCpAnim.setVisibility(GONE);
|
mBinding.headerInfo.rlCpAnim.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshView() {
|
private void refreshView() {
|
||||||
if (SpUtil.getUserId() == userInfo.getUser_id()) {
|
if (SpUtil.getUserId() == userInfo.getUser_id()) {
|
||||||
mBinding.headerInfo.tvGsSx.setVisibility(View.GONE);
|
mBinding.headerInfo.tvGsSx.setVisibility(View.GONE);
|
||||||
@@ -372,12 +379,12 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
|
|
||||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", userInfo.getRoom_id()).navigation();
|
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", userInfo.getRoom_id()).navigation();
|
||||||
}
|
}
|
||||||
}else if (view.getId() == R.id.im_gift_w) {
|
} else if (view.getId() == R.id.im_gift_w) {
|
||||||
Intent intent=new Intent(getContext(), GiftWallActivity.class);
|
Intent intent = new Intent(getContext(), GiftWallActivity.class);
|
||||||
intent.putExtra("userId",userInfo.getUser_id());
|
intent.putExtra("userId", userInfo.getUser_id());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}else if (view.getId()==R.id.iv_right_avatar){
|
} else if (view.getId() == R.id.iv_right_avatar) {
|
||||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId",userInfo.getMaster().getUser_id()).navigation();
|
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getMaster().getUser_id()).navigation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,7 +417,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
return CirleListFragment.newInstance(userId);
|
return CirleListFragment.newInstance(userId);
|
||||||
} else if ("2".equals(model.getMyBagType())) {
|
} else if ("2".equals(model.getMyBagType())) {
|
||||||
// return UserGiftWallFragment.newInstance(userId);
|
// return UserGiftWallFragment.newInstance(userId);
|
||||||
return BosomFriendFragment.newInstance(userId,1);
|
return BosomFriendFragment.newInstance(userId, 1);
|
||||||
} else {
|
} else {
|
||||||
return MyAlbumFragment.newInstance(userId);
|
return MyAlbumFragment.newInstance(userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -599,52 +599,56 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
||||||
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
||||||
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
||||||
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
try {
|
||||||
case 0:
|
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
case 0:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.bottomToTop = mBinding.topGuideline.getId();
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
params.bottomToTop = mBinding.topGuideline.getId();
|
||||||
break;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
case 1:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 1:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 2:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 2:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 3:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 3:
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 4:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
case 4:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToBottom = mBinding.bottomGuideline.getId();
|
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.topToBottom = mBinding.bottomGuideline.getId();
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 5:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 5:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 6:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 6:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
case 7:
|
break;
|
||||||
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
case 7:
|
||||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL);
|
||||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
break;
|
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}catch (NullPointerException e){
|
||||||
|
LogUtils.e("挂件位置异常"+e.toString());
|
||||||
}
|
}
|
||||||
mBinding.llCpAnimAvatar.setLayoutParams(params);
|
mBinding.llCpAnimAvatar.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.content.res.TypedArray
|
import android.content.res.TypedArray
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.xscm.modulemain.R
|
import com.xscm.modulemain.R
|
||||||
@@ -67,6 +68,7 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
mCharmView.setBg(0)
|
mCharmView.setBg(0)
|
||||||
when (bean.pit_number) {
|
when (bean.pit_number) {
|
||||||
"9" -> {
|
"9" -> {
|
||||||
|
iv_tag_type?.visibility = View.VISIBLE
|
||||||
if (bean.user_id != "0") {
|
if (bean.user_id != "0") {
|
||||||
mCharmView.visibility = VISIBLE
|
mCharmView.visibility = VISIBLE
|
||||||
mTvName.visibility = VISIBLE
|
mTvName.visibility = VISIBLE
|
||||||
@@ -86,10 +88,12 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
} else {
|
} else {
|
||||||
mCharmView.visibility = INVISIBLE
|
mCharmView.visibility = INVISIBLE
|
||||||
}
|
}
|
||||||
|
iv_tag_type?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
mCharmView.visibility = GONE
|
mCharmView.visibility = GONE
|
||||||
|
iv_tag_type?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +104,6 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
handleOffState(bean)
|
handleOffState(bean)
|
||||||
}
|
}
|
||||||
|
|
||||||
iv_tag_type!!.visibility = GONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSex(value: String?, format: Boolean) {
|
fun setSex(value: String?, format: Boolean) {
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
android:id="@+id/iv_host_bg"
|
android:id="@+id/iv_host_bg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginStart="@dimen/dp_48"
|
android:layout_marginStart="@dimen/dp_48"
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:src="@mipmap/icon_host_top_tips_bg"
|
android:src="@mipmap/icon_host_top_tips_bg"
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_13"
|
android:layout_height="@dimen/dp_13"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@mipmap/mu_yc"
|
android:src="@mipmap/zc"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||||
|
|||||||
Reference in New Issue
Block a user