From b0a9ebe0f351238593372ce06d5c49424b484e7e Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Wed, 27 Mar 2024 13:08:16 +0800 Subject: [PATCH] =?UTF-8?q?add=20[=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5-?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/activity_user_home.xml | 1 + .../main/activity/UserHomeActivity.java | 54 ++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/common/src/main/res/layout/activity_user_home.xml b/common/src/main/res/layout/activity_user_home.xml index bec172c89..27c6f6344 100644 --- a/common/src/main/res/layout/activity_user_home.xml +++ b/common/src/main/res/layout/activity_user_home.xml @@ -383,6 +383,7 @@ android:textStyle="bold" /> tagList; private GifImageView liveStatus; private TextView topName; + private TextView fanName; private LinearLayout topLayout; private ScrollView scrollView; private RelativeLayout topImgLayout; @@ -173,7 +178,7 @@ public class UserHomeActivity extends AbsActivity { @Override public void onSuccess(int code, String msg, String[] info) { beanList = JSONArray.parseArray(Arrays.toString(info), ActiveOtherBean.class); - UserCommunityAdapter userCommunityAdapter = new UserCommunityAdapter(mContext, beanList,isMe); + UserCommunityAdapter userCommunityAdapter = new UserCommunityAdapter(mContext, beanList, isMe); userCommunityAdapter.setOnItemClickListener(new UserCommunityAdapter.onItemClickListener() { @Override public void onImgItem(ActiveOtherBean bean, int position) { @@ -260,6 +265,7 @@ public class UserHomeActivity extends AbsActivity { authenticationLayout.setVisibility(View.VISIBLE); } else { imgUp.setVisibility(View.GONE); + imgLabel.setVisibility(View.GONE); authorIcon.setVisibility(View.GONE); authenticationLayout.setVisibility(View.GONE); } @@ -304,6 +310,9 @@ public class UserHomeActivity extends AbsActivity { myAdapter.setData(tagList); } } + if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getFans_name())) { + fanName.setText(userInfo.getUserHomeTopInfo().getFans_name()); + } mBanner.setOutlineProvider(new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { @@ -425,6 +434,7 @@ public class UserHomeActivity extends AbsActivity { } private void initView() { + fanName = findViewById(R.id.fanName); bottomEditLayout = findViewById(R.id.bottomEditLayout); imgUp = findViewById(R.id.imgUp); imgLabel = findViewById(R.id.imgLabel); @@ -613,6 +623,48 @@ public class UserHomeActivity extends AbsActivity { RouteUtil.forwardEditProfileActivity(); } }); + itemLayout01.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + // + Constants.myIntoIndex = 2; + String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/FengSiTuan?touid=" + uid; + WebViewActivity.forward(mContext, url, false); + } + }); + itemLayout02.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Constants.myIntoIndex = 2; + String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/ShouHu?touid=" + uid; + WebViewActivity.forward(mContext, url, false); + } + }); + itemLayout03.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + GiftWallDialog giftWallDialog = new GiftWallDialog(); + Bundle bundle = new Bundle(); + bundle.putString(Constants.LIVE_UID, uid); + bundle.putString("mAnchorName", userInfo.getUserHomeTopInfo().getUser_name()); + bundle.putString("mAvatarUrl", userInfo.getUserHomeTopInfo().getUser_avatar()); + bundle.putString("toUid", uid); + bundle.putInt("isAttention", userInfo.getUserHomeTopInfo().getIs_attention()); + bundle.putBoolean("isLive", isAnchor); + bundle.putBoolean("SBW", !(mContext instanceof LiveRyAnchorActivity)); + giftWallDialog.setArguments(bundle); + giftWallDialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "GiftWallDialog"); + } + }); + itemLayout04.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Constants.myIntoIndex = 2; + String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/RongYuQiang??touid=" + uid; + WebViewActivity.forward(mContext, url, false); + } + }); + findViewById(R.id.setting).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {