1:添加首页支付等功能,红包功能
This commit is contained in:
@@ -28,8 +28,8 @@ isBuildModule=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.2.7
|
||||
APP_VERSION_CODE=181
|
||||
APP_VERSION_NAME=1.2.8
|
||||
APP_VERSION_CODE=182
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||
@@ -26,15 +26,15 @@ public class GiftAdapter extends BaseQuickAdapter<HeavenGiftBean, BaseViewHolder
|
||||
protected void convert(BaseViewHolder helper, HeavenGiftBean item) {
|
||||
ImageUtils.loadHeadCC(item.getPicture(), helper.getView(R.id.iv_head));
|
||||
helper.getView(R.id.im_jb).setVisibility(View.VISIBLE);
|
||||
if (item.getType() == COIN_TYPE) {
|
||||
helper.setText(R.id.tv_gift_time, String.format("%s", item.getGold()));
|
||||
} else if (item.getType() == GIFT_TYPE) {
|
||||
helper.getView(R.id.im_jb).setVisibility(View.GONE);
|
||||
helper.setText(R.id.tv_gift_time, String.format("*%s", item.getQuantity()));
|
||||
} else {
|
||||
helper.getView(R.id.im_jb).setVisibility(View.GONE);
|
||||
helper.setText(R.id.tv_gift_time, String.format("%s天", item.getDays()));
|
||||
}
|
||||
// if (item.getType() == COIN_TYPE) {
|
||||
// helper.setText(R.id.tv_gift_time, String.format("%s", item.getGold()));
|
||||
// } else if (item.getType() == GIFT_TYPE) {
|
||||
// helper.getView(R.id.im_jb).setVisibility(View.GONE);
|
||||
// helper.setText(R.id.tv_gift_time, String.format("*%s", item.getQuantity()));
|
||||
// } else {
|
||||
// helper.getView(R.id.im_jb).setVisibility(View.GONE);
|
||||
// helper.setText(R.id.tv_gift_time, String.format("%s天", item.getDays()));
|
||||
// }
|
||||
helper.setText(R.id.tv_head_name, item.getTitle());
|
||||
ViewGroup.LayoutParams layoutParams = helper.itemView.getLayoutParams();
|
||||
layoutParams.width = ((ScreenUtils.getScreenWidth() - ConvertUtils.dp2px(140)) / 4);
|
||||
|
||||
@@ -12,27 +12,13 @@ public class HeavenGiftBean {
|
||||
private String gold;
|
||||
private String days;
|
||||
|
||||
private int gift_bag_id;
|
||||
private String name; //活动名称
|
||||
private String bag_name;//礼包名称
|
||||
private String effective_time;//倒计时时间 秒
|
||||
private String rule;//规则地址
|
||||
private Counter counter;//礼包说明
|
||||
private List<GiftList> gift_list;
|
||||
private int type;
|
||||
private String icon;
|
||||
|
||||
@Data
|
||||
public static class Counter{
|
||||
private String counter;
|
||||
private String money;
|
||||
private String diamond;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class GiftList{
|
||||
private String name;
|
||||
private String num;
|
||||
private String gold;
|
||||
|
||||
}
|
||||
private String counter;
|
||||
private String money;
|
||||
private String diamond;
|
||||
private List<RoonGiftModel> gift_list;
|
||||
}
|
||||
|
||||
@@ -14,14 +14,12 @@ import androidx.annotation.NonNull;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.adapter.GiftAdapter;
|
||||
import com.xscm.moduleutil.adapter.HeavenGiftAdapter;
|
||||
import com.xscm.moduleutil.bean.BaseListData;
|
||||
import com.xscm.moduleutil.bean.FirstChargeGiftBean;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.databinding.DialogFirstChargeBinding;
|
||||
import com.xscm.moduleutil.databinding.DialogHeavenGiftBinding;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
@@ -42,7 +40,6 @@ import io.reactivex.disposables.Disposable;
|
||||
*/
|
||||
public class FirstChargeDialog extends BaseDialog<DialogFirstChargeBinding> {
|
||||
|
||||
GiftAdapter giftAdapter;
|
||||
HeavenGiftAdapter heavenGiftAdapter;
|
||||
FirstChargeGiftBean firstChargeGiftBean;
|
||||
private int type;
|
||||
@@ -190,15 +187,15 @@ public class FirstChargeDialog extends BaseDialog<DialogFirstChargeBinding> {
|
||||
if (firstChargeGiftBean.getGift_bag().size() > 0) {
|
||||
type=1;
|
||||
List<RoonGiftModel> list = new ArrayList<>();
|
||||
mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle1());
|
||||
mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle2());
|
||||
mBinding.btn0.setText(firstChargeGiftBean.getGift_bag().get(0).getName());
|
||||
// mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle1());
|
||||
// mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle2());
|
||||
// mBinding.btn0.setText(firstChargeGiftBean.getGift_bag().get(0).getName());
|
||||
list.addAll(firstChargeGiftBean.getGift_bag().get(0).getGift_list());
|
||||
// mBinding.tvTitle22.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle2());
|
||||
mBinding.tvTitle22.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle2());
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
|
||||
mBinding.btn1.setText(firstChargeGiftBean.getGift_bag().get(1).getName());
|
||||
mBinding.btn2.setText(firstChargeGiftBean.getGift_bag().get(2).getName());
|
||||
// mBinding.btn1.setText(firstChargeGiftBean.getGift_bag().get(1).getName());
|
||||
// mBinding.btn2.setText(firstChargeGiftBean.getGift_bag().get(2).getName());
|
||||
} else if (firstChargeGiftBean.getGift_bag().size() == 2) {
|
||||
// mBinding.rg.check(R.id.btn_0);
|
||||
// mBinding.btn1.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -12,11 +12,10 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.adapter.GiftAdapter;
|
||||
import com.xscm.moduleutil.adapter.HeavenGiftAdapter;
|
||||
import com.xscm.moduleutil.bean.BaseListData;
|
||||
import com.xscm.moduleutil.bean.FirstChargeGiftBean;
|
||||
import com.xscm.moduleutil.bean.HeavenGiftBean;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.databinding.DialogHeavenGiftBinding;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
@@ -37,7 +36,6 @@ import java.util.List;
|
||||
*/
|
||||
public class HeavenGiftDialog extends BaseDialog<DialogHeavenGiftBinding> {
|
||||
|
||||
GiftAdapter giftAdapter;
|
||||
HeavenGiftAdapter heavenGiftAdapter;
|
||||
|
||||
private CountDownTimer countDownTimer;
|
||||
@@ -90,10 +88,11 @@ public class HeavenGiftDialog extends BaseDialog<DialogHeavenGiftBinding> {
|
||||
@Override
|
||||
public void onNext(HeavenGiftBean heavenGiftBean) {
|
||||
if (heavenGiftBean != null){
|
||||
mBinding.tvTitle.setText(heavenGiftBean.getCounter().getCounter());
|
||||
mBinding.tvTitle.setText(heavenGiftBean.getCounter());
|
||||
// 示例:假设从 HeavenGiftBean 中获取倒计时时间(单位:秒)
|
||||
long countdownTime =Integer.parseInt(heavenGiftBean.getEffective_time()) * 1000L; // 转换为毫秒
|
||||
startCountdown(countdownTime);
|
||||
// long countdownTime =Integer.parseInt(heavenGiftBean.getEffective_time()) * 1000L; // 转换为毫秒
|
||||
// startCountdown(countdownTime);
|
||||
mBinding.tvSj.setText("截止时间:"+heavenGiftBean.getEffective_time());
|
||||
mBinding.bannerViewPager.create(baseListData(heavenGiftBean.getGift_list(),4));
|
||||
}
|
||||
}
|
||||
@@ -150,10 +149,10 @@ public class HeavenGiftDialog extends BaseDialog<DialogHeavenGiftBinding> {
|
||||
countDownTimer = null;
|
||||
}
|
||||
}
|
||||
private List<BaseListData<HeavenGiftBean.GiftList>> baseListData(List<HeavenGiftBean.GiftList> list, int chunkSize){
|
||||
List<BaseListData<HeavenGiftBean.GiftList>> baseListData = new ArrayList<>();
|
||||
private List<BaseListData<RoonGiftModel>> baseListData(List<RoonGiftModel> list, int chunkSize) {
|
||||
List<BaseListData<RoonGiftModel>> baseListData = new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i += chunkSize) {
|
||||
BaseListData<HeavenGiftBean.GiftList> baseListData1 = new BaseListData<>();
|
||||
BaseListData<RoonGiftModel> baseListData1 = new BaseListData<>();
|
||||
baseListData1.setData(list.subList(i, Math.min(i + chunkSize, list.size())));
|
||||
baseListData.add(baseListData1);
|
||||
}
|
||||
|
||||
@@ -11,15 +11,12 @@ import androidx.annotation.NonNull;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.adapter.GiftAdapter;
|
||||
import com.xscm.moduleutil.adapter.HeavenGiftAdapter;
|
||||
import com.xscm.moduleutil.bean.BaseListData;
|
||||
import com.xscm.moduleutil.bean.FirstChargeGiftBean;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.databinding.DialogFirstChargeBinding;
|
||||
import com.xscm.moduleutil.databinding.DialogNewPeopleBinding;
|
||||
import com.xscm.moduleutil.databinding.DialogNewPeopleBindingImpl;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
@@ -39,7 +36,6 @@ import java.util.List;
|
||||
*/
|
||||
public class NewPeopleDialog extends BaseDialog<DialogNewPeopleBinding> {
|
||||
|
||||
GiftAdapter giftAdapter;
|
||||
HeavenGiftAdapter heavenGiftAdapter;
|
||||
FirstChargeGiftBean firstChargeGiftBean;
|
||||
private int type;
|
||||
@@ -60,7 +56,7 @@ public class NewPeopleDialog extends BaseDialog<DialogNewPeopleBinding> {
|
||||
Window window = getWindow();
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||
mBinding.tvTitle2.setPaintFlags(Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
|
||||
heavenGiftAdapter = new HeavenGiftAdapter();
|
||||
mBinding.bannerViewPager
|
||||
.setPageMargin(15)
|
||||
@@ -85,6 +81,7 @@ public class NewPeopleDialog extends BaseDialog<DialogNewPeopleBinding> {
|
||||
if (firstChargeGiftBean.getGift_bag().size() > 1) {
|
||||
mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle1());
|
||||
mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(0).getTitle2());
|
||||
mBinding.tvTitle2.setPaintFlags(Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
mBinding.btn0.setText(firstChargeGiftBean.getGift_bag().get(0).getName());
|
||||
list.addAll(firstChargeGiftBean.getGift_bag().get(0).getGift_list());
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
@@ -95,6 +92,7 @@ public class NewPeopleDialog extends BaseDialog<DialogNewPeopleBinding> {
|
||||
if (firstChargeGiftBean.getGift_bag().size() > 2) {
|
||||
mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(1).getTitle1());
|
||||
mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(1).getTitle2());
|
||||
mBinding.tvTitle2.setPaintFlags(Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
mBinding.btn1.setText(firstChargeGiftBean.getGift_bag().get(1).getName());
|
||||
list.addAll(firstChargeGiftBean.getGift_bag().get(1).getGift_list());
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
@@ -102,17 +100,28 @@ public class NewPeopleDialog extends BaseDialog<DialogNewPeopleBinding> {
|
||||
type=2;
|
||||
} else if (i == R.id.btn_2) {
|
||||
List<RoonGiftModel> list = new ArrayList<>();
|
||||
if (firstChargeGiftBean.getGift_bag().size() == 3) {
|
||||
if (firstChargeGiftBean.getGift_bag().size() > 3) {
|
||||
if (firstChargeGiftBean.getGift_bag().get(2)!=null) {
|
||||
mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(2).getTitle1());
|
||||
mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(2).getTitle2());
|
||||
mBinding.tvTitle2.setPaintFlags(Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
mBinding.btn2.setText(firstChargeGiftBean.getGift_bag().get(2).getName());
|
||||
list.addAll(firstChargeGiftBean.getGift_bag().get(2).getGift_list());
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
type = 3;
|
||||
}
|
||||
}
|
||||
|
||||
}else if (i == R.id.btn_3){
|
||||
List<RoonGiftModel> list = new ArrayList<>();
|
||||
if (firstChargeGiftBean.getGift_bag().size() >= 4) {
|
||||
mBinding.tvTitle1.setText(firstChargeGiftBean.getGift_bag().get(3).getTitle1());
|
||||
mBinding.tvTitle2.setText(firstChargeGiftBean.getGift_bag().get(3).getTitle2());
|
||||
mBinding.btn3.setText(firstChargeGiftBean.getGift_bag().get(3).getName());
|
||||
mBinding.tvTitle2.setPaintFlags(0); // 清除所有绘制标志
|
||||
list.addAll(firstChargeGiftBean.getGift_bag().get(3).getGift_list());
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
type = 4;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,15 @@
|
||||
package com.xscm.moduleutil.dialog.giftLottery;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.adapter.GiftAdapter;
|
||||
import com.xscm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.base.BaseRoomContacts;
|
||||
import com.xscm.moduleutil.bean.GiftBean;
|
||||
import com.xscm.moduleutil.databinding.DialogPrizePoolBinding;
|
||||
import com.xscm.moduleutil.widget.MyGridView;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridLayoutManager;
|
||||
import com.xscm.moduleutil.widget.pagerecyclerview.PagerGridSnapHelper;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -867,7 +867,7 @@ public class AgoraManager {
|
||||
VD_360x360,
|
||||
FRAME_RATE_FPS_15,
|
||||
STANDARD_BITRATE,
|
||||
ORIENTATION_MODE_ADAPTIVE
|
||||
ORIENTATION_MODE_FIXED_LANDSCAPE
|
||||
));
|
||||
rtcEngine.startScreenCapture(screenCaptureParameters);
|
||||
|
||||
|
||||
7
moduleUtil/src/main/res/drawable/rd_btn_new_p.xml
Normal file
7
moduleUtil/src/main/res/drawable/rd_btn_new_p.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 选中状态 -->
|
||||
<item android:drawable="@mipmap/xr_ykj_xz" android:state_checked="true" />
|
||||
<!-- 未选中状态 -->
|
||||
<item android:drawable="@mipmap/xr_ykj" />
|
||||
</selector>
|
||||
@@ -25,7 +25,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_t"
|
||||
android:layout_width="@dimen/dp_276"
|
||||
android:layout_height="@dimen/dp_338"
|
||||
android:layout_height="@dimen/dp_350"
|
||||
android:background="@mipmap/firsh_bj"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -38,7 +38,8 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_98"
|
||||
android:gravity="center|right"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title1"
|
||||
@@ -69,7 +70,8 @@
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_122"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/btn_0"
|
||||
@@ -112,12 +114,12 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_rc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_112"
|
||||
android:layout_below="@+id/rg"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@mipmap/tk_bj">
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginStart="@dimen/dp_21"
|
||||
android:layout_marginTop="@dimen/dp_144"
|
||||
android:layout_marginEnd="@dimen/dp_21"
|
||||
android:background="@mipmap/tk_bj"
|
||||
>
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/rv_head"-->
|
||||
@@ -129,17 +131,31 @@
|
||||
android:id="@+id/banner_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
app:bvp_indicator_visibility="visible"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rl_rc"
|
||||
tools:text="充值6元即可获得总价值888金币的道具或装扮"
|
||||
android:textColor="#333"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:gravity="center|left"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_invite"
|
||||
android:layout_width="@dimen/dp_178"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_below="@+id/rl_rc"
|
||||
android:layout_below="@+id/tv_title22"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -1,57 +1,60 @@
|
||||
<?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">
|
||||
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="wrap_content"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/h_bj_b"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/h_bj_b"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_t"
|
||||
android:layout_width="@dimen/dp_276"
|
||||
android:layout_height="@dimen/dp_365"
|
||||
android:background="@mipmap/heaven_bj"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:id="@+id/rl_t"
|
||||
android:layout_width="@dimen/dp_276"
|
||||
android:layout_height="@dimen/dp_365"
|
||||
android:background="@mipmap/heaven_bj"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_125">
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_125">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sj"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:background="@mipmap/heave_b" />
|
||||
android:id="@+id/tv_sj"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:background="@mipmap/heave_b"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#666"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@mipmap/heave_g" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@mipmap/heave_g"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -68,58 +71,58 @@
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_rc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_122"
|
||||
android:layout_marginTop="@dimen/dp_148"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12">
|
||||
android:id="@+id/rl_rc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginTop="@dimen/dp_148"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12">
|
||||
|
||||
<com.zhpan.bannerview.BannerViewPager
|
||||
android:id="@+id/banner_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:bvp_indicator_visibility="visible" />
|
||||
android:id="@+id/banner_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:bvp_indicator_visibility="visible"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rl_rc"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:text="充值6元即可获得总价值888金币的道具或装扮"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rl_rc"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
tools:text="充值6元即可获得总价值888金币的道具或装扮"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_invite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_below="@+id/tv_title"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="@mipmap/invite_k"
|
||||
android:gravity="center"
|
||||
android:text="立即领取"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:id="@+id/tv_invite"
|
||||
android:layout_width="@dimen/dp_178"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_below="@+id/tv_title"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="@mipmap/invite_k"
|
||||
android:gravity="center"
|
||||
android:text="立即充值"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/index_close_youth"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_t" />
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/index_close_youth"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_t"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_122"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
@@ -112,12 +114,12 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/xr_ykj"
|
||||
android:layout_weight="1.1"
|
||||
android:background="@drawable/rd_btn_new_p"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_17"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 用户头像 -->
|
||||
@@ -22,7 +23,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:text="昵称ssss"
|
||||
tools:text="昵称ssss"
|
||||
android:textColor="@color/_000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
@@ -34,7 +35,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:text="我是评论"
|
||||
tools:text="我是评论"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
@@ -46,7 +47,7 @@
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:text="2天"
|
||||
tools:text="2天"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_content"
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_name"
|
||||
tools:text="回复" />
|
||||
|
||||
|
||||
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/firsh_bj.png
Normal file
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/firsh_bj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 828 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/xr_ykj_xz.webp
Normal file
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/xr_ykj_xz.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -48,6 +48,7 @@ import com.xscm.moduleutil.bean.*;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnline;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnlineBean;
|
||||
import com.xscm.moduleutil.dialog.FirstChargeDialog;
|
||||
import com.xscm.moduleutil.dialog.HeavenGiftDialog;
|
||||
import com.xscm.moduleutil.dialog.NewPeopleDialog;
|
||||
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
|
||||
import com.xscm.moduleutil.event.RoomOutEvent;
|
||||
@@ -318,7 +319,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
mBinding.rlMe.setOnClickListener(this);
|
||||
mBinding.ivGuanbi.setOnClickListener(this);
|
||||
mBinding.riv.setOnClickListener(this);
|
||||
mBinding.ivShouchl.setOnClickListener( this);
|
||||
// mBinding.ivShouchl.setOnClickListener( this);
|
||||
requestGpsPermissions();
|
||||
}
|
||||
|
||||
@@ -393,43 +394,43 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页").withString("roomId", roomId).navigation();
|
||||
// }
|
||||
}
|
||||
else if (id == R.id.iv_shouchl) {//首充
|
||||
FirstChargeDialog firstChargeDialog = new FirstChargeDialog(this);
|
||||
firstChargeDialog.show();
|
||||
firstChargeDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
//首充弹窗关闭后,弹首充
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
firstChargeDialog.setOnFirstChargeListener(new FirstChargeDialog.OnFirstChargeListener() {
|
||||
@Override
|
||||
public void onFirstChargeConfirmed(FirstChargeGiftBean giftBean, int type) {
|
||||
String s = null;
|
||||
if (type == 1) {
|
||||
s = giftBean.getGift_bag().get(0).getMoney();
|
||||
|
||||
} else if (type == 2) {
|
||||
s = giftBean.getGift_bag().get(1).getMoney();
|
||||
} else if (type == 3) {
|
||||
s = giftBean.getGift_bag().get(2).getMoney();
|
||||
}
|
||||
if (s == null) {
|
||||
ToastUtils.showShort("暂无礼物");
|
||||
return;
|
||||
}
|
||||
|
||||
RechargeDialogFragment.show(null, s, getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFirstChargeCancelled() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
// else if (id == R.id.iv_shouchl) {//首充
|
||||
// FirstChargeDialog firstChargeDialog = new FirstChargeDialog(this);
|
||||
// firstChargeDialog.show();
|
||||
// firstChargeDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
// @Override
|
||||
// public void onDismiss(DialogInterface dialog) {
|
||||
// //首充弹窗关闭后,弹首充
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// firstChargeDialog.setOnFirstChargeListener(new FirstChargeDialog.OnFirstChargeListener() {
|
||||
// @Override
|
||||
// public void onFirstChargeConfirmed(FirstChargeGiftBean giftBean, int type) {
|
||||
// String s = null;
|
||||
// if (type == 1) {
|
||||
// s = giftBean.getGift_bag().get(0).getMoney();
|
||||
//
|
||||
// } else if (type == 2) {
|
||||
// s = giftBean.getGift_bag().get(1).getMoney();
|
||||
// } else if (type == 3) {
|
||||
// s = giftBean.getGift_bag().get(2).getMoney();
|
||||
// }
|
||||
// if (s == null) {
|
||||
// ToastUtils.showShort("暂无礼物");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// RechargeDialogFragment.show(null, s, getSupportFragmentManager());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFirstChargeCancelled() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -547,16 +548,9 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
}
|
||||
|
||||
|
||||
MvpPre.getMyInfo(SpUtil.getUserId() + "");//获取首充是否需要展示
|
||||
// MvpPre.getMyInfo(SpUtil.getUserId() + "");//获取首充是否需要展示
|
||||
|
||||
// MvpPre.activitiesPermission();
|
||||
|
||||
|
||||
// mBinding.ivShouchl.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
// 请求GPS相关权限(精确位置+可选的后台权限)
|
||||
//
|
||||
MvpPre.activitiesPermission();//获取悬浮框权限
|
||||
|
||||
}
|
||||
|
||||
@@ -712,13 +706,13 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
|
||||
@Override
|
||||
public void myInfoSuccess(FirstChargeBean data) {
|
||||
if (data != null) {
|
||||
if (data.getPermission() == 1) {
|
||||
mBinding.ivShouchl.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.ivShouchl.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
// if (data != null) {
|
||||
// if (data.getPermission() == 1) {
|
||||
// mBinding.ivShouchl.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.ivShouchl.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -828,38 +822,79 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
// list.add(ResourcesCompat.getDrawable(getResources(), com.xscm.moduleutil.R.mipmap.xinrhl, null));
|
||||
}
|
||||
|
||||
// mBinding.banner.setBannerData(list);
|
||||
//
|
||||
// mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
//
|
||||
// @Override
|
||||
// public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
// PermissionPicBean permissionPicBean = (PermissionPicBean) model;
|
||||
// ImageView imageView = (ImageView) view;
|
||||
// imageView.setImageResource(permissionPicBean.getPicId());
|
||||
// }
|
||||
// });
|
||||
// mBinding.banner.setOnItemClickListener(new XBanner.OnItemClickListener() {
|
||||
//
|
||||
// @Override
|
||||
// public void onItemClick(XBanner banner, Object model, View view, int position) {
|
||||
// PermissionPicBean bannerModel = (PermissionPicBean) model;
|
||||
// if (bannerModel.getType() == 1){//首充
|
||||
// firstCharge();
|
||||
// }else if (bannerModel.getType() == 2){//天降
|
||||
//
|
||||
// }else if (bannerModel.getType() == 3){//新人
|
||||
// newPeople();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
mBinding.banner.setBannerData(list);
|
||||
|
||||
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
|
||||
@Override
|
||||
public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
PermissionPicBean permissionPicBean = (PermissionPicBean) model;
|
||||
ImageView imageView = (ImageView) view;
|
||||
imageView.setImageResource(permissionPicBean.getPicId());
|
||||
}
|
||||
});
|
||||
mBinding.banner.setOnItemClickListener(new XBanner.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(XBanner banner, Object model, View view, int position) {
|
||||
PermissionPicBean bannerModel = (PermissionPicBean) model;
|
||||
if (bannerModel.getType() == 1){//首充
|
||||
firstCharge();
|
||||
}else if (bannerModel.getType() == 2){//天降
|
||||
heavenGiftDialog();
|
||||
}else if (bannerModel.getType() == 3){//新人
|
||||
newPeople();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TODO: 2025/10/12 天降好礼
|
||||
private void heavenGiftDialog(){
|
||||
HeavenGiftDialog heavenGiftDialog = new HeavenGiftDialog(this);
|
||||
heavenGiftDialog.show();
|
||||
}
|
||||
|
||||
// TODO: 2025/10/12 新人好礼
|
||||
private void newPeople(){
|
||||
NewPeopleDialog newPeopleDialog = new NewPeopleDialog(this);
|
||||
newPeopleDialog.show();
|
||||
newPeopleDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
//新人弹窗关闭后,弹首充
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
newPeopleDialog.setOnFirstChargeListener(new NewPeopleDialog.OnFirstChargeListener() {
|
||||
@Override
|
||||
public void onFirstChargeConfirmed(FirstChargeGiftBean giftBean, int type) {
|
||||
String s = null;
|
||||
if (type == 1) {
|
||||
s = giftBean.getGift_bag().get(0).getMoney();
|
||||
|
||||
} else if (type == 2) {
|
||||
s = giftBean.getGift_bag().get(1).getMoney();
|
||||
} else if (type == 3) {
|
||||
s = giftBean.getGift_bag().get(2).getMoney();
|
||||
}else if (type==4){
|
||||
s = giftBean.getGift_bag().get(3).getMoney();
|
||||
}
|
||||
if (s == null) {
|
||||
ToastUtils.showShort("暂无礼物");
|
||||
return;
|
||||
}
|
||||
|
||||
RechargeDialogFragment.show(null, s, getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFirstChargeCancelled() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -220,36 +220,36 @@
|
||||
android:src="@mipmap/icon_guanbi"/>
|
||||
</com.xscm.moduleutil.widget.DropView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_shouchl"
|
||||
android:layout_width="@dimen/dp_57"
|
||||
android:layout_height="@dimen/dp_57"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:src="@mipmap/shouchl"/>
|
||||
|
||||
<!-- <com.stx.xhb.xbanner.XBanner-->
|
||||
<!-- android:id="@+id/banner"-->
|
||||
<!-- android:layout_width="@dimen/dp_75"-->
|
||||
<!-- android:layout_height="@dimen/dp_85"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- app:AutoPlayTime="3000"-->
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_shouchl"-->
|
||||
<!-- android:layout_width="@dimen/dp_57"-->
|
||||
<!-- android:layout_height="@dimen/dp_57"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- app:pageChangeDuration="3000"-->
|
||||
<!-- app:pointContainerPosition="BOTTOM"-->
|
||||
<!-- app:pointNormal="@mipmap/room_ic_banner_point_normal"-->
|
||||
<!-- app:pointSelect="@mipmap/room_ic_banner_point_select"-->
|
||||
<!-- app:pointTopBottomPadding="@dimen/dp_2"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_100"-->
|
||||
<!-- app:pointsPosition="CENTER"-->
|
||||
<!-- app:pointsVisibility="true"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true"-->
|
||||
<!-- />-->
|
||||
<!-- android:src="@mipmap/shouchl"/>-->
|
||||
|
||||
<com.stx.xhb.xbanner.XBanner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="@dimen/dp_75"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:scaleType="fitCenter"
|
||||
app:AutoPlayTime="3000"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
app:pageChangeDuration="3000"
|
||||
app:pointContainerPosition="BOTTOM"
|
||||
app:pointNormal="@mipmap/room_ic_banner_point_normal"
|
||||
app:pointSelect="@mipmap/room_ic_banner_point_select"
|
||||
app:pointTopBottomPadding="@dimen/dp_2"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
app:pointsPosition="CENTER"
|
||||
app:pointsVisibility="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</layout>
|
||||
@@ -343,6 +343,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
LogUtils.e("RoomActivity", "onPause")
|
||||
|
||||
if (mRoomInfoResp != null) {
|
||||
if (mRoomInfoResp!!.room_info.type_id != "6") {
|
||||
// 只有在用户主动离开应用时才执行最小化操作
|
||||
@@ -350,6 +351,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// 保持Activity alive,不调用finish()
|
||||
|
||||
minimizeToBackground()
|
||||
|
||||
userLeaving = false // 重置标记
|
||||
}
|
||||
}
|
||||
@@ -488,6 +490,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
supportFragmentManager.findFragmentById(R.id.vp_room_pager) // 替换为你实际的容器 ID
|
||||
if (currentFragment is RoomCabinFragment) {
|
||||
currentFragment.onConfigurationChanged(newConfig)
|
||||
initPublicScreenFragment()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1083,6 +1086,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private fun enterLandscapeMode() {
|
||||
isFullScreen = true
|
||||
|
||||
@@ -1195,6 +1201,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
// 隐藏退出按钮
|
||||
ivExitFullscreen!!.visibility = View.GONE
|
||||
// upHeight()
|
||||
// initPublicScreenFragment()
|
||||
// if (!isFinishing && !isDestroyed) {
|
||||
// resetFragment()
|
||||
// upHeight()
|
||||
// } else {
|
||||
// Log.e("Fragment", "Fragment transaction skipped due to state loss.")
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// isFullScreen = false;
|
||||
@@ -3757,6 +3772,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// 恢复房间状态
|
||||
resumeRoomState()
|
||||
setupEffectView()
|
||||
|
||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)
|
||||
// resetFragment()
|
||||
}
|
||||
@@ -3932,6 +3948,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
val roomBean = resp.room_info
|
||||
if (roomBean!!.type_id.equals("6")){
|
||||
|
||||
// upHeight()
|
||||
initPublicScreenFragment()
|
||||
if (!isFinishing && !isDestroyed) {
|
||||
resetFragment()
|
||||
upHeight()
|
||||
} else {
|
||||
Log.e("Fragment", "Fragment transaction skipped due to state loss.")
|
||||
}
|
||||
return
|
||||
}
|
||||
this.mRoomBean = roomBean
|
||||
|
||||
@@ -553,34 +553,6 @@
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_135"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_screenshare"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:src="@mipmap/quan"
|
||||
android:translationZ="10dp"/>
|
||||
<!-- 自定义内容 -->
|
||||
</com.xscm.moduleutil.widget.floatingView.Floa>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat_zuoji"
|
||||
@@ -724,5 +696,36 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_135"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:translationZ="1000dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_screenshare"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:src="@mipmap/quan"
|
||||
android:translationZ="10dp"/>
|
||||
<!-- 自定义内容 -->
|
||||
</com.xscm.moduleutil.widget.floatingView.Floa>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -141,15 +141,14 @@
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.RoomMakeWheatView
|
||||
android:id="@+id/room_make_wheat2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_p"
|
||||
app:room_make_wheat_number="888" />
|
||||
|
||||
android:id="@+id/room_make_wheat2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_p"
|
||||
app:room_make_wheat_number="888"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/container"
|
||||
@@ -173,11 +172,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="关系"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_relation"
|
||||
@@ -199,7 +198,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:id="@+id/tv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
@@ -207,6 +205,7 @@
|
||||
android:text="礼物"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_gift"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_gift" />
|
||||
@@ -286,6 +285,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="一号麦"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -328,6 +328,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="二号麦"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -371,6 +372,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="三号麦"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/room_make_wheat2"
|
||||
app:layout_constraintStart_toEndOf="@+id/room_make_wheat1"
|
||||
app:layout_constraintTop_toTopOf="@+id/room_make_wheat1"
|
||||
tools:visibility="visible">
|
||||
>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
|
||||
Reference in New Issue
Block a user