Merge remote-tracking branch 'origin/dev_6.7.0' into dev_6.7.0

This commit is contained in:
余前卫 2024-06-12 16:45:16 +08:00
commit d66f098692
33 changed files with 568 additions and 167 deletions

View File

@ -1243,4 +1243,17 @@ public interface PDLiveApi {
@Query("to_uid")String toUid,
@Query("payload")String payload
);
/**
*
* @param anchor_id
* @param gift_id
* @return
*/
@GET("/api/public/?service=Prank.anchorClickFinish")
Observable<ResponseModel<List<BaseModel>>> anchorClickFinish(
@Query("anchor_id")String anchor_id,
@Query("gift_id")String gift_id
);
}

View File

@ -3189,6 +3189,31 @@ public class LiveNetManager {
}
public void anchorClickFinish(String mLiveId, String giftId, HttpCallback<List<BaseModel>>callback) {
API.get().pdLiveApi(mContext)
.anchorClickFinish(mLiveId, giftId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
throwable.printStackTrace();
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void updateFile(File file, HttpCallback<AvatarBean> callback) {
MultipartBody.Part uploadFile = createUploadFile(file);
API.get().pdLiveApi(mContext)

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="320dp" />
<solid android:color="#FD2D48" />
</shape>

View File

@ -182,11 +182,35 @@
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="40dp"
android:layout_height="40dp">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/icon_zhenggu" />
<TextView
android:id="@+id/red_menu"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_marginTop="5dp"
android:layout_alignParentEnd="true"
android:background="@drawable/live_room_menu_red"
android:gravity="center"
android:includeFontPadding="false"
android:minWidth="14dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:textColor="#fff"
android:textSize="10sp"
android:translationY="-4dp"
android:visibility="gone" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -1353,11 +1353,11 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
<string name="interactive_game_search_room_bhe_game">Noonly enter the game</string>
<string name="interactive_game_rooms_oin">There are currently no rooms to join</string>
<string name="prank_switch">Turntable prank switch</string>
<string name="see_the_contents_of">After closing, all users will not be able to see the contents of the turntable</string>
<string name="diamonds_every_time">The turntable consumes diamonds every time</string>
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</string>
<string name="diamonds_every_time_requirement_of_hint">Fill in the content of the prankFill in a minimum of 2 words and a maximum of 10 words</string>
<string name="prank_switch">Turntable Trick Switch</string>
<string name="see_the_contents_of">After turning it on, all users will not be able to see the content of the carousel.</string>
<string name="diamonds_every_time">Each turn of the wheel consumes diamonds</string>
<string name="diamonds_every_time_requirement_of">Starting with at least 1000 diamonds</string>
<string name="diamonds_every_time_requirement_of_hint">Choose a gift</string>
<string name="prank_content_yet_hint">You have not set up the prank content yet</string>
<string name="choose_a_prank_gift">Choose a prank gift</string>
<string name="choose_a_prank_gift_hint">Enter the prank content...</string>

View File

@ -1499,4 +1499,5 @@
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
</resources>

View File

@ -1498,4 +1498,5 @@
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
</resources>

View File

@ -1495,5 +1495,6 @@
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
</resources>

View File

@ -1356,11 +1356,11 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
<string name="interactive_game_search_room_bhe_game">Noonly enter the game</string>
<string name="interactive_game_rooms_oin">There are currently no rooms to join</string>
<string name="prank_switch">Turntable prank switch</string>
<string name="see_the_contents_of">After closing, all users will not be able to see the contents of the turntable</string>
<string name="diamonds_every_time">The turntable consumes diamonds every time</string>
<string name="diamonds_every_time_requirement_of">Minimum requirement of 1000 diamonds</string>
<string name="diamonds_every_time_requirement_of_hint">Fill in the content of the prankFill in a minimum of 2 words and a maximum of 10 words</string>
<string name="prank_switch">Turntable Trick Switch</string>
<string name="see_the_contents_of">After turning it on, all users will not be able to see the content of the carousel.</string>
<string name="diamonds_every_time">Each turn of the wheel consumes diamonds</string>
<string name="diamonds_every_time_requirement_of">Starting with at least 1000 diamonds</string>
<string name="diamonds_every_time_requirement_of_hint">Choose a gift</string>
<string name="prank_content_yet_hint">You have not set up the prank content yet</string>
<string name="choose_a_prank_gift">Choose a prank gift</string>
<string name="choose_a_prank_gift_hint">Enter the prank content...</string>
@ -1504,4 +1504,5 @@ Limited ride And limited avatar frame</string>
<string name="dragon_rule6">2.Users who follow the anchor and participate in the activity will divide the gold beans of the activity after the countdown of five minutes ends;</string>
<string name="dragon_rule7">3.The final interpretation of this activity belongs to PDLIVE.</string>
<string name="main_type_theater" >Theater</string>
<string name="prank_complete">once</string>
</resources>

View File

@ -131,4 +131,10 @@
<item name="android:activityCloseEnterAnimation">@anim/out_to_right_abit</item>
<item name="android:activityCloseExitAnimation">@anim/out_to_right</item>
</style>
<style name="PrankTabLayoutTextStyle" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
<item name="android:textAllCaps">false</item>
</style>
</resources>

View File

@ -27,6 +27,6 @@ ext {
//
isUploadLog : true,
//
isPluginModel : true,
isPluginModel : false,
]
}

View File

@ -300,8 +300,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
ToastUtil.show(mContext.getString(R.string.live_push_failed));
}
});
}
private void initFaceManager() {
@ -380,8 +378,17 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
case Constants.LIVE_FUNC_ZG://zg
// ToastUtil.show("開發中,敬請期待");
LivePrankDialogFragment fragment = new LivePrankDialogFragment();
fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() {
@Override
public void OpenAndCloseListener() {
if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress();
}
}
});
fragment.setmLiveUid(mLiveUid);
fragment.show(getSupportFragmentManager(), "LivePrankDialogFragment");
mLiveAnchorViewHolder.closeMenuRed();
break;
case Constants.LIVE_FUNC_MIC://語音
//ToastUtil.show("開發中,敬請期待");
@ -700,6 +707,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime());
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed());
fragment.setArguments(bundle);
fragment.setFunctionClickListener(this);
fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment");
@ -871,6 +879,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
getAiRobotStatus();
MicedUserManager.get().removeAllMicUserList();
MicUserManager.get().removeAllMicUserList();
//加载整蛊
if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress();
}
}
/**
@ -1454,7 +1466,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override
public void onUpdatePrankProgress(String prankString) {
if (mLiveRoomViewHolder != null){
mLiveRoomViewHolder.refreshPrank(prankString);
}
}

View File

@ -235,6 +235,7 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
}
private String getChineseNum(int id) {
if(WordUtil.isNewZh()){
switch (id) {
case 1:
return "";
@ -249,6 +250,22 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
case 6:
return "";
}
}else{
switch (id) {
case 1:
return " No. 1";
case 2:
return " No. 2";
case 3:
return " No. 3";
case 4:
return " No. 4";
case 5:
return " No. 5";
case 6:
return " No. 6";
}
}
return "";
}
@ -271,17 +288,17 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter<LivePrankRecy
} else {
switch (id) {
case 1:
return "Extraction probability40%";
return "Chance of extraction: 40%";
case 2:
return "Extraction probability30%";
return "Chance of extraction: 30%";
case 3:
return "Extraction probability15%";
return "Chance of extraction: 15%";
case 4:
return "Extraction probability10%";
return "Chance of extraction: 10%";
case 5:
return "Extraction probability4%";
return "Chance of extraction: 4%";
default:
return "Extraction probability1%";
return "Chance of extraction: 1%";
}
}

View File

@ -6,6 +6,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -14,6 +15,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.bean.PrankProgressBean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.MarqueeTextView;
import com.yunbao.live.R;
import com.yunbao.live.views.LiveRoomViewHolder;
@ -25,6 +27,8 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
private List<PrankProgressBean.PrankList> mList = new ArrayList<>();
private Context mContext;
private boolean isAn;
public PrankAdapter(Context context){
mContext = context;
}
@ -35,6 +39,13 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
notifyDataSetChanged();
}
public void showAnView(List<PrankProgressBean.PrankList> list,boolean isAn){
this.isAn = isAn;
mList.clear();
mList.addAll(list);
notifyDataSetChanged();
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@ -54,6 +65,22 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
ImgLoader.display(mContext,data.getGift_icon(),holder.prank_item_icon);
holder.prank_item_progress.setMax(data.getGift_num());
holder.prank_item_progress.setProgress(data.getSend_num());
holder.an_prank_name.setText(WordUtil.isNewZh() ? data.getGift_name() : data.getGift_name_en());
holder.an_prank_remove.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onItemClickListener.onItemDel(data.getGift_id());
}
});
if(isAn){
holder.anLayout.setVisibility(View.VISIBLE);
holder.progressLayout.setVisibility(View.GONE);
holder.nameLayout.setVisibility(View.GONE);
}else{
holder.anLayout.setVisibility(View.GONE);
holder.progressLayout.setVisibility(View.VISIBLE);
holder.nameLayout.setVisibility(View.VISIBLE);
}
}
@Override
@ -65,6 +92,11 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
private TextView prank_item_subscript,prank_item_prank_name,prank_item_gift_name,prank_item_now_progress,prank_item_total_progress;
private ImageView prank_item_icon;
private ProgressBar prank_item_progress;
private LinearLayout anLayout;
private MarqueeTextView an_prank_name;
private TextView an_prank_remove;
private LinearLayout progressLayout;
private LinearLayout nameLayout;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
prank_item_subscript = itemView.findViewById(R.id.prank_item_subscript);
@ -74,6 +106,13 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
prank_item_total_progress = itemView.findViewById(R.id.prank_item_total_progress);
prank_item_icon = itemView.findViewById(R.id.prank_item_icon);
prank_item_progress = itemView.findViewById(R.id.prank_item_progress);
nameLayout = itemView.findViewById(R.id.nameLayout);
progressLayout = itemView.findViewById(R.id.progressLayout);
//主播
anLayout = itemView.findViewById(R.id.anLayout);
an_prank_name = itemView.findViewById(R.id.an_prank_name);
an_prank_remove = itemView.findViewById(R.id.an_prank_remove);
}
}
@ -81,6 +120,8 @@ public class PrankAdapter extends RecyclerView.Adapter<PrankAdapter.MyViewHolder
public interface OnItemClickListener {
void onItemClick(View view,int giftId);
void onItemDel(int giftId);
}
public void addOnItemClickListener(OnItemClickListener onItemClickListener){

View File

@ -55,7 +55,10 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
private String liveUid;
private TextView red_menu;
// boolean isRy = false;
private boolean isShowRed;
@Override
protected int getLayoutId() {
return R.layout.dialog_live_new_function;
@ -96,6 +99,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
// isRy = bundle.getBoolean("isRy", false);
mAnchorLiveTime = bundle.getLong("liveTime");
liveUid = bundle.getString("liveUid");
isShowRed = bundle.getBoolean("isShowZgRed");
}
mWishView = findViewById(R.id.live_tool_wish);
mPrankView = findViewById(R.id.live_tool_prank);
@ -108,6 +112,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
mMicView = findViewById(R.id.live_tool_mic);
mRandomPk = findViewById(R.id.live_tool_random_pk);
mLiveTimeTextView = (TextView) findViewById(R.id.live_time);
red_menu = (TextView) findViewById(R.id.red_menu);
mWishView.setOnClickListener(this);
mPrankView.setOnClickListener(this);
mWksView.setOnClickListener(this);
@ -138,6 +143,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
mLiveRoomHandler = new LiveRoomHandler();
mLiveTimeTextView.setText(StringUtil.getDurationText(mAnchorLiveTime));
startAnchorLiveTime();
red_menu.setVisibility(isShowRed?View.VISIBLE:View.GONE);
}
public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) {
@ -162,6 +168,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
mFunctionClickListener.onClick(LIVE_FUNC_WISHLIST);
} else if (id == R.id.live_tool_prank) {
mFunctionClickListener.onClick(LIVE_FUNC_ZG);
red_menu.setVisibility(View.GONE);
} else if (id == R.id.live_tool_wks) {
mFunctionClickListener.onClick(LIVE_FUNC_WKS);
} else if (id == R.id.live_tool_beauty) {

View File

@ -3,6 +3,7 @@ package com.yunbao.live.dialog;
import android.content.Context;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -27,6 +28,8 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
private TextView giftText;
private TextView numberText;
private EditText contentText;
private LinearLayout giftNumberLayout;
private boolean isShowGiftNumber = true;
private OnItemClickListener<PrankGiftBean> onItemClickListener;
@ -42,7 +45,8 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
}
public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> giftBeans) {
public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> giftBeans,boolean isShow) {
this.isShowGiftNumber = isShow;
this.giftBeans = giftBeans;
return this;
}
@ -68,6 +72,10 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
giftText = findViewById(R.id.gift_text);
numberText = findViewById(R.id.number_text);
contentText = findViewById(R.id.content_text);
giftNumberLayout= findViewById(R.id.giftNumberLayout);
if(isShowGiftNumber){
giftNumberLayout.setVisibility(VISIBLE);
}
ViewClicksAntiShake.clicksAntiShake(backBtn, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
@ -131,11 +139,18 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空" : "A trick gift can't be empty");
return;
}
if(isShowGiftNumber){
if (numberText.getTag()==null||StringUtil.isEmpty(prankContent)){
ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty");
return;
}
bean.setNum(Integer.parseInt(numberText.getText().toString()));
}else{
if (StringUtil.isEmpty(prankContent)){
ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty");
return;
}
}
bean.setTitle(prankContent);
onItemClickListener.onItemClick(bean,0);
dismiss();

View File

@ -69,6 +69,13 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
private TextView giftTypeTodoText;
private TextView giftTypeNowSwitchText;
private Button mBtnAddGift;
private ImageView help;
private onPrankResultListener onPrankResultListener;
public void setOnPrankResultListener(LivePrankDialogFragment.onPrankResultListener onPrankResultListener) {
this.onPrankResultListener = onPrankResultListener;
}
public void setmLiveUid(String mLiveUid) {
this.mLiveUid = mLiveUid;
@ -109,6 +116,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
private void initView() {
help = (ImageView) findViewById(R.id.help);
mTabLayout = (TabLayout) findViewById(R.id.prank_tabLayout);
mTurntableConfigLayout = findViewById(R.id.turntable_layout);
mGiftConfigLayout = findViewById(R.id.gift_layout);
@ -122,6 +130,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
mPrankRecyclerView.setAdapter(recyclerAdapter);
mCoinTextView.setOnClickListener(this);
mTurntableConfigImageView.setOnClickListener(this);
help.setOnClickListener(this);
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
mPrankBtn.setText("發送圖標");
} else {
@ -159,6 +168,15 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
giftBeans.remove(position);
recyclerAdapter.setList(giftBeans);
recyclerAdapter.notifyDataSetChanged();
if (giftBeans.size() < 6) {
mBtnAddGift.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.VISIBLE);
mPrankBtn.setVisibility(View.VISIBLE);
} else {
mBtnAddGift.setVisibility(View.GONE);
mGiftNotDate.setVisibility(View.GONE);
mPrankBtn.setVisibility(View.GONE);
}
}
}
});
@ -202,7 +220,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
if (mPrankBtn.getTag() != null && Integer.parseInt(mPrankBtn.getTag().toString()) == 0) {
SocketRyChatUtil.sendPrankIcon();
} else {
showGiftDialog();
}
}
});
@ -214,7 +232,6 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
} else {
setGiftBean(recyclerAdapter.getList());
}
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_clear), new ViewClicksAntiShake.ViewClicksCallBack() {
@ -223,9 +240,14 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
if ((int) mPrankBtn.getTag() == 0) {
clearPrankConfig();
} else {
giftSwitch1Btn.setTag("false");
giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off);
giftBeans = new ArrayList<>();
recyclerAdapter.setList(giftBeans);
recyclerAdapter.notifyDataSetChanged();
mPrankBtn.setVisibility(View.VISIBLE);
mBtnAddGift.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.VISIBLE);
}
}
});
@ -239,10 +261,9 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
turntable.setText("轉盤整蠱");
gift.setText("禮物整蠱");
} else {
turntable.setText("Turntable prank");
gift.setText("Gift prank");
turntable.setText("Turntable");
gift.setText("Gift");
}
turntable.setTag(0);
gift.setTag(1);
mTabLayout.addTab(turntable);
@ -261,6 +282,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
mBtnAddGift.setVisibility(View.GONE);
mGiftNotDate.setVisibility(View.GONE);
recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_TURNTABLE);
mPrankBtn.setVisibility(View.VISIBLE);
mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save);
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
mPrankBtn.setText("發送圖標");
@ -303,7 +325,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
private void showGiftDialog() {
LivePrankAddGiftDialog livePrankAddGiftDialog = new LivePrankAddGiftDialog(mContext).setGiftBeans(giftBeans);
LivePrankAddGiftDialog livePrankAddGiftDialog = new LivePrankAddGiftDialog(mContext).setGiftBeans(giftBeans, giftTypeNowText.getTag().equals("1"));
livePrankAddGiftDialog.setOnItemClickListener(new OnItemClickListener<PrankGiftBean>() {
@SuppressLint("NotifyDataSetChanged")
@Override
@ -314,9 +336,11 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
if (giftBeans.size() < 6) {
mBtnAddGift.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.VISIBLE);
mPrankBtn.setVisibility(View.VISIBLE);
} else {
mBtnAddGift.setVisibility(View.GONE);
mGiftNotDate.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.GONE);
mPrankBtn.setVisibility(View.GONE);
}
}
});
@ -330,8 +354,10 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
giftTypeNowText = (TextView) findViewById(R.id.gift_type_now_text);
giftTypeTodoText = (TextView) findViewById(R.id.gift_type_todo);
giftTypeNowSwitchText = (TextView) findViewById(R.id.gift_type_now_switch);
giftTypeNowText.setTag("2");
mBtnAddGift = (Button) findViewById(R.id.gift_add_btn);
mBtnAddGift.setVisibility(View.GONE);
mGiftNotDate.setVisibility(View.GONE);
ViewClicksAntiShake.clicksAntiShake(giftSwitch1Btn, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
@ -351,6 +377,12 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
CharSequence tmp = giftTypeNowText.getText();
giftTypeNowText.setText(giftTypeNowSwitchText.getText());
giftTypeNowSwitchText.setText(tmp);
if (giftTypeNowText.getTag().equals("1")) {
giftTypeNowText.setTag("2");
} else {
giftTypeNowText.setTag("1");
}
initGiftData();
}
});
ViewClicksAntiShake.clicksAntiShake(mBtnAddGift, new ViewClicksAntiShake.ViewClicksCallBack() {
@ -378,7 +410,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
private void setGiftBean(List<PrankGiftBean> prankGiftBeans) {
JSONArray prankJson = getJsonObjects(prankGiftBeans);
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true")?"1":"0", new Gson().toJson(prankJson), "1", new HttpCallback<PrankHttpTurntableBean>() {
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(), new HttpCallback<PrankHttpTurntableBean>() {
@Override
public void onSuccess(PrankHttpTurntableBean data) {
initGiftData();
@ -387,6 +419,10 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
} else {
ToastUtil.show("successful");
}
//通知主播刷新整蛊信息
if(onPrankResultListener!=null){
onPrankResultListener.OpenAndCloseListener();
}
}
@Override
@ -410,7 +446,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
private void initGiftData() {
LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, mPrankBtn.getTag().equals("0")?"2":"1",new HttpCallback<PrankGiftResultBean>() {
LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, giftTypeNowText.getTag().toString(), new HttpCallback<PrankGiftResultBean>() {
@Override
public void onSuccess(PrankGiftResultBean data) {
if (mPrankBtn.getTag().toString().equals("1")) {
@ -420,13 +456,21 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
mGiftNotDate.setVisibility(View.VISIBLE);
} else {
mBtnAddGift.setVisibility(View.GONE);
mGiftNotDate.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.GONE);
mPrankBtn.setVisibility(View.GONE);
}
mPrankRecyclerView.setVisibility(View.VISIBLE);
recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT);
giftBeans = data.getPrank_list();
recyclerAdapter.setList(giftBeans);
recyclerAdapter.notifyDataSetChanged();
if (data.getStatus().equals("1")) {
giftSwitch1Btn.setTag("true");
giftSwitch1Btn.setImageResource(R.mipmap.special_icon_on);
} else {
giftSwitch1Btn.setTag("false");
giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off);
}
}
}
@ -491,17 +535,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
return;
}
LiveNetManager.get(mContext).setAnchorPrankTurntable(
mLiveUid,
bean.getCoin() + "",
bean.getTurntable1(),
bean.getTurntable2(),
bean.getTurntable3(),
bean.getTurntable4(),
bean.getTurntable5(),
bean.getTurntable6(),
bean.getStatus() + "",
new HttpCallback<Object>() {
LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback<Object>() {
@Override
public void onSuccess(Object data) {
@ -520,8 +554,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
ToastUtil.show("Save failed" + error);
}
}
}
);
});
}
@Override
@ -572,7 +605,13 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
});
}
} else if (id == R.id.help) {
LivePrankExplainDialog livePrankExplainDialog = new LivePrankExplainDialog(mContext);
livePrankExplainDialog.showDialog();
}
}
}
public interface onPrankResultListener{
void OpenAndCloseListener();
}
}

View File

@ -2,35 +2,18 @@ package com.yunbao.live.dialog;
import android.content.Context;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.dialog.AbsDialogPopupWindow;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
public class LivePrankExplainDialog extends AbsDialogPopupWindow {
TextView content;
String contentText = "<font color=\"#FFFFFF\">" +
"1、當前整蠱分類有哪些</font> <font color=\"#FFFFFF\"> 當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。" +
"</font> <font color=\"\">" +
"2、轉盤整蠱如何填寫</font> <font color=\"#F9B003\">\n" +
"打開開關→設置價格→填寫6個整蠱→保存設置。\n" +
"\n" +
"</font> <font color=\"#FFFFFF\">注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。\n</font><font color=\"#FFFFFF\">" +
"3、禮物整蠱如何填寫</font> <font color=\"#F9B003\">\n" +
"當前分爲禮物數達成整蠱和連擊數最高整蠱。\n" +
"\n" +
"禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。\n" +
"\n" +
"連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。\n</font><font color=\"\">" +
"4、整蠱如何填寫</font> <font color=\"\">\n" +
"根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。\n</font><font color=\"\">" +
"5、我怎麽知道該做哪些整蠱</font> <font color=\"\">\n" +
"系統將發送消息至彈幕;\n" +
"你需要做的整蠱會自動挂起。</font>";
public LivePrankExplainDialog(@NonNull Context context) {
super(context);
}
@ -42,7 +25,7 @@ public class LivePrankExplainDialog extends AbsDialogPopupWindow {
@Override
public int bindLayoutId() {
return R.layout.dialog_live_prank_add_gift_number;
return R.layout.dialog_live_prank_explain;
}
@Override
@ -58,6 +41,70 @@ public class LivePrankExplainDialog extends AbsDialogPopupWindow {
void initView() {
content = findViewById(R.id.content);
content.setText(Html.fromHtml(contentText));
findViewById(R.id.back).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
}
});
StringBuffer stringBuffer = new StringBuffer();
if(WordUtil.isNewZh()){
stringBuffer.append(getHtmlContent(true,"1、當前整蠱分類有哪些","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"2、轉盤整蠱如何填寫","\"#F9B003\"",false));
stringBuffer.append(getHtmlContent(false,"打開開關→設置價格→填寫6個整蠱→保存設置。","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(false,"注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"3、禮物整蠱如何填寫","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"當前分爲禮物數達成整蠱和連擊數最高整蠱。","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(false,"禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(false,"連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(true,"4、整蠱如何填寫","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"5、我怎麽知道該做哪些整蠱","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"系統將發送消息至彈幕;","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"你需要做的整蠱會自動挂起。","\"#FFFFFF\"",false));
}else{
stringBuffer.append(getHtmlContent(true,"1. What are the current categories of pranks?","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"Currently it is divided into turntable tricking and gift tricking. It can be decided according to the actual situation, for example, setting both or only one type.","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"2. How to fill in the turntable trick?","\"#F9B003\"",false));
stringBuffer.append(getHtmlContent(false,"Turn on the switch → set the price → fill in 6 tricks → save the settings.","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(false,"Note: If someone initiates a trick, you will be prompted to complete the trick. If someone spends diamonds to save you during this period, you do not need to complete the trick.","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"3. How to fill in the gift form?","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"Currently, it is divided into the number of gifts to reach Tricky and the number of combos to reach Tricky.","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(false,"The number of gifts reaches Trick: turn on the switch → select the gift → fill in the quantity → fill in the trick → save the settings.","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(false,"The trick with the highest number of combos: turn on the switch → switch → select the gift → fill in the trick → save the settings.","\"#F9B003\"",true));
stringBuffer.append(getHtmlContent(true,"4. How to fill in Tricky?","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"Decide based on your actual situation. For example: singing, dancing, love letters, squatting, eating spicy food or any other talent.","\"#FFFFFF\"",true));
stringBuffer.append(getHtmlContent(true,"5. How do I know which tricks to do?","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"The system will send a message to the barrage;","\"#FFFFFF\"",false));
stringBuffer.append(getHtmlContent(false,"The tricks you need to do will automatically hang.","\"#FFFFFF\"",false));
}
content.setText(Html.fromHtml(stringBuffer.toString()));
}
public String getHtmlContent(boolean isTitle, String content, String color, boolean linebreak) {
StringBuffer result = new StringBuffer();
if (isTitle) {
result.append("<br><b><font color=" + color + ">");
result.append(content);
result.append("</br></b></font>");
} else {
result.append("<br><font color=" + color + ">");
result.append(content);
result.append("</br></font>");
}
if (linebreak) {
result.append("<br></br>");
}
return result.toString();
}
}

View File

@ -296,8 +296,10 @@ public class SocketRyClient {
case Constants.PrankSendData:
//整蛊礼物刷新
L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新");
if (map.getIntValue("action") == 13 && map.getString("msgtype").equals("4")){
String ctString = map.getString("ct");
L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新 "+ctString);
JsonElement jsonElement = JsonParser.parseString(ctString);
if (jsonElement == null) break;
// LogUtils.e("yqw=====>整蛊礼物列表:"+ctString);

View File

@ -54,6 +54,9 @@ import com.bumptech.glide.load.resource.gif.GifDrawable;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.reflect.TypeToken;
import com.lxj.xpopup.XPopup;
import com.makeramen.roundedimageview.RoundedImageView;
@ -66,6 +69,7 @@ import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.bean.PrankProgressBean;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
@ -406,12 +410,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//整蛊进度列表功能
private View prank_group;
private TextView prank_group_title,prank_group_turntable;
public TextView prank_group_title,prank_group_turntable;
private RecyclerView recycler_prank;
private ImageView prank_group_bottom_icon,prank_group_turntable_icon,prank_small_icon;
private PrankAdapter prankAdapter;
private ComboAdapter comboAdapter;
private List<PrankProgressBean.PrankList> prankAndComboList = new ArrayList<>();
private JsonElement completedList = new JsonArray();
private boolean prankAnisShow;
public LiveRoomViewHolder setGuardType(int guardType) {
this.guardType = guardType;
@ -1650,10 +1657,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
prank_group_bottom_icon = (ImageView) findViewById(R.id.prank_group_bottom_icon);//收起icon
prank_group_turntable_icon = (ImageView) findViewById(R.id.prank_group_turntable_icon);//转盘图标
prank_small_icon = (ImageView) findViewById(R.id.prank_small_icon);//收起后图标
//点击文字转盘整蛊(跳转转盘整蛊)
prank_group_turntable.setOnClickListener(v->{
prankAnisShow = !prankAnisShow;
List<PrankProgressBean.PrankList> tempList = new ArrayList<>();
for (int i = 0; i <prankAndComboList.size(); i++) {
if(prankAndComboList.get(i).getCompleted_num()!=0){
tempList.add(prankAndComboList.get(i));
}
}
if(prankAnisShow){
prankAdapter.showAnView(tempList,prankAnisShow);
}else{
prankAdapter.showAnView(prankAndComboList,prankAnisShow);
}
L.e("prankAnisShow:"+prankAnisShow);
});
//点击收起
@ -1680,9 +1698,27 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
comboAdapter = new ComboAdapter(mContext);
//整蛊礼物点击
prankAdapter.addOnItemClickListener((view, giftId) -> {
// LogUtils.e("yqw=====>点击整蛊礼物:"+giftId);
prankAdapter.addOnItemClickListener(new PrankAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int giftId) {
openGiftDialog(String.valueOf(giftId));
}
@Override
public void onItemDel(int giftId) {
LiveNetManager.get(mContext).anchorClickFinish(mLiveUid, String.valueOf(giftId), new com.yunbao.common.http.base.HttpCallback<List<BaseModel>>() {
@Override
public void onSuccess(List<BaseModel> data) {
}
@Override
public void onError(String error) {
}
});
L.e("onItemDel:"+giftId);
}
});
//连击投票礼物点击
@ -1692,6 +1728,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
});
}
//初始化整蛊列表进度
public void initPrankProgress(){
// LogUtils.e("yqw=====>主播id:"+mLiveUid);
@ -1715,8 +1753,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
});
}
//刷新整蛊礼物列表
public void refreshPrank(String newPrankData){
try {
@ -1765,6 +1801,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
sortByCompletionRate(prankAndComboList);
prankAdapter.setList(prankAndComboList);
recycler_prank.setAdapter(prankAdapter);
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
prank_group_turntable.setVisibility(View.VISIBLE);
}else{
prank_group_turntable.setVisibility(View.GONE);
}
}else {
sortBySendNum(prankAndComboList);
comboAdapter.setList(prankAndComboList);

View File

@ -85,6 +85,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
private TextView mLiveTimeTextView;//主播的直播时长
private long mAnchorLiveTime;//主播直播时间
private LiveRoomHandler mLiveRoomHandler;
private TextView menuRed;
public LiveRyAnchorViewHolder(Context context, ViewGroup parentView) {
super(context, parentView);
@ -187,6 +188,8 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
mLiveTimeTextView = (TextView) findViewById(R.id.live_time);
mLiveTimeTextView.setVisibility(View.VISIBLE);
mLiveRoomHandler = new LiveRoomHandler();
menuRed = (TextView) findViewById(R.id.red_menu);
}
private Map<String, String> yaoqing = new HashMap<>();
@ -649,4 +652,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
}
return now + time + -now % 1000;
}
public void closeMenuRed(){
menuRed.setVisibility(View.GONE);
}
public boolean isShowMenuRed(){
return menuRed.getVisibility()==View.VISIBLE;
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="5dp"/>
<solid android:color="#FFF6E1"/>
</shape>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="6dp"/>
<solid android:color="#8065615A"/>
<solid android:color="#FFC949"/>
</shape>

View File

@ -16,6 +16,7 @@
app:tabIndicator="@drawable/random_pk_shape_tab_indicator"
app:tabIndicatorColor="#F6F7FB"
app:tabIndicatorFullWidth="false"
app:tabTextAppearance="@style/PrankTabLayoutTextStyle"
app:tabMaxWidth="100dp"
app:tabMode="scrollable"
app:tabSelectedTextColor="#F6F7FB"

View File

@ -65,11 +65,11 @@
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="16dp"
android:gravity="center"
android:gravity="center|left"
android:text= "@string/live_prank_gift_add_gift"
android:textColor="#FFFFFF"
android:textSize="14sp" />
@ -83,7 +83,7 @@
android:drawableEnd="@mipmap/ic_prank_gift_add_gift_to"
android:ems="10"
android:gravity="start|center"
android:hint="@string/diamonds_every_time_requirement_of_hint"
android:hint="@string/live_prank_gift_add_gift_select"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
@ -97,17 +97,19 @@
<LinearLayout
android:id="@+id/giftNumberLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="16dp"
android:gravity="center"
android:gravity="center|left"
android:text="@string/live_prank_gift_add_gift_number"
android:textColor="#FFFFFF"
android:textSize="14sp" />
@ -140,11 +142,11 @@
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="16dp"
android:gravity="center"
android:gravity="center|left"
android:text="@string/live_prank_gift_add_gift_content"
android:textColor="#FFFFFF"
android:textSize="14sp" />

View File

@ -1,22 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="330dp"
android:layout_height="400dp"
android:orientation="vertical"
android:paddingBottom="20dp"
android:background="#000002">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/alive_prank_gift_dialog_explain"
android:textColor="#FFFFFF"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/back"
@ -24,23 +18,36 @@
android:layout_height="18dp"
android:layout_marginStart="16dp"
android:layout_marginTop="18dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/icon_back" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginRight="18dp"
android:gravity="center_horizontal"
android:text="@string/alive_prank_gift_dialog_explain"
android:textColor="#FFFFFF"
android:textSize="16sp" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp">
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title">
android:orientation="vertical">
</TextView>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</LinearLayout>

View File

@ -20,7 +20,10 @@
android:textSize="8sp"/>
<LinearLayout
android:id="@+id/nameLayout"
android:layout_width="match_parent"
android:visibility="visible"
tools:visibility="gone"
android:layout_height="16dp"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
@ -63,9 +66,12 @@
</LinearLayout>
<LinearLayout
android:id="@+id/progressLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:visibility="visible"
tools:visibility="gone"
android:layout_marginEnd="3dp"
android:orientation="horizontal">
@ -101,4 +107,39 @@
</LinearLayout>
<LinearLayout
android:id="@+id/anLayout"
android:layout_margin="5dp"
android:visibility="gone"
android:gravity="center_vertical"
tools:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/an_prank_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:marqueeRepeatLimit="marquee_forever"
android:fontFamily="sans-serif-condensed-medium"
android:textColor="@color/white"
android:textSize="8sp"
android:text="跳舞跳舞跳"/>
<TextView
android:id="@+id/an_prank_remove"
android:layout_width="20dp"
android:text="@string/prank_complete"
android:layout_marginLeft="5dp"
android:gravity="center"
android:paddingBottom="1dp"
android:textColor="#372B2B"
android:background="@drawable/bg_prank_an_once"
android:textSize="6dp"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>

View File

@ -22,7 +22,7 @@
android:layout_marginTop="10dp"
android:orientation="vertical"
android:visibility="visible"
tools:visibility="gone">
tools:visibility="visible">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/turntable_config_layout"
@ -41,14 +41,16 @@
<TextView
android:id="@+id/switch1_desc_text"
android:layout_width="300dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:ellipsize="end"
android:singleLine="true"
android:layout_marginEnd="10dp"
android:maxLines="2"
android:text="@string/see_the_contents_of"
android:textColor="#B3B3B3"
android:textSize="10sp"
app:layout_constraintEnd_toStartOf="@+id/switch1_btn"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/switch1_title_text" />
@ -70,13 +72,15 @@
<TextView
android:id="@+id/switch2_title_text"
android:layout_width="270dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:ellipsize="end"
android:singleLine="true"
android:layout_marginEnd="10dp"
android:maxLines="2"
android:text="@string/diamonds_every_time"
android:textColor="#FFFFFF"
app:layout_constraintEnd_toStartOf="@+id/switch2_btn"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -116,7 +120,7 @@
android:layout_marginTop="10dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
tools:visibility="gone">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gift_config_layout"
@ -143,6 +147,7 @@
android:text="@string/live_prank_switch_info"
android:textColor="#B3B3B3"
android:textSize="10sp"
app:layout_constraintRight_toLeftOf="@+id/gift_switch1_btn"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/gift_switch1_title_text" />
@ -188,7 +193,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginStart="10dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
android:drawableEnd="@mipmap/ic_prank_gift_switch"
android:text="@string/live_prank_dialog_gift_type_number"

View File

@ -2400,6 +2400,7 @@
<include
android:id="@+id/prank_group"
android:visibility="gone"
tools:visibility="visible"
layout="@layout/view_prank_group"/>
<ImageView
@ -2417,6 +2418,7 @@
android:layout_gravity="end"
android:visibility="gone"
android:layout_marginBottom="5dp"
tools:visibility="visible"
android:layout_marginEnd="16dp"
android:layout_width="44dp"
android:layout_height="46dp"/>

View File

@ -53,6 +53,7 @@
android:background="@drawable/bg_prank_bottom_detail"
android:visibility="gone"
android:padding="3dp"
tools:visibility="visible"
android:textSize="8sp"
android:ellipsize="end"
android:singleLine="true"

View File

@ -250,5 +250,24 @@
app:dt_left_drawable="@drawable/bg_push_time_point"
app:dt_left_height="4dp"
app:dt_left_width="4dp" />
<TextView
android:id="@+id/red_menu"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_alignTop="@id/btn_function"
android:layout_alignRight="@id/btn_function"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/live_room_menu_red"
android:gravity="center"
android:includeFontPadding="false"
android:minWidth="14dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:textColor="#fff"
android:textSize="10sp"
android:translationY="-4dp"
android:visibility="visible" />
</RelativeLayout>
</LinearLayout>

View File

@ -123,17 +123,24 @@
<string name="details">Details></string>
<string name="combo_vote">Combo</string>
<string name="combo_vote_more">Most first</string>
<string name="live_prank_dialog_save">Clear</string>
<string name="live_prank_dialog_clear">Save</string>
<string name="live_prank_dialog_save">Save</string>
<string name="live_prank_dialog_clear">Clear</string>
<string name="live_prank_dialog_gift_type_todo">Switch to</string>
<string name="live_prank_dialog_gift_type_number">Highest combo</string>
<string name="live_prank_dialog_gift_type_number">highest combo</string>
<string name="live_prank_dialog_gift_type_achieved">Quantity achieved</string>
<string name="live_prank_switch">gift trick switch</string>
<string name="live_prank_switch_info">After closing, the user cannot see the gift trick</string>
<string name="live_prank_add_gift">+ Add gift trick</string>
<string name="live_prank_gift_tips">You can add up to 6, and it is recommended to add 4.</string>
<string name="live_prank_gift_add_title">Add gift</string>
<string name="live_prank_gift_add_gift">Gift</string>
<string name="live_prank_gift_add_gift_select">Choose a gift</string>
<string name="live_prank_gift_add_gift_number">Quantity</string>
<string name="live_prank_gift_add_gift_number_select">Fill in the number</string>
<string name="live_prank_gift_add_gift_content">Content</string>
<string name="live_prank_gift_add_gift_contnet_select">Please enter prank content, such as a dance.</string>
<string name="alive_prank_gift_add_gift_content_sub">Confirm</string>
<string name="alive_prank_gift_add_gift_content_sub">confirm</string>
<string name="alive_prank_gift_dialog_number_title">Quantity</string>
<string name="live_prank_gift_dialog_number_btn">+ Set other quantity (up to 9999)</string>
<string name="alive_prank_gift_dialog_explain">Trick instructions</string>

View File

@ -136,7 +136,7 @@
<string name="live_prank_gift_dialog_number_btn">+ 設置其他數量(最多9999)</string>
<string name="prank_progress">整蠱進度</string>
<string name="turntable_prank">轉盤整蠱</string>
<string name="turntable_prank">待完成整蠱</string>
<string name="details">詳情></string>
<string name="combo_vote">連擊投票</string>
<string name="combo_vote_more">連擊最多優先</string>