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) {