6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-07 13:36:59 +08:00
parent 3304e8f673
commit 97ad28ba62
11 changed files with 46 additions and 19 deletions

View File

@ -139,7 +139,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.online), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.diamond_linear));
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.more_menu));
builder.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)

View File

@ -65,6 +65,7 @@
android:background="@drawable/icon_gift_wall_no_data" />
<TextView
android:id="@+id/unlit_icon_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
@ -81,7 +82,7 @@
android:layout_marginTop="40dp"
android:background="@drawable/background_skip_button"
android:gravity="center"
android:text="@string/instant_light"
android:text="@string/been_sent_must"
android:visibility="gone"
android:textColor="#F16D00"
android:textSize="14sp" />

View File

@ -1260,7 +1260,7 @@
<string name="honorary_achievement">榮譽成就</string>
<string name="lit_icon">已點亮</string>
<string name="unlit_icon">未點亮</string>
<string name="all_service_champion">全服冠</string>
<string name="all_service_champion">全服冠</string>
<string name="unlit_icon_hint">愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮</string>
<string name="lit_icon_hint">暂无未点亮礼物哦</string>
<string name="instant_light">立即點亮</string>

View File

@ -1259,7 +1259,7 @@
<string name="honorary_achievement">榮譽成就</string>
<string name="lit_icon">已點亮</string>
<string name="unlit_icon">未點亮</string>
<string name="all_service_champion">全服冠</string>
<string name="all_service_champion">全服冠</string>
<string name="unlit_icon_hint">愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮</string>
<string name="lit_icon_hint">暂无未点亮礼物哦</string>
<string name="instant_light">立即點亮</string>

View File

@ -1257,7 +1257,7 @@
<string name="has_been_lit">已點亮%s個</string>
<string name="codex">圖鑒</string>
<string name="unlit_icon">未點亮</string>
<string name="all_service_champion">全服冠</string>
<string name="all_service_champion">全服冠</string>
<string name="unlit_icon_hint">愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮</string>
<string name="lit_icon_hint">暂无未点亮礼物哦</string>
<string name="instant_light">立即點亮</string>

View File

@ -1264,6 +1264,7 @@ Limited ride And limited avatar frame</string>
<string name="unlit_icon">unlit</string>
<string name="all_service_champion">All service</string>
<string name="unlit_icon_hint">Love \"ceremony \" at the beginning, \"wall \" potential light temporarily no light</string>
<string name="unlit_icon_hint2">当前活动暂未送出任何礼物哦</string>
<string name="lit_icon_hint">No unlit gifts yet</string>
<string name="instant_light">Instant light</string>
<string name="gift_wall_entrance">Gift Wall Entrance</string>
@ -1307,5 +1308,6 @@ Limited ride And limited avatar frame</string>
<string name="the_title_financier3">请输入自定义数量</string>
<string name="the__gifts_in_the_studio">请在直播间内进行送礼</string>
<string name="been_sent">已送出</string>
<string name="been_sent_must">立即送出</string>
</resources>

View File

@ -46,6 +46,7 @@ public class GiftWallActivity extends AbsActivity {
private List<View> tabView = new ArrayList<>();
private String mStream, mAnchorName, mLiveUid, mAvatarUrl;
private int isAttention = 0;//是否关注 0=没关注,
private boolean isLive;
@Override
protected int getLayoutId() {
@ -88,7 +89,7 @@ public class GiftWallActivity extends AbsActivity {
ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> {
selectTab(textLitIcon, viewLitIcon);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive));
transaction.commit();
});
ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() {
@ -117,7 +118,7 @@ public class GiftWallActivity extends AbsActivity {
public void onViewClicks() {
new XPopup.Builder(GiftWallActivity.this)
.enableDrag(false)
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, false))
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, isLive))
.show();
}
});
@ -126,7 +127,7 @@ public class GiftWallActivity extends AbsActivity {
public void onViewClicks() {
new XPopup.Builder(GiftWallActivity.this)
.enableDrag(false)
.asCustom(new MedalAchievementPopup(GiftWallActivity.this, false, mLiveUid, mLiveUid))
.asCustom(new MedalAchievementPopup(GiftWallActivity.this, isLive, mLiveUid, mLiveUid))
.show();
}
});
@ -154,12 +155,17 @@ public class GiftWallActivity extends AbsActivity {
mAnchorName = intent.getStringExtra("mAnchorName");
mAvatarUrl = intent.getStringExtra("mAvatarUrl");
isAttention = intent.getIntExtra("isAttention", 0);
isLive = intent.getBooleanExtra("isLive", false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive));
transaction.commit();
ImgLoader.display(GiftWallActivity.this, mAvatarUrl, avatar);
anchorName.setText(mAnchorName);
if (isLive) {
textLitIcon.setText(getString(R.string.lit_icon));
} else {
textLitIcon.setText(getString(R.string.been_sent));
}
}
private void selectTab(TextView textView, View tab) {

View File

@ -83,7 +83,7 @@ public class GiftWallDialog extends AbsDialogFragment {
ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> {
selectTab(textLitIcon, viewLitIcon);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive));
transaction.commit();
});
ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() {
@ -163,7 +163,7 @@ public class GiftWallDialog extends AbsDialogFragment {
isAttention = bundle.getInt("isAttention");
isLive = bundle.getBoolean("isLive");
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive));
transaction.commit();
ImgLoader.display(getContext(), mAvatarUrl, avatar);
anchorName.setText(mAnchorName);

View File

@ -81,7 +81,7 @@ public class GiftWallItemPopup extends CenterPopupView {
public void loadData() {
LiveNetManager.get(getContext()).
giftDetail(mLiveUid, String.valueOf(giftDetails.getId()), new HttpCallback<GiftWallGiftDetail>() {
giftDetail(mLiveUid, String.valueOf(giftWallModel.getId()), new HttpCallback<GiftWallGiftDetail>() {
@Override
public void onSuccess(GiftWallGiftDetail data) {
if (data.getUid() == 0) {

View File

@ -664,7 +664,10 @@ public class LiveGiftPopup extends AbsDialogFragment {
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
liveGiftModel = event.getLiveGiftModel();
if (!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") && !TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
namingLayout.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
StringBuffer namingNameText = new StringBuffer();

View File

@ -1,6 +1,7 @@
package com.yunbao.live.views;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -13,13 +14,14 @@ import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftAlreadyWallAdapter;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.fragment.BaseFragment;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.common.event.LiveGiftDialogEvent;
/**
* 已点亮礼物墙
@ -29,7 +31,8 @@ public class GiftAlreadyWallFragment extends BaseFragment {
private LinearLayout giftWallNoData, giftWallData;
private RecyclerView alreadyList;
private GiftAlreadyWallAdapter alreadyWallAdapter;
private TextView litIcon, giftAll;
private TextView litIcon, giftAll, unlitIconHint, instantLight;
private boolean isAnchor;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
@ -42,6 +45,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
toUid = bundle.getString("toUid");
isAnchor = bundle.getBoolean("isAnchor");
}
@Override
@ -51,9 +55,19 @@ public class GiftAlreadyWallFragment extends BaseFragment {
alreadyList = contentView.findViewById(R.id.already_list);
litIcon = contentView.findViewById(R.id.lit_icon);
giftAll = contentView.findViewById(R.id.gift_all);
instantLight = contentView.findViewById(R.id.instant_light);
unlitIconHint = contentView.findViewById(R.id.unlit_icon_hint);
alreadyWallAdapter = new GiftAlreadyWallAdapter();
alreadyList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
alreadyList.setAdapter(alreadyWallAdapter);
if (isAnchor) {
unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint));
} else {
unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint2));
}
if (TextUtils.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "", toUid)) {
instantLight.setVisibility(View.VISIBLE);
}
ViewClicksAntiShake.clicksAntiShake(contentView.findViewById(R.id.instant_light), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
@ -91,13 +105,14 @@ public class GiftAlreadyWallFragment extends BaseFragment {
});
}
public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid,String toUid) {
public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid, String toUid, boolean isAnchor) {
GiftAlreadyWallFragment liveGiftFragment = new GiftAlreadyWallFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
bundle.putString("mLiveUid", mLiveUid);
bundle.putString("toUid", toUid);
bundle.putBoolean("isAnchor", isAnchor);
liveGiftFragment.setArguments(bundle);
return liveGiftFragment;
}