fix bugs.
This commit is contained in:
@@ -120,17 +120,17 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
|
||||
private long createtime;
|
||||
|
||||
public String name = "";
|
||||
public String level = "";
|
||||
public String exp = "";
|
||||
public String pendant = "";
|
||||
public String direction;
|
||||
public String name = "-1";
|
||||
public String level = "-1";
|
||||
public String exp = "-1";
|
||||
public String pendant = "-1";
|
||||
public String direction = "-1";
|
||||
public UserInfo1 user_info1;
|
||||
public UserInfo2 user_info2;
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
if (!name.isEmpty()) {
|
||||
if (name != null && !name.isEmpty()) {
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
|
||||
@@ -48,6 +48,9 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
BaseMvpFragment<MentorShipPresenter, FragmentMentorShipBinding>(), MentorShipContacts.View,
|
||||
View.OnClickListener {
|
||||
|
||||
// 无参构造函数
|
||||
constructor() : this(null)
|
||||
|
||||
companion object {
|
||||
|
||||
fun newInstance(roomInfoResp: RoomInfoResp): RoomMentorShipFragment {
|
||||
|
||||
@@ -102,13 +102,13 @@ class HeartCpActivity : BaseMvpActivity<HeartCpPresenter, ActivityHeartCpBinding
|
||||
mHeartData = heartCpBean
|
||||
|
||||
if (userId == heartCpBean.user_id1) {
|
||||
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadLeft)
|
||||
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadRight)
|
||||
ImageUtils.loadHeadCC(heartCpBean.user_info1.avatar, mBinding.ivHeadLeft)
|
||||
ImageUtils.loadHeadCC(heartCpBean.user_info2.avatar, mBinding.ivHeadRight)
|
||||
leftUserId = heartCpBean.user_id1
|
||||
rightUserId = heartCpBean.user_id2
|
||||
} else {
|
||||
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadLeft)
|
||||
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadRight)
|
||||
ImageUtils.loadHeadCC(heartCpBean.user_info2.avatar, mBinding.ivHeadLeft)
|
||||
ImageUtils.loadHeadCC(heartCpBean.user_info1.avatar, mBinding.ivHeadRight)
|
||||
leftUserId = heartCpBean.user_id2
|
||||
rightUserId = heartCpBean.user_id1
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
@@ -239,6 +240,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
mBinding.headerInfo.imGiftW.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
private void showCp() {
|
||||
if (userInfo.getCp_info() != null) {
|
||||
mBinding.headerInfo.llCp.setVisibility(VISIBLE);
|
||||
@@ -275,6 +277,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
||||
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
||||
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
||||
try {
|
||||
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
||||
case 0:
|
||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
@@ -322,12 +325,16 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
break;
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
LogUtils.e("cp_info.direction is null" + e.toString());
|
||||
}
|
||||
mBinding.headerInfo.llCpAnimAvatar.setLayoutParams(params);
|
||||
} else {
|
||||
mBinding.headerInfo.llCp.setVisibility(GONE);
|
||||
mBinding.headerInfo.rlCpAnim.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshView() {
|
||||
if (SpUtil.getUserId() == userInfo.getUser_id()) {
|
||||
mBinding.headerInfo.tvGsSx.setVisibility(View.GONE);
|
||||
|
||||
@@ -599,6 +599,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
||||
ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
||||
//挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上'
|
||||
try {
|
||||
switch (Integer.parseInt(userInfo.getCp_info().direction)) {
|
||||
case 0:
|
||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
@@ -646,6 +647,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
break;
|
||||
}
|
||||
}catch (NullPointerException e){
|
||||
LogUtils.e("挂件位置异常"+e.toString());
|
||||
}
|
||||
mBinding.llCpAnimAvatar.setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.xscm.modulemain.R
|
||||
@@ -67,6 +68,7 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
mCharmView.setBg(0)
|
||||
when (bean.pit_number) {
|
||||
"9" -> {
|
||||
iv_tag_type?.visibility = View.VISIBLE
|
||||
if (bean.user_id != "0") {
|
||||
mCharmView.visibility = VISIBLE
|
||||
mTvName.visibility = VISIBLE
|
||||
@@ -86,10 +88,12 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
} else {
|
||||
mCharmView.visibility = INVISIBLE
|
||||
}
|
||||
iv_tag_type?.visibility = View.GONE
|
||||
}
|
||||
|
||||
else -> {
|
||||
mCharmView.visibility = GONE
|
||||
iv_tag_type?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +104,6 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
handleOffState(bean)
|
||||
}
|
||||
|
||||
iv_tag_type!!.visibility = GONE
|
||||
}
|
||||
|
||||
fun setSex(value: String?, format: Boolean) {
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
android:id="@+id/iv_host_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_48"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:src="@mipmap/icon_host_top_tips_bg"
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/mu_yc"
|
||||
android:src="@mipmap/zc"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
|
||||
Reference in New Issue
Block a user