1:修改拍卖房转盘问题
2:添加转盘参数竞拍问题
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<activity android:name=".activity.RedResultActivity"
|
||||
android:exported="true"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.example.moduleroom.activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.adapter.RedAdapter;
|
||||
import com.example.moduleroom.contacts.RedEnvelopesContacts;
|
||||
import com.example.moduleroom.databinding.FragmentRedBinding;
|
||||
import com.example.moduleroom.fragment.RedViewModel;
|
||||
import com.example.moduleroom.presenter.RedEnvelopesPresenter;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/9/29
|
||||
*@description:红包最终的展示页面
|
||||
*/
|
||||
@Route(path = ARouteConstants.ROOM_RED_RESULT)
|
||||
public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, FragmentRedBinding> implements RedEnvelopesContacts.View {
|
||||
|
||||
private RedViewModel mViewModel;
|
||||
private RedAdapter redAdapter;
|
||||
private int page=1;
|
||||
|
||||
public static RedResultActivity newInstance() {
|
||||
return new RedResultActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RedEnvelopesPresenter bindPresenter() {
|
||||
return new RedEnvelopesPresenter( this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
redAdapter = new RedAdapter();
|
||||
mBinding.recyclerView.setAdapter(redAdapter);
|
||||
// 确保最后一项完全可见
|
||||
mBinding.recyclerView.setClipToPadding(false);
|
||||
mBinding.recyclerView.setPadding(
|
||||
0,
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_12),
|
||||
0,
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_12)
|
||||
);
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
page=1;
|
||||
// MvpPre.getRoomHourRanking(page+"", "20");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
// MvpPre.getRoomHourRanking(page+"", "20");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_red;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,23 +11,13 @@ import android.content.pm.ActivityInfo
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.*
|
||||
import android.text.Spannable
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.TextUtils
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.util.Log
|
||||
import android.view.GestureDetector
|
||||
import android.view.Gravity
|
||||
import android.view.KeyEvent
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.*
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Button
|
||||
import android.widget.EditText
|
||||
@@ -48,28 +38,11 @@ import com.blankj.utilcode.util.ThreadUtils
|
||||
import com.blankj.utilcode.util.TimeUtils
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.example.moduleroom.R
|
||||
|
||||
import com.example.moduleroom.contacts.RoomContacts
|
||||
import com.example.moduleroom.databinding.ActivityRoomBinding
|
||||
|
||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet
|
||||
import com.example.moduleroom.dialog.*
|
||||
import com.example.moduleroom.dialog.ExitRoomBottomSheet.OnOptionSelectedListener
|
||||
import com.example.moduleroom.dialog.FriendsDialogFragment
|
||||
import com.example.moduleroom.dialog.HourlyChartDialog
|
||||
import com.example.moduleroom.dialog.PublishCommentDialogFragment
|
||||
import com.example.moduleroom.dialog.RequestDialogFragment
|
||||
import com.example.moduleroom.dialog.RoomGiftDialogFragment
|
||||
import com.example.moduleroom.dialog.RoomMessageDialogFragment
|
||||
import com.example.moduleroom.dialog.RoomOnlineDialogFragment
|
||||
import com.example.moduleroom.dialog.RoomPkDialogFragment
|
||||
import com.example.moduleroom.dialog.RoomSettingFragment
|
||||
import com.example.moduleroom.dialog.SoundEffectsDialogFragment
|
||||
import com.example.moduleroom.fragment.PublicScreenEaseChatFragment
|
||||
import com.example.moduleroom.fragment.RoomCabinFragment
|
||||
import com.example.moduleroom.fragment.RoomChartsFragment
|
||||
import com.example.moduleroom.fragment.RoomFragment
|
||||
import com.example.moduleroom.fragment.RoomNoticeDialogFragment
|
||||
import com.example.moduleroom.fragment.RoomPasswordSetDialogFragment
|
||||
import com.example.moduleroom.fragment.*
|
||||
import com.example.moduleroom.presenter.RoomPresenter
|
||||
import com.example.moduleroom.service.ForegroundService
|
||||
import com.example.moduleroom.service.RoomPlayService
|
||||
@@ -89,46 +62,20 @@ import com.xscm.moduleutil.base.AppStateListener
|
||||
import com.xscm.moduleutil.base.AppStateManager
|
||||
import com.xscm.moduleutil.base.CommonAppContext
|
||||
import com.xscm.moduleutil.base.RoomManager
|
||||
import com.xscm.moduleutil.bean.GiftBean
|
||||
import com.xscm.moduleutil.bean.HeadlineBean
|
||||
import com.xscm.moduleutil.bean.RoomCharmRankBean
|
||||
import com.xscm.moduleutil.bean.RoomInputEvent
|
||||
import com.xscm.moduleutil.bean.RoomMessageEvent
|
||||
import com.xscm.moduleutil.bean.*
|
||||
import com.xscm.moduleutil.bean.RoomMessageEvent.T
|
||||
import com.xscm.moduleutil.bean.RoomMessageEvent.text
|
||||
import com.xscm.moduleutil.bean.RoomSettingEvent
|
||||
import com.xscm.moduleutil.bean.RoomSingleton
|
||||
import com.xscm.moduleutil.bean.UserInfo
|
||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean
|
||||
import com.xscm.moduleutil.bean.room.*
|
||||
import com.xscm.moduleutil.bean.room.FriendInfo.HeartList
|
||||
import com.xscm.moduleutil.bean.room.FriendUserBean
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionListBean
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionUserBean
|
||||
import com.xscm.moduleutil.bean.room.RoomBean
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp
|
||||
import com.xscm.moduleutil.bean.room.RoomOnline
|
||||
import com.xscm.moduleutil.bean.room.RoomOnlineBean
|
||||
import com.xscm.moduleutil.bean.room.RoomOwnerBean
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||
import com.xscm.moduleutil.bean.room.RoomUserBean
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog
|
||||
import com.xscm.moduleutil.dialog.RechargeDialogFragment
|
||||
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryDialog
|
||||
import com.xscm.moduleutil.dialog.giftLottery.TourClubDialogFragment
|
||||
import com.xscm.moduleutil.event.ColoseCardEvent
|
||||
import com.xscm.moduleutil.event.EffectEvent
|
||||
import com.xscm.moduleutil.event.MusicEvent
|
||||
import com.xscm.moduleutil.event.QXRoomSeatViewType
|
||||
import com.xscm.moduleutil.event.RoomGiftGiveEvent
|
||||
import com.xscm.moduleutil.event.RoomInputHideEvent
|
||||
import com.xscm.moduleutil.event.RoomJoinMountModel
|
||||
import com.xscm.moduleutil.event.RoomOutEvent
|
||||
import com.xscm.moduleutil.event.RoomTaskEvent
|
||||
import com.xscm.moduleutil.event.*
|
||||
import com.xscm.moduleutil.event.RoomWheatEvent
|
||||
import com.xscm.moduleutil.event.SurfaceEvent
|
||||
import com.xscm.moduleutil.event.UnreadCountEvent
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.interfaces.OnMusicItemClickListener
|
||||
@@ -137,16 +84,9 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton.OnMessageReceivedLi
|
||||
import com.xscm.moduleutil.rtc.AgoraManager
|
||||
import com.xscm.moduleutil.rtc.MusicPlayBean
|
||||
import com.xscm.moduleutil.service.MyRoomSingleton
|
||||
import com.xscm.moduleutil.utils.ARouteConstants
|
||||
import com.xscm.moduleutil.utils.ColorManager
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
import com.xscm.moduleutil.utils.SystemUtils
|
||||
import com.xscm.moduleutil.widget.CircularProgressView
|
||||
import com.xscm.moduleutil.widget.CustomMusicFloatingView
|
||||
import com.xscm.moduleutil.widget.QXGiftPlayerManager
|
||||
import com.xscm.moduleutil.widget.SilentCountDownTimer
|
||||
import com.xscm.moduleutil.widget.ViewUtils
|
||||
import com.xscm.moduleutil.utils.*
|
||||
import com.xscm.moduleutil.view.QXRedBagSendView
|
||||
import com.xscm.moduleutil.widget.*
|
||||
import com.xscm.moduleutil.widget.ViewUtils.OnViewCreatedListener
|
||||
import com.xscm.moduleutil.widget.floatingView.Floa
|
||||
import io.agora.musiccontentcenter.Music
|
||||
@@ -159,8 +99,7 @@ import pub.devrel.easypermissions.EasyPermissions
|
||||
import pub.devrel.easypermissions.EasyPermissions.PermissionCallbacks
|
||||
import java.lang.ref.WeakReference
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.Arrays
|
||||
import java.util.Date
|
||||
import java.util.*
|
||||
import java.util.stream.Collectors
|
||||
|
||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||
@@ -915,6 +854,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 发红包
|
||||
fun redDialogView(){
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).navigation();
|
||||
|
||||
RedBagSendDialog(this).show()
|
||||
// 在Activity中使用
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
floatingMagnetView = findViewById(R.id.flaoat)
|
||||
@@ -977,6 +925,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
val fragment = HourlyChartDialog.newInstance()
|
||||
fragment.show(supportFragmentManager, "HourlyChartDialog")
|
||||
}
|
||||
|
||||
mBinding!!.drvRed.visibility = View.GONE
|
||||
mBinding!!.redBj.setOnClickListener {
|
||||
val redListDialog = RedListDialog(this)
|
||||
redListDialog.show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun onGiftGiveProgressClcik() {
|
||||
@@ -997,6 +951,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
override fun onNext(auctionListBean: AuctionListBean) {
|
||||
if (auctionListBean == null) {
|
||||
// 处理空响应
|
||||
Log.e("RoomActivity", "AuctionListBean is null")
|
||||
hideGiftGiveProgress()
|
||||
return
|
||||
}
|
||||
showGiftGiveProgress()
|
||||
}
|
||||
|
||||
@@ -3226,7 +3186,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
val text = etContent.text.toString()
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
ToastUtils.show("发送消息不哪呢过为空")
|
||||
ToastUtils.show("发送消息不能为空")
|
||||
return@OnClickListener
|
||||
}
|
||||
EventBus.getDefault().post(RoomInputEvent(text))
|
||||
@@ -4314,7 +4274,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
stopkeepLiveService() //停止service
|
||||
CommonAppContext.getInstance().onlineMap.clear()
|
||||
|
||||
ImageUtils.clearDiskCache(this)
|
||||
// ImageUtils.clearDiskCache(this)
|
||||
} catch (e: Exception) {
|
||||
LogUtils.e("cleanupResources error: " + e.message)
|
||||
}
|
||||
|
||||
@@ -483,8 +483,8 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
if (shouldAddToAdapter(data)) {
|
||||
super.addData(data);
|
||||
// 确保适配器数据量也不超过限制
|
||||
if (mData.size() > 20) {
|
||||
int removeCount = mData.size() - 20;
|
||||
if (mData.size() > 100) {
|
||||
int removeCount = mData.size() - 100;
|
||||
mData.subList(0, removeCount).clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
@@ -515,8 +515,8 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
}
|
||||
|
||||
private void trimListToMaxSize(List<EMMessageInfo> list) {
|
||||
if (list.size() > 20) {
|
||||
int removeCount = list.size() - 20;
|
||||
if (list.size() > 100) {
|
||||
int removeCount = list.size() - 100;
|
||||
list.subList(0, removeCount).clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
}
|
||||
|
||||
public int getSelectCount() {
|
||||
int count = 1;
|
||||
int count = 0;
|
||||
List<RewardUserBean> data = getData();
|
||||
for (RewardUserBean item : data) {
|
||||
if (!item.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.moduleroom.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
import com.xscm.moduleutil.bean.room.RedResultBean;
|
||||
import com.xscm.moduleutil.bean.room.RoomHourBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class RedAdapter extends BaseQuickAdapter<RedResultBean.RedBean, BaseViewHolder> {
|
||||
public RedAdapter() {
|
||||
super(R.layout.item_red);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, RedResultBean.RedBean redBean) {
|
||||
ImageUtils.loadHeadCC(redBean.getRedUserAvatar(), baseViewHolder.getView(R.id.red_user_avatar));
|
||||
baseViewHolder.setText(R.id.tv_user_name, redBean.getRedUserName());
|
||||
baseViewHolder.setText(R.id.tv_red_num, redBean.getRedNum()+"");
|
||||
baseViewHolder.setText(R.id.tv_time, redBean.getRedTime());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.example.moduleroom.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
|
||||
/**
|
||||
* 红包的列表适配器
|
||||
*/
|
||||
public class RedBagAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
|
||||
public RedBagAdapter() {
|
||||
super(R.layout.item_red_bag);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, String item) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,8 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
||||
return com.xscm.moduleutil.R.mipmap.ic_report;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen:
|
||||
return b ? com.xscm.moduleutil.R.mipmap.ic_close_floating_screen : com.xscm.moduleutil.R.mipmap.ic_open_floating_screen;
|
||||
// case RoomSettingBean.QXRoomSettingTypeRoomFloatingRed:
|
||||
// return com.xscm.moduleutil.R.mipmap.red_tx;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.example.moduleroom.contacts;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
|
||||
public class RedEnvelopesContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
}
|
||||
|
||||
public interface IRoomPre extends IPresenter {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.RadioGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.databinding.DialogRedBagSendBinding;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
private static final String TAG = "RedBagSendDialog";
|
||||
private int type;//这是第一个页面,发送红包的第一个页面,默认为1,第二个页面,是2,点击查看帮助,是type=3
|
||||
private int stype;//当前是哪个页面:1:默认第一个页面, 2:选择条件页面
|
||||
|
||||
private int redType;//红包类型 0:普通红包 1:口令红包
|
||||
private int redTime;//开奖倒计时 0:立刻 1:1分钟;2:2分钟;5:5分钟 10:10分钟(这里传递给服务的时候,需要乘60)
|
||||
private int redGold;//红包类型 0:金币红包 1:钻石红包
|
||||
private int redCount;//条件 0:无 1:收藏房间 2:仅麦上用户
|
||||
|
||||
public RedBagSendDialog(@NonNull @NotNull Context context) {
|
||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.dialog_red_bag_send;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
// window.setLayout(345, 454);
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
setView(1);
|
||||
mBinding.imHelp.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (type!=3){
|
||||
setView(3);
|
||||
setWebView("https://www.baidu.com");
|
||||
}else {
|
||||
setView(stype);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imRedClose.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.butSub.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mBinding.butSub.getText().equals("下一步")){
|
||||
setView(2);
|
||||
setFRed();
|
||||
}else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
mBinding.rgXz.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
if (checkedId==R.id.bt_pt){
|
||||
redType=0;
|
||||
mBinding.lKl.setVisibility(GONE);
|
||||
}else if (checkedId==R.id.bt_kl){
|
||||
redType=1;
|
||||
mBinding.lKl.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.rgDjs.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
if (checkedId==R.id.rb_lk){
|
||||
redTime=0;
|
||||
}else if (checkedId==R.id.rb_1){
|
||||
redTime=1*60;
|
||||
}else if (checkedId==R.id.rb_2){
|
||||
redTime=2*60;
|
||||
}else if (checkedId==R.id.rb_5){
|
||||
redTime=5*60;
|
||||
}else if (checkedId==R.id.rb_10){
|
||||
redTime=10*60;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.rgRedType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
if (checkedId == R.id.rb_gold) {
|
||||
// 选中金币红包:文字红色,背景黄色
|
||||
mBinding.rbGold.setTextColor(Color.parseColor("#D01717"));
|
||||
mBinding.rbGold.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||
// 钻石红包恢复默认样式
|
||||
mBinding.rbDiamond.setTextColor(Color.parseColor("#FFC9C7"));
|
||||
mBinding.rbDiamond.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||
redGold=0;
|
||||
} else if (checkedId == R.id.rb_diamond) {
|
||||
// 选中钻石红包:文字白色,背景透明
|
||||
mBinding.rbDiamond.setTextColor(Color.parseColor("#D01717"));
|
||||
mBinding.rbDiamond.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||
|
||||
// 金币红包恢复默认样式
|
||||
mBinding.rbGold.setTextColor(Color.parseColor("#FFC9C7"));
|
||||
mBinding.rbGold.setBackgroundResource(com.xscm.moduleutil.R.drawable.selector_red_bag_type_button);
|
||||
redGold=1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 设置点击监听器
|
||||
mBinding.btNone.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// 点击"无"时,取消其他所有选项的选中状态
|
||||
mBinding.btFavoriteRoom.setSelected(false);
|
||||
mBinding.btMicUser.setSelected(false);
|
||||
// 切换"无"的选中状态
|
||||
mBinding.btNone.setSelected(! mBinding.btNone.isSelected());
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.btFavoriteRoom.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// 如果"无"被选中,则先取消"无"的选中状态
|
||||
if ( mBinding.btNone.isSelected()) {
|
||||
mBinding.btNone.setSelected(false);
|
||||
}
|
||||
// 切换当前按钮的选中状态
|
||||
mBinding.btFavoriteRoom.setSelected(! mBinding.btFavoriteRoom.isSelected());
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.btMicUser.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// 如果"无"被选中,则先取消"无"的选中状态
|
||||
if ( mBinding.btNone.isSelected()) {
|
||||
mBinding.btNone.setSelected(false);
|
||||
}
|
||||
// 切换当前按钮的选中状态
|
||||
mBinding.btMicUser.setSelected(!mBinding.btMicUser.isSelected());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
private String getSelectedConditions() {
|
||||
Button btNone = mBinding.llTj.findViewById(R.id.bt_none);
|
||||
Button btFavoriteRoom = mBinding.llTj.findViewById(R.id.bt_favorite_room);
|
||||
Button btMicUser = mBinding.llTj.findViewById(R.id.bt_mic_user);
|
||||
|
||||
if (btNone.isSelected()) {
|
||||
return "0";
|
||||
} else {
|
||||
List<String> selectedList = new ArrayList<>();
|
||||
if (btFavoriteRoom.isSelected()) {
|
||||
selectedList.add("1");
|
||||
}
|
||||
if (btMicUser.isSelected()) {
|
||||
selectedList.add("2");
|
||||
}
|
||||
return String.join(",", selectedList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
|
||||
private void setView(int types) {
|
||||
type=types;
|
||||
switch (types) {
|
||||
case 1:
|
||||
mBinding.clRedXz.setVisibility(VISIBLE);
|
||||
mBinding.lKl.setVisibility(VISIBLE);
|
||||
mBinding.lDjs.setVisibility(VISIBLE);
|
||||
mBinding.lLx.setVisibility(VISIBLE);
|
||||
mBinding.tvJeTitle.setVisibility(GONE);
|
||||
mBinding.lJine.setVisibility(GONE);
|
||||
mBinding.lGs.setVisibility(GONE);
|
||||
mBinding.llTj.setVisibility(GONE);
|
||||
mBinding.lBz.setVisibility(GONE);
|
||||
mBinding.wvWeb.setVisibility(GONE);
|
||||
mBinding.butSub.setVisibility(VISIBLE);
|
||||
mBinding.butSub.setText("下一步");
|
||||
mBinding.imHelp.setImageResource(com.xscm.moduleutil.R.drawable.room_redbag_help);
|
||||
stype=1;
|
||||
break;
|
||||
case 2:
|
||||
mBinding.clRedXz.setVisibility(GONE);
|
||||
mBinding.lKl.setVisibility(GONE);
|
||||
mBinding.lDjs.setVisibility(GONE);
|
||||
mBinding.lLx.setVisibility(GONE);
|
||||
mBinding.tvJeTitle.setVisibility(VISIBLE);
|
||||
mBinding.lJine.setVisibility(VISIBLE);
|
||||
mBinding.lGs.setVisibility(VISIBLE);
|
||||
mBinding.llTj.setVisibility(VISIBLE);
|
||||
mBinding.lBz.setVisibility(VISIBLE);
|
||||
mBinding.wvWeb.setVisibility(GONE);
|
||||
mBinding.butSub.setVisibility(VISIBLE);
|
||||
mBinding.butSub.setText("发红包");
|
||||
mBinding.imHelp.setImageResource(com.xscm.moduleutil.R.drawable.room_redbag_help);
|
||||
stype=2;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
mBinding.clRedXz.setVisibility(GONE);
|
||||
mBinding.lKl.setVisibility(GONE);
|
||||
mBinding.lDjs.setVisibility(GONE);
|
||||
mBinding.lLx.setVisibility(GONE);
|
||||
mBinding.tvJeTitle.setVisibility(GONE);
|
||||
mBinding.lJine.setVisibility(GONE);
|
||||
mBinding.lGs.setVisibility(GONE);
|
||||
mBinding.llTj.setVisibility(GONE);
|
||||
mBinding.lBz.setVisibility(GONE);
|
||||
mBinding.wvWeb.setVisibility(VISIBLE);
|
||||
mBinding.butSub.setVisibility(GONE);
|
||||
mBinding.imHelp.setImageResource(com.xscm.moduleutil.R.drawable.room_redbag_back);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 2025/10/11 打开规则按钮
|
||||
private void setWebView(String url) {
|
||||
mBinding.wvWeb.getSettings().setJavaScriptEnabled(true);
|
||||
mBinding.wvWeb.loadUrl(url);
|
||||
}
|
||||
|
||||
private void setFRed(){
|
||||
if (redGold==0){
|
||||
mBinding.tvJeTitle.setText("-"+"金币可用");
|
||||
mBinding.tvJ.setText("金币");
|
||||
}else if (redGold==1){
|
||||
mBinding.tvJeTitle.setText("-"+"钻石可用");
|
||||
mBinding.tvJ.setText("钻石");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.adapter.RedBagAdapter;
|
||||
import com.example.moduleroom.databinding.DialogRedListBinding;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 这是红包列表
|
||||
*/
|
||||
public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
||||
|
||||
RedBagAdapter redBagAdapter;
|
||||
|
||||
public RedListDialog(@NonNull Context context) {
|
||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.dialog_red_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 3); // 每行显示3个
|
||||
mBinding.recyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
// 设置间距
|
||||
mBinding.recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
|
||||
@Override
|
||||
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
||||
int spacing = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10);
|
||||
outRect.left = spacing;
|
||||
outRect.right = spacing;
|
||||
outRect.bottom = spacing;
|
||||
if (parent.getChildAdapterPosition(view) % 3 == 0) {
|
||||
outRect.left = spacing;
|
||||
}
|
||||
if (parent.getChildAdapterPosition(view) % 3 == 2) {
|
||||
outRect.right = spacing;
|
||||
}
|
||||
}
|
||||
});
|
||||
redBagAdapter=new RedBagAdapter();
|
||||
mBinding.recyclerView.setAdapter(redBagAdapter);
|
||||
// 监听数据变化,动态调整高度
|
||||
redBagAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
|
||||
@Override
|
||||
public void onChanged() {
|
||||
adjustRecyclerViewHeight();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void adjustRecyclerViewHeight() {
|
||||
int itemCount = redBagAdapter.getItemCount();
|
||||
if (itemCount == 0) return;
|
||||
|
||||
// 计算需要的行数(每行3个)
|
||||
int rows = (int) Math.ceil((double) itemCount / 3);
|
||||
|
||||
// 限制最多显示2行
|
||||
int maxRows = Math.min(rows, 2);
|
||||
|
||||
// 计算总高度:2行 × item高度 + 间距
|
||||
int itemHeight = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_60);
|
||||
int spacing = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10);
|
||||
int totalHeight = maxRows * itemHeight + (maxRows + 1) * spacing;
|
||||
|
||||
ViewGroup.LayoutParams params = mBinding.recyclerView.getLayoutParams();
|
||||
params.height = totalHeight;
|
||||
mBinding.recyclerView.setLayoutParams(params);
|
||||
|
||||
// 如果超过2行,启用滚动
|
||||
mBinding.recyclerView.setNestedScrollingEnabled(itemCount > 6);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
// RetrofitClient.getInstance().firstChargeGift(new BaseObserver<FirstChargeGiftBean>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(FirstChargeGiftBean firstChargeGiftBean) {
|
||||
// if (firstChargeGiftBean != null) {
|
||||
// showGift(firstChargeGiftBean);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("1");
|
||||
list.add("2");
|
||||
list.add("3");
|
||||
list.add("4");
|
||||
list.add("5");
|
||||
list.add("4");
|
||||
list.add("5");
|
||||
list.add("4");
|
||||
list.add("5");
|
||||
list.add("4");
|
||||
list.add("5");
|
||||
redBagAdapter.setNewData(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Resources getResources() {
|
||||
return getContext().getResources();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -54,6 +54,7 @@ import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
|
||||
import com.xscm.moduleutil.dialog.WebViewDialog;
|
||||
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryDialog;
|
||||
@@ -404,7 +405,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
||||
} else if (view1.getId() == R.id.tv_bb_qs) {
|
||||
int count = gifyuseradapter.getSelectCount();
|
||||
if (count < 0) {
|
||||
if (count <=0) {
|
||||
ToastUtils.show("请选择打赏的用户");
|
||||
return;
|
||||
}
|
||||
@@ -419,10 +420,24 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
auction_id = "";
|
||||
}
|
||||
}
|
||||
MvpPre.getGiftPack(roomId, gifyuseradapter.getUserIdToString(), heart_id, auction_id);
|
||||
queren();
|
||||
}
|
||||
}
|
||||
|
||||
private void queren() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"是否确认将背包礼物全部送出?",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre.getGiftPack(roomId, gifyuseradapter.getUserIdToString(), heart_id, auction_id);
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
private String giftNumber = "";
|
||||
private RoomGiftGiveEvent roomGiftGiveEvent;
|
||||
|
||||
@@ -474,8 +489,14 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
FragmentManager fm = getParentFragmentManager();
|
||||
if (fm != null && !fm.isDestroyed()) {
|
||||
if (jingp==1){
|
||||
auction_id= userInfo.getAuction_id() ;
|
||||
}
|
||||
if (auction_id==null || auction_id.isEmpty()){
|
||||
auction_id="";
|
||||
}
|
||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||
String.valueOf(gift.getGift_bag()), roomId, userId, heart_id);
|
||||
String.valueOf(gift.getGift_bag()), roomId, userId, heart_id,auction_id);
|
||||
newDialog.show(fm, "GiftLotteryDialog");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -789,7 +810,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Override
|
||||
public void roomAuctionJoin(RoomAuction.AuctionListBean auctionListBean) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("竞拍成功");
|
||||
// com.blankj.utilcode.util.ToastUtils.showShort("竞拍成功");
|
||||
if (roomGiftGiveEvent != null) {
|
||||
EventBus.getDefault().post(roomGiftGiveEvent);
|
||||
roomGiftGiveEvent = null;
|
||||
|
||||
@@ -3,12 +3,10 @@ package com.example.moduleroom.dialog;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.*;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
@@ -42,6 +40,7 @@ import com.xscm.moduleutil.bean.room.RoomSettingBean;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
import com.xscm.moduleutil.view.QXRedBagSendView;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@@ -163,6 +162,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage, read, isSelected, false, false));
|
||||
|
||||
dataList.add(new RoomSettingBean("更多操作", null, null, null, -1, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("发红包", "ic_red", null, null, RoomSettingBean.QXRoomSettingTypeRoomFloatingRed, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("离开房间", "ic_leave", null, null, RoomSettingBean.QXRoomSettingTypeRoomLeave, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress, read, isSelected, false, false));
|
||||
@@ -320,6 +320,15 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
}
|
||||
upAdapter();
|
||||
}
|
||||
// else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomFloatingRed){
|
||||
//
|
||||
// if (getActivity() instanceof RoomActivity) {
|
||||
// ((RoomActivity) getActivity()).redDialogView();
|
||||
// }
|
||||
// dismiss();
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -48,11 +48,9 @@ import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||
import com.xscm.moduleutil.utils.ClickUtils;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.utils.StringUtil;
|
||||
import com.xscm.moduleutil.widget.RoomFriendshipWheatView;
|
||||
import com.xscm.moduleutil.widget.RoomSingSongWheatView;
|
||||
import com.xscm.moduleutil.widget.SharedViewModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -1707,7 +1705,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
topIsAnimate = false;
|
||||
centerIsAnimate = false;
|
||||
bottomIsAnimate = false;
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
// 停止倒计时器
|
||||
releaseCountDownTimer();
|
||||
|
||||
@@ -1722,6 +1719,12 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
dialogFragment.dismissAllowingStateLoss();
|
||||
dialogFragment = null;
|
||||
}
|
||||
// // 将磁盘缓存清理放在后台线程执行
|
||||
// new Thread(() -> {
|
||||
// if (getActivity() != null) {
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
// }
|
||||
// }).start();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.databinding.FragmentRedEnvelopesBinding;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.view.QXRedBagSendView;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author xscm
|
||||
* @ClassName RedEnvelopesFragment
|
||||
* @Description 抢红包的dialog
|
||||
* @Date 2021/12/28 10:09
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class RedEnvelopesFragment extends BaseDialog<FragmentRedEnvelopesBinding> {
|
||||
public RedEnvelopesFragment(@NonNull @NotNull Context context) {
|
||||
super(context, com.xscm.moduleutil.R.style.BaseDialogStyleH);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
// window.setLayout(345, 454);
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345),WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.imRedClose.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).navigation();
|
||||
QXRedBagSendView redBagView = new QXRedBagSendView(getContext());
|
||||
redBagView.showInView((ViewGroup) getWindow().getDecorView());
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
mBinding.imRedK.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).navigation();
|
||||
|
||||
// QXRedBagSendView redBagView = new QXRedBagSendView(getContext());
|
||||
// redBagView.showInView((ViewGroup) getWindow().getDecorView());
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.fragment_red_envelopes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class RedViewModel extends ViewModel {
|
||||
// TODO: Implement the ViewModel
|
||||
}
|
||||
@@ -1674,7 +1674,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).upTop();
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
}
|
||||
isButtonsInflated = false;
|
||||
releaseCountDownTimer();
|
||||
|
||||
@@ -830,7 +830,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
|
||||
public void releaseResources(){
|
||||
releaseCountDownTimer();
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
if (mediaProjection[0] != null) {
|
||||
mediaProjection[0].stop();
|
||||
mediaProjection[0] = null;
|
||||
|
||||
@@ -355,7 +355,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
// 释放SVGA动画资源
|
||||
if (mBinding != null && mBinding.svgaNobility != null) {
|
||||
mBinding.svgaNobility.release();
|
||||
|
||||
@@ -612,7 +612,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
}
|
||||
|
||||
//开始旋转
|
||||
|
||||
@@ -1765,7 +1765,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
releaseCountDownTimer();
|
||||
ImageUtils.clearDiskCache(getActivity());
|
||||
if (wheatLayoutSingManager != null) {
|
||||
wheatLayoutSingManager.release();
|
||||
}
|
||||
@@ -1783,7 +1782,12 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
if (MvpPre != null) {
|
||||
MvpPre.detachView();
|
||||
}
|
||||
|
||||
// 将磁盘缓存清理放在后台线程执行
|
||||
// new Thread(() -> {
|
||||
// if (getActivity() != null) {
|
||||
// ImageUtils.clearDiskCache(getActivity());
|
||||
// }
|
||||
// }).start();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.example.moduleroom.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
import com.example.moduleroom.contacts.RedEnvelopesContacts;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
public class RedEnvelopesPresenter extends BasePresenter<RedEnvelopesContacts.View> implements RedEnvelopesContacts.IRoomPre{
|
||||
public RedEnvelopesPresenter(RedEnvelopesContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -47,6 +47,44 @@
|
||||
|
||||
</com.xscm.moduleutil.widget.DropHourlView>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.DropRedView
|
||||
android:id="@+id/drv_red"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_marginTop="@dimen/dp_160"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/red_bj"
|
||||
android:layout_width="@dimen/dp_58"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:src="@mipmap/red_bj"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="top|end"
|
||||
android:layout_marginStart="-20dp"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
tools:text="x0"
|
||||
android:textColor="#FFFEB2"
|
||||
android:textSize="14sp"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropRedView>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="0dp"
|
||||
@@ -131,42 +169,6 @@
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_15"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/ll_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top">-->
|
||||
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/vp_room_pager"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="2"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_5"-->
|
||||
<!-- android:clipChildren="false"-->
|
||||
<!-- android:clipToPadding="false" />-->
|
||||
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/ease_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:minHeight="@dimen/dp_80">-->
|
||||
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_ride"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:minHeight="@dimen/dp_80" />-->
|
||||
<!-- </FrameLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<com.xscm.moduleutil.widget.RoomMessageInputMenu
|
||||
android:id="@+id/input_menu1"
|
||||
android:layout_width="0dp"
|
||||
@@ -551,9 +553,6 @@
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
|
||||
628
moduleroom/src/main/res/layout/dialog_red_bag_send.xml
Normal file
628
moduleroom/src/main/res/layout/dialog_red_bag_send.xml
Normal file
@@ -0,0 +1,628 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="454dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/red_f_bj"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_red_close"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/head_cc"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_20"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_help"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@drawable/room_redbag_help"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="直播间红包"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_red_xz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hiti"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:text="参与领取限制"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
<!-- 参与领取限制 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_hiti"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_xz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/bt_pt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_weight="1"
|
||||
android:text="普通红包"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/selector_red_bag_radio_button"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/bt_kl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:text="口令红包"
|
||||
android:button="@null"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:gravity="center"
|
||||
android:textColor="#fff"
|
||||
android:background="@drawable/selector_red_bag_radio_button"/>
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- 口令输入区 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/l_kl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_red_xz"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="口令"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ev_kl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_weight="2"
|
||||
android:background="@null"
|
||||
android:gravity="end|center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:maxLength="10"
|
||||
android:textColorHint="#999"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:hint="请输入口令"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 开奖倒计时 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/l_djs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/l_kl"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:text="开奖倒计时"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_djs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_5">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_lk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="立刻"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="1分钟"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="2分钟"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="5分钟"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="10分钟"/>
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 红包类型 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/l_lx"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/l_djs"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:text="红包类型"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_red_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:background="@drawable/bg_r395_ba230a"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_gold"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="@dimen/dp_2"
|
||||
android:textColor="#D01717"
|
||||
android:text="金币红包"
|
||||
android:textStyle="bold"
|
||||
android:background="@drawable/selector_red_bag_type_button"
|
||||
android:checked="true"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_diamond"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="@dimen/dp_2"
|
||||
android:textColor="#FFC9C7"
|
||||
android:textStyle="bold"
|
||||
android:background="@drawable/selector_red_bag_type_button"
|
||||
android:text="钻石红包"/>
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_je_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_37"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:background="@drawable/bg_r8_c51a0c"
|
||||
android:text="0金币可用"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:layout_marginTop="6dp"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_red_close"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_red_close"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<!-- 金额 -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/l_jine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_je_title"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="金额"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:background="@null"
|
||||
android:gravity="end|center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:maxLength="10"
|
||||
android:layout_toStartOf="@+id/tv_j"
|
||||
android:textColorHint="#999"
|
||||
android:textColor="#333"
|
||||
android:hint="请输入金额"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_j"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="金币"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="13sp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<!-- 个数-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/l_gs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/l_jine"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="个数"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:background="@null"
|
||||
android:gravity="end|center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:maxLength="10"
|
||||
android:layout_toStartOf="@+id/tv_g"
|
||||
android:textColorHint="#999"
|
||||
android:textColor="#333"
|
||||
android:hint="请输入数量"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_g"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="个"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="13sp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<!-- 条件选择区域 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tj"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/l_gs"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:text="条件"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<!-- 选项按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:layout_marginStart="@dimen/dp_15">
|
||||
|
||||
<!-- 无 -->
|
||||
<Button
|
||||
android:id="@+id/bt_none"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="无"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
/>
|
||||
|
||||
<!-- 收藏房间 -->
|
||||
<Button
|
||||
android:id="@+id/bt_favorite_room"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="收藏房间"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
android:layout_marginStart="@dimen/dp_10"/>
|
||||
|
||||
<!-- 仅麦上用户 -->
|
||||
<Button
|
||||
android:id="@+id/bt_mic_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="仅麦上用户"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
android:layout_marginStart="@dimen/dp_10"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 备注 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/l_bz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_tj"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="备注"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_weight="2"
|
||||
android:background="@null"
|
||||
android:gravity="end|center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:maxLength="10"
|
||||
android:textColorHint="#999"
|
||||
android:textColor="#333"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:hint="请输入备注"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 下一步按钮 -->
|
||||
<Button
|
||||
android:id="@+id/but_sub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginTop="@dimen/dp_29"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:background="@drawable/red_bag_next_btn_bg"
|
||||
android:text="下一步"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#fff35248"
|
||||
android:textSize="@dimen/sp_18"
|
||||
/>
|
||||
|
||||
<WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/wv_web"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
tools:ignore="WebViewLayout"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
103
moduleroom/src/main/res/layout/dialog_red_list.xml
Normal file
103
moduleroom/src/main/res/layout/dialog_red_list.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="490dp"
|
||||
android:background="@color/transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/red_bott_b"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_red_top_b"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_242"-->
|
||||
<!-- android:src="@mipmap/red_top_b"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_40"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"/>-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rl_t"
|
||||
android:layout_width="@dimen/dp_280"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/dp_252"
|
||||
android:maxHeight="@dimen/dp_338"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_1"
|
||||
android:layout_width="@dimen/dp_280"
|
||||
android:layout_height="@dimen/dp_242"
|
||||
android:src="@mipmap/red_top_b"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_x"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_1"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="-1dp"
|
||||
android:background="@drawable/bg_r10_bott"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_marginBottom="20dp"
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:layout_marginTop="@dimen/dp_156"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_x"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:itemCount="11"
|
||||
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
tools:spanCount="3"
|
||||
tools:listitem="@layout/item_red_bag"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="@dimen/dp_35"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:src="@mipmap/index_close_youth"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_t"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
161
moduleroom/src/main/res/layout/fragment_red.xml
Normal file
161
moduleroom/src/main/res/layout/fragment_red.xml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activity.RedResultActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#fff"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/red_k_top"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_red"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
android:layout_marginStart="@dimen/dp_79"
|
||||
android:layout_marginEnd="@dimen/dp_79"
|
||||
android:layout_marginTop="@dimen/dp_6">
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/user_avatar"
|
||||
android:layout_width="@dimen/dp_41"
|
||||
android:layout_height="@dimen/dp_41"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_41"
|
||||
app:layout_constraintTop_toTopOf="@+id/user_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/user_avatar"
|
||||
app:layout_constraintStart_toEndOf="@+id/user_avatar"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
tools:text="用户名"
|
||||
android:gravity="center"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
app:layout_constraintTop_toBottomOf="@+id/user_avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
tools:text="恭喜发财,大吉大利"
|
||||
android:gravity="center"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_13"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_jb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_48"
|
||||
android:textStyle="bold"
|
||||
tools:text="5026"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_red_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_31"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_19"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:textStyle="bold"
|
||||
tools:text="金币"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_red_jb"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_red_jb"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_red_jb"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_13"
|
||||
tools:text="已存入金币,可直接提现"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_red_jb"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_31"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_lq"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:text="已领取5/10"
|
||||
android:textColor="#999"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_19"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_top"
|
||||
/>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_lq"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="@dimen/dp_13"
|
||||
android:paddingEnd="@dimen/dp_13"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
tools:listitem="@layout/item_red"
|
||||
android:paddingBottom="@dimen/dp_12"/>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
158
moduleroom/src/main/res/layout/fragment_red_envelopes.xml
Normal file
158
moduleroom/src/main/res/layout/fragment_red_envelopes.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/red_en"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_red_close"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/head_cc"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_30"/>
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/user_avatar"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_79"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_52"
|
||||
tools:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintTop_toBottomOf="@+id/user_avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:gravity="center"
|
||||
tools:text="用户名"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:textSize="@dimen/sp_24"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_user_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textStyle="bold"
|
||||
tools:text="恭喜发财,大吉大利"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_red_k"
|
||||
android:layout_width="@dimen/dp_126"
|
||||
android:layout_height="@dimen/dp_125"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_red_count"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@mipmap/red_k"
|
||||
tools:ignore="ContentDescription"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_pl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/red_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_88"
|
||||
android:textColor="@color/color_FFFFFFE0"
|
||||
android:textSize="@dimen/sp_23"
|
||||
android:textStyle="bold"
|
||||
tools:text="发布评论抢红包"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:gravity="top|center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="@+id/text_pl"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_pl"
|
||||
android:textColor="@color/color_FFFFFFE0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:text="口令红包参与条件"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pinl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
android:textColor="@color/color_FFFFFFE0"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
android:text="发送评论:"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_kl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_pinl"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_pinl"
|
||||
android:textColor="#FFCE47"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
android:text="这是一个口令"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FFFFFFE0"
|
||||
android:text="抢红包必须在本房间内"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
63
moduleroom/src/main/res/layout/item_red.xml
Normal file
63
moduleroom/src/main/res/layout/item_red.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
android:paddingTop="@dimen/dp_2"
|
||||
android:paddingBottom="@dimen/dp_2"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/red_user_avatar"
|
||||
android:layout_width="@dimen/dp_49"
|
||||
android:layout_height="@dimen/dp_49"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:textColor="#666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="用户名"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toEndOf="@+id/red_user_avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/red_user_avatar"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="11:23"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_user_name"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="5026 金币"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
18
moduleroom/src/main/res/layout/item_red_bag.xml
Normal file
18
moduleroom/src/main/res/layout/item_red_bag.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/iv_red_bag"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/red"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user