update 礼物墙
This commit is contained in:
parent
96c45820b0
commit
7a6dfe5a3d
@ -98,7 +98,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
|
|||||||
tv_rename = itemView.findViewById(R.id.tv_rename);
|
tv_rename = itemView.findViewById(R.id.tv_rename);
|
||||||
avatar = itemView.findViewById(R.id.avatar);
|
avatar = itemView.findViewById(R.id.avatar);
|
||||||
avatar2 = itemView.findViewById(R.id.avatar2);
|
avatar2 = itemView.findViewById(R.id.avatar2);
|
||||||
anchor_name = itemView.findViewById(R.id.anchor_name);
|
anchor_name = itemView.findViewById(R.id.item_anchor_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(GiftWallInfoBean.Data data, int position) {
|
public void setData(GiftWallInfoBean.Data data, int position) {
|
||||||
@ -116,6 +116,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
anchor_name.setVisibility(View.GONE);
|
||||||
if (isStar && list_type == 2) {
|
if (isStar && list_type == 2) {
|
||||||
ImgLoader.display(itemView.getContext(), data.getLive_avatar(), avatar);
|
ImgLoader.display(itemView.getContext(), data.getLive_avatar(), avatar);
|
||||||
anchor_name.setText(data.getLive_user_name());
|
anchor_name.setText(data.getLive_user_name());
|
||||||
|
@ -239,8 +239,8 @@ public class GiftWallInfoBean extends BaseModel {
|
|||||||
return gift_hall_send_num;
|
return gift_hall_send_num;
|
||||||
}
|
}
|
||||||
public String getGift_hall_send_numForString() {
|
public String getGift_hall_send_numForString() {
|
||||||
if(gift_hall_send_num>999999){
|
if(gift_hall_send_num>99999){
|
||||||
return "999999+";
|
return "99999+";
|
||||||
}else{
|
}else{
|
||||||
return String.valueOf(gift_hall_send_num);
|
return String.valueOf(gift_hall_send_num);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected int getPopupHeight() {
|
protected int getPopupHeight() {
|
||||||
if (isFullWindows) {
|
if (isFullWindows) {
|
||||||
return super.getPopupHeight();
|
return super.getPopupHeight()-DpUtil.dp2px(10);
|
||||||
}
|
}
|
||||||
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
|
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
|
||||||
return (int) (screenHeight * 0.8);
|
return (int) (screenHeight * 0.8);
|
||||||
@ -173,8 +173,15 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(mIvTips, () -> {
|
ViewClicksAntiShake.clicksAntiShake(mIvTips, () -> {
|
||||||
new GiftWallRuleDialog(mContext).setFullWindows(isFullWindows).showDialog();
|
new GiftWallRuleDialog(mContext).setFullWindows(isFullWindows).showDialog();
|
||||||
});
|
});
|
||||||
|
resetWindows();
|
||||||
|
}
|
||||||
|
private void resetWindows(){
|
||||||
|
if(isFullWindows){
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.v_achievement).getLayoutParams();
|
||||||
|
params.topMargin=DpUtil.dp2px(47);
|
||||||
|
findViewById(R.id.v_achievement).setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
@ -6,6 +6,7 @@ import android.animation.ObjectAnimator;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
@ -13,6 +14,7 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
@ -72,7 +74,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
|
|||||||
String toUserId;
|
String toUserId;
|
||||||
boolean isAnchor;
|
boolean isAnchor;
|
||||||
int gift_hall_type = 1;
|
int gift_hall_type = 1;
|
||||||
int list_type = 1;
|
int list_type = 2;
|
||||||
private boolean isLiveRoom;
|
private boolean isLiveRoom;
|
||||||
String time;
|
String time;
|
||||||
private boolean isStar;
|
private boolean isStar;
|
||||||
@ -170,8 +172,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
|
|||||||
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename));
|
((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename));
|
||||||
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value));
|
((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value));
|
||||||
}
|
}
|
||||||
btn_one.setVisibility(View.GONE);
|
|
||||||
btn_one_tips.setVisibility(View.GONE);
|
findViewById(R.id.item_anchor_name).setVisibility(View.GONE);
|
||||||
ViewClicksAntiShake.clicksAntiShake(tab1, () -> {
|
ViewClicksAntiShake.clicksAntiShake(tab1, () -> {
|
||||||
|
|
||||||
btn_one.setVisibility(View.GONE);
|
btn_one.setVisibility(View.GONE);
|
||||||
@ -240,6 +242,14 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
mIvBack.setLayoutParams(params);
|
mIvBack.setLayoutParams(params);
|
||||||
ViewClicksAntiShake.clicksAntiShake(mIvBack, this::dismiss);
|
ViewClicksAntiShake.clicksAntiShake(mIvBack, this::dismiss);
|
||||||
|
resetWindows();
|
||||||
|
}
|
||||||
|
private void resetWindows(){
|
||||||
|
if(isFullWindows){
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.gift_name).getLayoutParams();
|
||||||
|
params.topMargin=DpUtil.dp2px(47);
|
||||||
|
findViewById(R.id.gift_name).setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initData() {
|
void initData() {
|
||||||
@ -247,6 +257,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
|
|||||||
if (isAnchor) {
|
if (isAnchor) {
|
||||||
if(isStar){
|
if(isStar){
|
||||||
gift_hall_type=2;
|
gift_hall_type=2;
|
||||||
|
}else {
|
||||||
|
gift_hall_type=1;
|
||||||
}
|
}
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.liveGiftHallDetail(toUserId, giftId, gift_hall_type, list_type, new HttpCallback<GiftWallInfoBean>() {
|
.liveGiftHallDetail(toUserId, giftId, gift_hall_type, list_type, new HttpCallback<GiftWallInfoBean>() {
|
||||||
@ -312,7 +324,9 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
if (!isLiveRoom) {
|
if (!isLiveRoom) {
|
||||||
gift_btn.setEnabled(false);
|
gift_btn.setEnabled(false);
|
||||||
|
btn_one.setEnabled(false);
|
||||||
gift_btn.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un);
|
gift_btn.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un);
|
||||||
|
btn_one.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un);
|
||||||
}
|
}
|
||||||
adapter.setData(giftBean.getData());
|
adapter.setData(giftBean.getData());
|
||||||
time = (WordUtil.isNewZh() ? "榜單結算時間" : "Settlement time") + giftBean.getGift_info().getGift_hall_start() + " - " + giftBean.getGift_info().getGift_hall_end();
|
time = (WordUtil.isNewZh() ? "榜單結算時間" : "Settlement time") + giftBean.getGift_info().getGift_hall_start() + " - " + giftBean.getGift_info().getGift_hall_end();
|
||||||
|
@ -166,9 +166,27 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow {
|
|||||||
adapter = new GiftWallTab2GiftInfoListItemAdapter();
|
adapter = new GiftWallTab2GiftInfoListItemAdapter();
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
recyclerView.addItemDecoration(new ItemDecoration(mContext, 0x000, 0, 2));
|
recyclerView.addItemDecoration(new ItemDecoration(mContext, 0x000, 0, 2));
|
||||||
initData();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(mIvBack, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
initData();
|
||||||
|
resetWindows();
|
||||||
|
}
|
||||||
|
private void resetWindows(){
|
||||||
|
if(isFullWindows){
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.iv_back).getLayoutParams();
|
||||||
|
params.topMargin=DpUtil.dp2px(47);
|
||||||
|
findViewById(R.id.iv_back).setLayoutParams(params);
|
||||||
|
params = (ConstraintLayout.LayoutParams) findViewById(R.id.scrollView).getLayoutParams();
|
||||||
|
params.topMargin=DpUtil.dp2px(47);
|
||||||
|
findViewById(R.id.scrollView).setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
@ -106,8 +106,8 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
|
|||||||
recyclerView2.setAdapter(list2Adapter);
|
recyclerView2.setAdapter(list2Adapter);
|
||||||
|
|
||||||
|
|
||||||
recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(10)));
|
recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5)));
|
||||||
recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(10)));
|
recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5)));
|
||||||
|
|
||||||
starGiftsTitle.getPaint().setShader(new LinearGradient(0, 0, 0, classicGiftsTitle.getPaint().getTextSize(),
|
starGiftsTitle.getPaint().setShader(new LinearGradient(0, 0, 0, classicGiftsTitle.getPaint().getTextSize(),
|
||||||
Color.parseColor("#FEE8C6"), Color.parseColor("#FFD5A3"), Shader.TileMode.CLAMP));
|
Color.parseColor("#FEE8C6"), Color.parseColor("#FFD5A3"), Shader.TileMode.CLAMP));
|
||||||
|
@ -645,9 +645,13 @@ public class JavascriptInterfaceUtils {
|
|||||||
.setMethod("androidFansGroupInfo"));
|
.setMethod("androidFansGroupInfo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼物墙
|
||||||
|
*/
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl, int isAnchor) {
|
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl, int isAnchor) {
|
||||||
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0, isAnchor == 1);
|
// RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0, isAnchor == 1);
|
||||||
|
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid,mAnchorName, isAnchor==1).setFullWindows(true).showDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/nestedScrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
@ -64,14 +65,15 @@
|
|||||||
|
|
||||||
<com.yunbao.common.views.weight.MarqueeTextView
|
<com.yunbao.common.views.weight.MarqueeTextView
|
||||||
android:id="@+id/gift_name"
|
android:id="@+id/gift_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginTop="17dp"
|
android:layout_marginTop="17dp"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
|
android:gravity="center"
|
||||||
android:marqueeRepeatLimit="marquee_forever"
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
android:maxLength="3"
|
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
@ -92,7 +94,8 @@
|
|||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/gift_name"
|
app:layout_constraintBottom_toBottomOf="@+id/gift_name"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/gift_name" />
|
app:layout_constraintTop_toTopOf="@+id/gift_name"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/gift"
|
android:id="@+id/gift"
|
||||||
@ -217,23 +220,23 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginEnd="50dp"
|
android:layout_marginEnd="50dp"
|
||||||
android:background="@drawable/gift_wall_gift_info_list_btn_up"
|
android:background="@drawable/gift_wall_gift_info_list_btn_down"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:minWidth="70dp"
|
android:minWidth="70dp"
|
||||||
android:text="@string/dialog_gift_wall_gfit_info_list_title_assistance"
|
android:text="@string/dialog_gift_wall_gfit_info_list_title_assistance"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="#31326D"
|
android:textColor="#FFF"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/tab2"
|
android:id="@+id/tab2"
|
||||||
android:layout_width="70dp"
|
android:layout_width="70dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:background="@drawable/gift_wall_gift_info_list_btn_down"
|
android:background="@drawable/gift_wall_gift_info_list_btn_up"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/dialog_gift_wall_gfit_info_list_title_champion"
|
android:text="@string/dialog_gift_wall_gfit_info_list_title_champion"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#31326D"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/scrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
@ -309,6 +310,10 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -453,7 +458,7 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/list_title"
|
android:id="@+id/list_title"
|
||||||
layout="@layout/item_dialog_gift_wall_gift_info"
|
layout="@layout/item_dialog_gift_wall_gift_info"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
|
@ -77,9 +77,12 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/user1_name"
|
android:id="@+id/user1_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="100dp"
|
||||||
|
android:gravity="center"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
android:textColor="#FFD3A4"
|
android:textColor="#FFD3A4"
|
||||||
android:text="TextView"
|
android:text="TextView"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/user1_avatar"
|
app:layout_constraintEnd_toEndOf="@+id/user1_avatar"
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:translationY="1dp"
|
||||||
android:background="@mipmap/gift_wall_main_list_bg"
|
android:background="@mipmap/gift_wall_main_list_bg"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -123,9 +123,9 @@
|
|||||||
android:id="@+id/recyclerView1"
|
android:id="@+id/recyclerView1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -148,18 +148,17 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/classic_layout"
|
android:id="@+id/classic_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView2"
|
android:id="@+id/recyclerView2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -46,41 +46,40 @@
|
|||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginEnd="70dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/tv_rename"
|
app:layout_constraintEnd_toStartOf="@+id/tv_rename"
|
||||||
app:layout_constraintStart_toEndOf="@+id/avatar2"
|
app:layout_constraintStart_toEndOf="@+id/avatar2"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.0"
|
app:layout_constraintVertical_bias="0.0">
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginEnd="70dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/anchor_name"
|
android:id="@+id/item_anchor_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="@string/dialog_gift_wall_list_info_list_header_rename"
|
android:text="@string/dialog_gift_wall_list_info_list_header_rename"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:ellipsize="end"
|
android:visibility="gone" />
|
||||||
android:visibility="gone"
|
|
||||||
android:singleLine="true"
|
|
||||||
/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/user_name"
|
android:id="@+id/user_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="@string/dialog_gift_wall_list_info_list_header_rename"
|
android:text="@string/dialog_gift_wall_list_info_list_header_rename"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:ellipsize="end"
|
tools:text="aaaaa" />
|
||||||
android:singleLine="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -59,13 +59,16 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/gift_name"
|
android:id="@+id/gift_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="扬帆出海"
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
|
android:gravity="center"
|
||||||
android:textSize="11sp"
|
android:textSize="11sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/gift_soles" />
|
app:layout_constraintTop_toBottomOf="@+id/gift_soles"
|
||||||
|
tools:text="aaaaaaaaaaaaaa" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -27,8 +27,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/gift_name"
|
android:id="@+id/gift_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="TextView"
|
android:text="TextView"
|
||||||
android:textColor="#C4FFDBAC"
|
android:textColor="#C4FFDBAC"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
@ -108,8 +113,11 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_wait"
|
android:id="@+id/tv_wait"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
android:text="@string/dialog_gift_wall_tab2_list_wait"
|
android:text="@string/dialog_gift_wall_tab2_list_wait"
|
||||||
android:textColor="#A2A2A2"
|
android:textColor="#A2A2A2"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
@ -117,5 +125,6 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/gift_number" />
|
app:layout_constraintTop_toBottomOf="@+id/gift_number"
|
||||||
|
tools:visibility="visible" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -27,8 +27,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/gift_name"
|
android:id="@+id/gift_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="TextView"
|
android:text="TextView"
|
||||||
android:textColor="#C4FFDBAC"
|
android:textColor="#C4FFDBAC"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
@ -108,8 +113,11 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_wait"
|
android:id="@+id/tv_wait"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/dialog_gift_wall_tab2_list_wait"
|
android:text="@string/dialog_gift_wall_tab2_list_wait"
|
||||||
android:textColor="#A2A2A2"
|
android:textColor="#A2A2A2"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
@ -117,5 +125,6 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/gift_number" />
|
app:layout_constraintTop_toBottomOf="@+id/gift_number"
|
||||||
|
tools:visibility="visible" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -778,6 +778,12 @@ public class SocketSwClient {
|
|||||||
case "SendMoneyLongEnd":
|
case "SendMoneyLongEnd":
|
||||||
Bus.get().post(new SendMoneyLongEndEvent());
|
Bus.get().post(new SendMoneyLongEndEvent());
|
||||||
break;
|
break;
|
||||||
|
case Constants.SOCKET_LIVE_ANCHOR_PK_DIALOG:
|
||||||
|
item = map.getJSONObject("ct");
|
||||||
|
//DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()?item.getString("text"):item.getString("text_en"),null);
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_DIALOG_ANCHOR_TIPS)
|
||||||
|
.setObject(WordUtil.isNewZh() ? item.getString("text") : item.getString("text_en")));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,9 @@ import io.rong.imkit.userinfo.RongUserInfoManager;
|
|||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
import io.rong.imlib.model.UserInfo;
|
import io.rong.imlib.model.UserInfo;
|
||||||
|
|
||||||
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||||
|
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1789,13 +1791,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
});
|
});
|
||||||
|
|
||||||
//点击收起整蛊icon
|
//点击收起整蛊icon
|
||||||
prank_small_icon.setOnClickListener(v->{
|
prank_small_icon.setOnClickListener(v -> {
|
||||||
prank_group.setVisibility(View.VISIBLE);
|
prank_group.setVisibility(View.VISIBLE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
});
|
});
|
||||||
|
|
||||||
//点击图片转盘整蛊(跳转转盘整蛊)
|
//点击图片转盘整蛊(跳转转盘整蛊)
|
||||||
prank_group_turntable_icon.setOnClickListener(v->{
|
prank_group_turntable_icon.setOnClickListener(v -> {
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT));
|
.setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT));
|
||||||
});
|
});
|
||||||
@ -1808,15 +1810,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
/**
|
/**
|
||||||
* 收起整蛊列表
|
* 收起整蛊列表
|
||||||
*/
|
*/
|
||||||
public void closePrankView(){
|
public void closePrankView() {
|
||||||
if(prank_group.getVisibility()==View.VISIBLE){
|
if (prank_group.getVisibility() == View.VISIBLE) {
|
||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.VISIBLE);
|
prank_small_icon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void sendMsgPrank(){
|
public void sendMsgPrank() {
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -1830,7 +1832,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
|
|
||||||
//初始化整蛊列表进度
|
//初始化整蛊列表进度
|
||||||
public void initPrankProgress(int isShow){
|
public void initPrankProgress(int isShow) {
|
||||||
// LogUtils.e("yqw=====>主播id:"+mLiveUid);
|
// LogUtils.e("yqw=====>主播id:"+mLiveUid);
|
||||||
//获取整蛊列表
|
//获取整蛊列表
|
||||||
LiveNetManager.get(mContext).getPrankProgressList(mLiveUid, new com.yunbao.common.http.base.HttpCallback<PrankProgressBean>() {
|
LiveNetManager.get(mContext).getPrankProgressList(mLiveUid, new com.yunbao.common.http.base.HttpCallback<PrankProgressBean>() {
|
||||||
@ -1843,7 +1845,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
prankAndComboList.addAll(data.getPrank_list());
|
prankAndComboList.addAll(data.getPrank_list());
|
||||||
completedList.clear();
|
completedList.clear();
|
||||||
completedList.addAll(data.getCompleted_list());
|
completedList.addAll(data.getCompleted_list());
|
||||||
setPrankList(isShow,data.getStatus(),data.getPrank_type(),data.getPrank_turntable_status());
|
setPrankList(isShow, data.getStatus(), data.getPrank_type(), data.getPrank_turntable_status());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1851,62 +1853,65 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
prank_group_turntable_icon.setVisibility(View.GONE);
|
prank_group_turntable_icon.setVisibility(View.GONE);
|
||||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//刷新整蛊礼物列表
|
//刷新整蛊礼物列表
|
||||||
public void refreshPrank(String newPrankData){
|
public void refreshPrank(String newPrankData) {
|
||||||
try {
|
try {
|
||||||
// LogUtils.e("yqw=====>整蛊礼物数据1:"+newPrankData);
|
// LogUtils.e("yqw=====>整蛊礼物数据1:"+newPrankData);
|
||||||
org.json.JSONObject ctString = new org.json.JSONObject(newPrankData);
|
org.json.JSONObject ctString = new org.json.JSONObject(newPrankData);
|
||||||
if (ctString.getInt("is_update") == 1){
|
if (ctString.getInt("is_update") == 1) {
|
||||||
//列表全部更新
|
//列表全部更新
|
||||||
if (ctString.getInt("status")==1){
|
if (ctString.getInt("status") == 1) {
|
||||||
//编辑添加整蛊
|
//编辑添加整蛊
|
||||||
initPrankProgress(1);
|
initPrankProgress(1);
|
||||||
}else {
|
} else {
|
||||||
//编辑取消整蛊
|
//编辑取消整蛊
|
||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(ctString.getString("prank_turntable_status")) == 0){
|
if (Integer.parseInt(ctString.getString("prank_turntable_status")) == 0) {
|
||||||
prank_group_turntable_icon.setVisibility(View.GONE);
|
prank_group_turntable_icon.setVisibility(View.GONE);
|
||||||
}else {
|
} else {
|
||||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||||
//ZeusKt.visible(prank_group_turntable_icon);
|
//ZeusKt.visible(prank_group_turntable_icon);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
//送整蛊礼物更新
|
//送整蛊礼物更新
|
||||||
String prankListString = ctString.getString("prank_list");
|
String prankListString = ctString.getString("prank_list");
|
||||||
List<PrankProgressBean.PrankList> prankList = GsonUtils.fromJson(prankListString,new TypeToken<List<PrankProgressBean.PrankList>>() {}.getType());
|
List<PrankProgressBean.PrankList> prankList = GsonUtils.fromJson(prankListString, new TypeToken<List<PrankProgressBean.PrankList>>() {
|
||||||
|
}.getType());
|
||||||
// LogUtils.e("yqw=====>整蛊礼物数据2:"+prankList.toString());
|
// LogUtils.e("yqw=====>整蛊礼物数据2:"+prankList.toString());
|
||||||
prankAndComboList.clear();
|
prankAndComboList.clear();
|
||||||
prankAndComboList.addAll(prankList);
|
prankAndComboList.addAll(prankList);
|
||||||
|
|
||||||
String completedString = ctString.getString("completed_list");
|
String completedString = ctString.getString("completed_list");
|
||||||
List<PrankProgressBean.PrankList> completeds = GsonUtils.fromJson(completedString,new TypeToken<List<PrankProgressBean.PrankList>>() {}.getType());
|
List<PrankProgressBean.PrankList> completeds = GsonUtils.fromJson(completedString, new TypeToken<List<PrankProgressBean.PrankList>>() {
|
||||||
|
}.getType());
|
||||||
completedList.clear();
|
completedList.clear();
|
||||||
completedList.addAll(completeds);
|
completedList.addAll(completeds);
|
||||||
|
|
||||||
setPrankList(0,Integer.parseInt(ctString.getString("status")), Integer.parseInt(ctString.getString("prank_type")), Integer.parseInt(ctString.getString("prank_turntable_status")));
|
setPrankList(0, Integer.parseInt(ctString.getString("status")), Integer.parseInt(ctString.getString("prank_type")), Integer.parseInt(ctString.getString("prank_turntable_status")));
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
LogUtils.e("yqw=====>转换错误:"+e.getMessage());
|
LogUtils.e("yqw=====>转换错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPrankAdapter() {
|
private void initPrankAdapter() {
|
||||||
prankAdapter = new PrankAdapter(mContext);
|
prankAdapter = new PrankAdapter(mContext);
|
||||||
//整蛊礼物点击
|
//整蛊礼物点击
|
||||||
prankAdapter.addOnItemClickListener(new PrankAdapter.OnItemClickListener() {
|
prankAdapter.addOnItemClickListener(new PrankAdapter.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(View view, int giftId) {
|
public void onItemClick(View view, int giftId) {
|
||||||
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
openGiftDialog(String.valueOf(giftId));
|
openGiftDialog(String.valueOf(giftId));
|
||||||
@ -1925,67 +1930,68 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
L.e("onItemDel:"+giftId);
|
L.e("onItemDel:" + giftId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置整蛊礼物数据
|
//设置整蛊礼物数据
|
||||||
private void setPrankList(int isShow,int status,int mPrankType,int prankTurntableStatus){
|
private void setPrankList(int isShow, int status, int mPrankType, int prankTurntableStatus) {
|
||||||
this.mPrankType =mPrankType;
|
this.mPrankType = mPrankType;
|
||||||
// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE));
|
// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE));
|
||||||
if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){
|
if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE) {
|
||||||
if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (!CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
prank_group_turntable_icon.setVisibility(View.GONE);
|
prank_group_turntable_icon.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
// LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status);
|
// LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status);
|
||||||
if (status == 1){
|
if (status == 1) {
|
||||||
if(isShow==1){
|
if (isShow == 1) {
|
||||||
prank_group.setVisibility(View.VISIBLE);
|
prank_group.setVisibility(View.VISIBLE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
}else if(isShow==2){
|
} else if (isShow == 2) {
|
||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.VISIBLE);
|
prank_small_icon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
//主播可能打开整蛊功能,但是不设置整蛊礼物,这里会是空列表
|
//主播可能打开整蛊功能,但是不设置整蛊礼物,这里会是空列表
|
||||||
if (!prankAndComboList.isEmpty()){
|
if (!prankAndComboList.isEmpty()) {
|
||||||
initPrankAdapter();
|
initPrankAdapter();
|
||||||
recycler_prank.setAdapter(prankAdapter);
|
recycler_prank.setAdapter(prankAdapter);
|
||||||
if (mPrankType == 1){//礼物
|
if (mPrankType == 1) {//礼物
|
||||||
// sortByCompletionRate(prankAndComboList);
|
// sortByCompletionRate(prankAndComboList);
|
||||||
prankAdapter.setViewType(PrankAdapter.TYPE_GIFT);
|
prankAdapter.setViewType(PrankAdapter.TYPE_GIFT);
|
||||||
//prankAdapter.setList(prankAndComboList);
|
//prankAdapter.setList(prankAndComboList);
|
||||||
if(prankAnisShow){
|
if (prankAnisShow) {
|
||||||
prankAdapter.showAnView(completedList,prankAnisShow);
|
prankAdapter.showAnView(completedList, prankAnisShow);
|
||||||
prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do");
|
prank_group_title.setText(WordUtil.isNewZh() ? "待完成整蠱" : "To do");
|
||||||
prank_group_turntable.setText(WordUtil.isNewZh()?"整蠱進度":"progress");
|
prank_group_turntable.setText(WordUtil.isNewZh() ? "整蠱進度" : "progress");
|
||||||
if (!completedList.isEmpty()){
|
if (!completedList.isEmpty()) {
|
||||||
limitItem(1,Math.min(completedList.size(), 4));
|
limitItem(1, Math.min(completedList.size(), 4));
|
||||||
}else {
|
} else {
|
||||||
recycler_prank.setVisibility(View.GONE);
|
recycler_prank.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
prankAdapter.showAnView(prankAndComboList,prankAnisShow);
|
prankAdapter.showAnView(prankAndComboList, prankAnisShow);
|
||||||
prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"progress");
|
prank_group_title.setText(WordUtil.isNewZh() ? "整蠱進度" : "progress");
|
||||||
prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do");
|
prank_group_turntable.setText(WordUtil.isNewZh() ? "待完成整蠱" : "To do");
|
||||||
limitItem(1,Math.min(prankAndComboList.size(), 4));
|
limitItem(1, Math.min(prankAndComboList.size(), 4));
|
||||||
}
|
}
|
||||||
}else { //连击
|
} else { //连击
|
||||||
// sortBySendNum(prankAndComboList);
|
// sortBySendNum(prankAndComboList);
|
||||||
prank_group_title.setText(R.string.combo_vote);
|
prank_group_title.setText(R.string.combo_vote);
|
||||||
prankAdapter.setViewType(PrankAdapter.TYPE_COMBO);
|
prankAdapter.setViewType(PrankAdapter.TYPE_COMBO);
|
||||||
prankAdapter.setList(prankAndComboList);
|
prankAdapter.setList(prankAndComboList);
|
||||||
limitItem(2,Math.min(prankAndComboList.size(), 4));
|
limitItem(2, Math.min(prankAndComboList.size(), 4));
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
|
|
||||||
prank_top_layout.setOnClickListener(new View.OnClickListener() {
|
prank_top_layout.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -1996,24 +2002,24 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
prank_group_top_icon.setVisibility(View.VISIBLE);
|
prank_group_top_icon.setVisibility(View.VISIBLE);
|
||||||
if(mPrankType==1){
|
if (mPrankType == 1) {
|
||||||
prank_group_turntable.setVisibility(View.VISIBLE);
|
prank_group_turntable.setVisibility(View.VISIBLE);
|
||||||
}else{
|
} else {
|
||||||
prank_group_turntable.setVisibility(View.GONE);
|
prank_group_turntable.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
prank_group_bottom_icon.setVisibility(View.GONE);
|
prank_group_bottom_icon.setVisibility(View.GONE);
|
||||||
switchGifDrawable(!completedList.isEmpty());
|
switchGifDrawable(!completedList.isEmpty());
|
||||||
}else{
|
} else {
|
||||||
switchGifDrawable(false);
|
switchGifDrawable(false);
|
||||||
if(mPrankType==1){
|
if (mPrankType == 1) {
|
||||||
prank_group_title.setText(R.string.prank_progress);
|
prank_group_title.setText(R.string.prank_progress);
|
||||||
}else{
|
} else {
|
||||||
prank_group_title.setText(R.string.combo_vote);
|
prank_group_title.setText(R.string.combo_vote);
|
||||||
}
|
}
|
||||||
prank_group_turntable.setVisibility(View.GONE);
|
prank_group_turntable.setVisibility(View.GONE);
|
||||||
prank_group_top_icon.setVisibility(View.GONE);
|
prank_group_top_icon.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
prank_group.setVisibility(View.GONE);
|
prank_group.setVisibility(View.GONE);
|
||||||
prank_small_icon.setVisibility(View.GONE);
|
prank_small_icon.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -2033,12 +2039,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
//设置最多显示4个项目
|
//设置最多显示4个项目
|
||||||
private void limitItem(int prankType,int maxItem){
|
private void limitItem(int prankType, int maxItem) {
|
||||||
recycler_prank.post(() -> {
|
recycler_prank.post(() -> {
|
||||||
View itemView = recycler_prank.getChildAt(0);
|
View itemView = recycler_prank.getChildAt(0);
|
||||||
if (itemView != null){
|
if (itemView != null) {
|
||||||
int gap = prankType == 1 ? SizeUtils.dp2px(3f) : 0;
|
int gap = prankType == 1 ? SizeUtils.dp2px(3f) : 0;
|
||||||
int height = (itemView.getHeight() + gap)*maxItem;
|
int height = (itemView.getHeight() + gap) * maxItem;
|
||||||
ViewGroup.LayoutParams layoutParams = recycler_prank.getLayoutParams();
|
ViewGroup.LayoutParams layoutParams = recycler_prank.getLayoutParams();
|
||||||
layoutParams.height = height;
|
layoutParams.height = height;
|
||||||
recycler_prank.setLayoutParams(layoutParams);
|
recycler_prank.setLayoutParams(layoutParams);
|
||||||
@ -2046,12 +2052,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void switchGifDrawable(boolean start){
|
private void switchGifDrawable(boolean start) {
|
||||||
// LogUtils.e("yqw=====>判断闪烁:"+(mGifDrawable != null)+","+start);
|
// LogUtils.e("yqw=====>判断闪烁:"+(mGifDrawable != null)+","+start);
|
||||||
if (mGifDrawable != null){
|
if (mGifDrawable != null) {
|
||||||
if (start){
|
if (start) {
|
||||||
mGifDrawable.start();
|
mGifDrawable.start();
|
||||||
}else {
|
} else {
|
||||||
mGifDrawable.seekTo(0);
|
mGifDrawable.seekTo(0);
|
||||||
mGifDrawable.stop();
|
mGifDrawable.stop();
|
||||||
}
|
}
|
||||||
@ -2153,7 +2159,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
layoutParams.topMargin = DpUtil.dp2px(190);
|
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||||
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity||mContext instanceof LiveSwAnchorActivity) {
|
if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity || mContext instanceof LiveSwAnchorActivity) {
|
||||||
RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams();
|
||||||
layoutParamsredPacket.topMargin = DpUtil.dp2px(110);
|
layoutParamsredPacket.topMargin = DpUtil.dp2px(110);
|
||||||
redPacket.setLayoutParams(layoutParamsredPacket);
|
redPacket.setLayoutParams(layoutParamsredPacket);
|
||||||
@ -3687,8 +3693,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
ViewClicksAntiShake.clicksAntiShake(giftWall, new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(giftWall, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid + "",mAnchorName, true).setFullWindows(false).showDialog();
|
|
||||||
//Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.GIFT_WALL).setUid(mLiveUid).setVoicePress(true).setAvatar(mAvatarUrl).setUname(mAnchorName));
|
//Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.GIFT_WALL).setUid(mLiveUid).setVoicePress(true).setAvatar(mAvatarUrl).setUname(mAnchorName));
|
||||||
|
new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid, mAnchorName, true).setFullWindows(false).showDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -5081,7 +5087,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
countDownTimerTrickery.cancel();
|
countDownTimerTrickery.cancel();
|
||||||
countDownTimerTrickery = null;
|
countDownTimerTrickery = null;
|
||||||
lt_trickery.setVisibility(View.GONE);
|
lt_trickery.setVisibility(View.GONE);
|
||||||
if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (!CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
LiveNetManager.get(mContext).endPrankTurntable(mLiveUid, new com.yunbao.common.http.base.HttpCallback<BaseModel>() {
|
LiveNetManager.get(mContext).endPrankTurntable(mLiveUid, new com.yunbao.common.http.base.HttpCallback<BaseModel>() {
|
||||||
@ -5118,7 +5124,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
starTimeloud(2, time);
|
starTimeloud(2, time);
|
||||||
} else {
|
} else {
|
||||||
lt_trickery.setVisibility(View.GONE);
|
lt_trickery.setVisibility(View.GONE);
|
||||||
if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
if (!CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
|
||||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
timeOver();
|
timeOver();
|
||||||
|
Loading…
Reference in New Issue
Block a user