update 主播端点礼物墙按钮置灰

This commit is contained in:
zlzw 2023-08-09 13:53:16 +08:00
parent 7bca817633
commit d07439efcf
3 changed files with 18 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -2,6 +2,7 @@ package com.yunbao.live.dialog;
import android.content.Context;
import android.graphics.Color;
import android.widget.ImageView;
import android.widget.TextView;
@ -9,6 +10,7 @@ import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
@ -28,6 +30,7 @@ public class GiftWallItemPopup extends CenterPopupView {
private GiftWallModel giftWallModel;
private boolean unlit;
private String mLiveUid, mStream;
private boolean isAnchor = false;
public GiftWallItemPopup(@NonNull Context context, GiftWallModel giftWallModel,
boolean unlit, String mLiveUid, String mStream) {
@ -36,6 +39,9 @@ public class GiftWallItemPopup extends CenterPopupView {
this.unlit = unlit;
this.mLiveUid = mLiveUid;
this.mStream = mStream;
if (this.mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
isAnchor = true;
}
}
@Override
@ -60,6 +66,11 @@ public class GiftWallItemPopup extends CenterPopupView {
} else {
giftDetailsBtn.setText(getContext().getText(R.string.instant_light));
}
if(isAnchor){
giftDetailsBtn.setBackgroundResource(R.drawable.background_skip_unselect_button);
giftDetailsBtn.setEnabled(false);
giftDetailsBtn.setTextColor(Color.parseColor("#F2F2F2"));
}
ImgLoader.display(getContext(), giftWallModel.getGifticon(), giftImg);
giftDetails.setText(giftWallModel.getGiftname());
price.setText(giftWallModel.getNeedcoin());

View File

@ -1,5 +1,6 @@
package com.yunbao.live.views;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
@ -11,6 +12,7 @@ import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftAlreadyWallAdapter;
import com.yunbao.common.bean.GiftAlreadyWallModel;
@ -60,6 +62,11 @@ public class GiftAlreadyWallFragment extends BaseFragment {
alreadyWallAdapter = new GiftAlreadyWallAdapter();
alreadyList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
alreadyList.setAdapter(alreadyWallAdapter);
if(mLiveUid.equals(CommonAppConfig.getInstance().getUid())){
instantLight.setBackgroundResource(R.drawable.background_skip_unselect_button);
instantLight.setEnabled(false);
instantLight.setTextColor(Color.parseColor("#F2F2F2"));
}
if (isAnchor) {
unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint));
} else {