update 粉丝团相关
This commit is contained in:
@@ -126,6 +126,7 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
||||
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||
LiveRoomViewHolder.follow();
|
||||
ToastUtil.show(R.string.live_fans_follow_toast);
|
||||
}
|
||||
//点击 开通粉丝勋章,打开礼物列表送礼物
|
||||
((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0");
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveFansGroupBuyDialog extends AbsDialogPopupWindow {
|
||||
public LiveFansGroupBuyDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_buy;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveFansGroupInfoDialog extends AbsDialogPopupWindow {
|
||||
public LiveFansGroupInfoDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveFansGroupSendGiftDialog extends AbsDialogPopupWindow {
|
||||
public LiveFansGroupSendGiftDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_send;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@@ -151,7 +152,6 @@ import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
@@ -324,7 +324,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private View btnEvent;
|
||||
private LinearLayout lt_trickery;
|
||||
private TextView tv_trickery_time;
|
||||
private FrameLayout enterRoomLeave, enterRoomBg;
|
||||
private FrameLayout enterRoomLeave, enterRoomBg, fans_enter_room_leave;
|
||||
private RecyclerView fastMsgRecyclerView;
|
||||
private LiveRoomFastMessageRecyclerViewAdapter fastMessageRecyclerViewAdapter;
|
||||
|
||||
@@ -907,6 +907,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
btn_event4 = (LinearLayout) findViewById(R.id.btn_event4);
|
||||
enterRoomLeave = (FrameLayout) findViewById(R.id.enter_room_leave);
|
||||
fans_enter_room_leave = (FrameLayout) findViewById(R.id.fans_enter_room_leave);
|
||||
enterRoomBg = (FrameLayout) findViewById(R.id.enter_room_bg);
|
||||
enterRoomLeave2 = (LinearLayout) findViewById(R.id.enter_room_leave2);
|
||||
mBanner1 = (Banner) findViewById(R.id.banner1);
|
||||
@@ -1653,6 +1654,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
updataCleanMic();
|
||||
// initStarChallengeStatus();
|
||||
enterRoomLeave.setVisibility(View.GONE);
|
||||
fans_enter_room_leave.setVisibility(View.GONE);
|
||||
topBanner1.setVisibility(View.GONE);
|
||||
topBanner2.setVisibility(View.GONE);
|
||||
topBanner1.update(mTopBannerList);
|
||||
@@ -4829,6 +4831,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
|
||||
enterRoomLeave.setLayoutParams(enterRoomParams);
|
||||
fans_enter_room_leave.setLayoutParams(enterRoomParams);
|
||||
|
||||
|
||||
}
|
||||
@@ -4841,6 +4844,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
userName.setText(String.format(mContext.getString(R.string.come_hint), model.getUserNiceName()));
|
||||
ImgLoader.display(mContext, model.getAvatar(), imageAvatar);
|
||||
int level = model.getLevel();
|
||||
model.setFansLevel(11);
|
||||
if (model.getFansLevel() > 10) {
|
||||
showFansGroupEnterRoom();
|
||||
return;
|
||||
}
|
||||
if (level < 50) {
|
||||
enterRoomLeave.setBackgroundResource(R.drawable.background_30);
|
||||
enterRoomLeave2.setBackgroundResource(R.drawable.bg_30_leave);
|
||||
@@ -4899,6 +4907,69 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
private void showFansGroupEnterRoom() {
|
||||
fans_enter_room_leave.post(() -> {
|
||||
TextView userName = fans_enter_room_leave.findViewById(R.id.user_name);
|
||||
userName.setText(Html.fromHtml(String.format("@<font color='#99D5FF'>%s</font> 粉絲團成員歡迎進房", "测试")));
|
||||
new LoadDian9TuUtil().loadDian9Tu(mContext, fans_enter_room_leave,
|
||||
"https://downs.yaoulive.com/20230322/g5_.9.png"
|
||||
, 1);
|
||||
fans_enter_room_leave.setVisibility(View.VISIBLE);
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(DeviceUtils.getScreenWidth((Activity) mContext), 0, 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
animationSet1.setFillAfter(true);
|
||||
animationSet1.setDuration(500);
|
||||
animationSet1.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
mLiveRoomHandler.postDelayed(() -> hideFansGroupEnter(), 3000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
});
|
||||
fans_enter_room_leave.startAnimation(animationSet1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏粉丝团入场提示
|
||||
*/
|
||||
public void hideFansGroupEnter() {
|
||||
if (fans_enter_room_leave.getVisibility() == View.GONE) return;
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(0, -(fans_enter_room_leave.getMeasuredWidth() + DpUtil.dp2px(6)), 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
animationSet1.setFillAfter(true);
|
||||
animationSet1.setDuration(100);
|
||||
animationSet1.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
fans_enter_room_leave.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
});
|
||||
fans_enter_room_leave.startAnimation(animationSet1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏高等级入场提示
|
||||
*/
|
||||
@@ -5278,11 +5349,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mLiveGiftAnimPresenter.showSendGiftAnimAllServer2(receiveGiftBean);
|
||||
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||
}
|
||||
public void sendWelcomeFans(){
|
||||
|
||||
public void sendWelcomeFans() {
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setContent("123123<font color='#FF8E43'>test</font>1243");
|
||||
chatBean.setType(LiveChatBean.SYSTEM3_COLOR);
|
||||
chatBean.setBubble("https://downs.yaoulive.com/20230322/g2_.9.png");
|
||||
insertChat(chatBean,1);
|
||||
insertChat(chatBean, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftInfo"
|
||||
tools:itemCount="3"
|
||||
|
||||
tools:listitem="@layout/item_fens_group_buy_list" />
|
||||
tools:listitem="@layout/item_fans_group_buy_list" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/buy"
|
||||
@@ -46,7 +46,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchorName"
|
||||
tools:itemCount="4"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_fens_group_package_list" />
|
||||
tools:listitem="@layout/item_fans_group_package_list" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fans_enter_room_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/come_hint"
|
||||
android:textColor="#fff"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
@@ -37,7 +37,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="TextView"
|
||||
android:text="@string/main_anchor_live_notify_info"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#CCFFFFFF"
|
||||
app:layout_constraintStart_toStartOf="@+id/anchorName"
|
||||
@@ -52,10 +52,11 @@
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFEF3"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/main_anchor_live_notify_live"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="圍觀" />
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -223,6 +223,15 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginBottom="-350dp"
|
||||
android:visibility="gone" />
|
||||
<include
|
||||
android:id="@+id/fans_enter_room_leave"
|
||||
layout="@layout/view_fans_group_enter_room_leave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/chat_recyclerView"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginBottom="-350dp"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
||||
@@ -107,4 +107,5 @@
|
||||
<string name="live_fans_group_info2_text2">2. The final interpretation rights of this gift package belong to PD Live</string>
|
||||
<string name="live_fans_group_info_title">Introduction</string>
|
||||
<string name="live_fans_group_info2_title">Rules</string>
|
||||
<string name="live_fans_follow_toast">Join the fan group and unlock exclusive gifts</string>
|
||||
</resources>
|
||||
@@ -105,4 +105,5 @@
|
||||
<string name="live_fans_group_info2_text2">2. 该禮包最終解釋權歸 PD Live 所有</string>
|
||||
<string name="live_fans_group_info_title">禮包介紹</string>
|
||||
<string name="live_fans_group_info2_title">購買規則</string>
|
||||
<string name="live_fans_follow_toast">加入粉絲團,解鎖專屬禮物</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user