1.添加背包礼物交友功能
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
android {
|
android {
|
||||||
namespace 'com.xscm.midi'
|
namespace 'com.xscm.midi'
|
||||||
compileSdk 35
|
compileSdk 35
|
||||||
@@ -18,7 +18,7 @@ android {
|
|||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
//设置支持的so库
|
//设置支持的so库
|
||||||
abiFilters 'arm64-v8a' ,'armeabi'
|
abiFilters 'arm64-v8a', 'armeabi'
|
||||||
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ dependencies {
|
|||||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||||
|
|
||||||
|
|
||||||
implementation (libs.arouter.api.v150)
|
implementation(libs.arouter.api.v150)
|
||||||
//annotationProcessor
|
//annotationProcessor
|
||||||
annotationProcessor libs.arouter.compiler
|
annotationProcessor libs.arouter.compiler
|
||||||
implementation project(':modulevocal') // 必须
|
implementation project(':modulevocal') // 必须
|
||||||
|
|||||||
@@ -307,11 +307,13 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
bundle.putSerializable("userBean", userBean);
|
bundle.putSerializable("userBean", userBean);
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
} else {
|
} else {
|
||||||
EventBus.getDefault().post(userBean);
|
EventBus.getDefault().post(userBean);
|
||||||
startActivity(new Intent(this, MainActivity.class));
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
finish();
|
// finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ isBuildModule=false
|
|||||||
#org.gradle.deamon=false
|
#org.gradle.deamon=false
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.0
|
APP_VERSION_NAME=1.0.1
|
||||||
APP_VERSION_CODE=129
|
APP_VERSION_CODE=130
|
||||||
|
|
||||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ githubRealtimeblurviewVersion = "1.2.1"
|
|||||||
githubShadowlayout = "3.3.1"
|
githubShadowlayout = "3.3.1"
|
||||||
gradle = "8.8.0"
|
gradle = "8.8.0"
|
||||||
#gradle = "8.5.0-alpha04"
|
#gradle = "8.5.0-alpha04"
|
||||||
|
greendaoGradlePlugin = "3.3.0"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.1.5"
|
junitVersion = "1.1.5"
|
||||||
espressoCore = "3.5.1"
|
espressoCore = "3.5.1"
|
||||||
@@ -97,6 +98,7 @@ github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "
|
|||||||
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
|
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
|
||||||
#glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
|
#glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
|
||||||
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
|
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
|
||||||
|
greendao-gradle-plugin = { module = "org.greenrobot:greendao-gradle-plugin", version.ref = "greendaoGradlePlugin" }
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||||
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.xscm.moduleutil.R;
|
|||||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
@@ -84,8 +85,8 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
MvpPre.getGiftList("0", type, roomId);
|
MvpPre.getGiftList("0", type, roomId);
|
||||||
} else {
|
} else {
|
||||||
if (id==null){
|
if (id == null) {
|
||||||
id="0";
|
id = "0";
|
||||||
}
|
}
|
||||||
MvpPre.getGiftList(id, type, roomId);
|
MvpPre.getGiftList(id, type, roomId);
|
||||||
}
|
}
|
||||||
@@ -94,23 +95,23 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onString(String giftId){
|
public void onString(String giftId) {
|
||||||
bdgiftId=giftId;
|
bdgiftId = giftId;
|
||||||
MvpPre.giftPack();
|
MvpPre.giftPack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
if (id.equals("0")) {
|
// if (id.equals("0")) {
|
||||||
MvpPre.giftPack();
|
// MvpPre.giftPack();
|
||||||
} else {
|
// } else {
|
||||||
if (type == 0) {
|
// if (type == 0) {
|
||||||
MvpPre.getGiftList("0", type, roomId);
|
// MvpPre.getGiftList("0", type, roomId);
|
||||||
} else {
|
// } else {
|
||||||
MvpPre.getGiftList(id, type, roomId);
|
// MvpPre.getGiftList(id, type, roomId);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -183,23 +184,33 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
@Override
|
@Override
|
||||||
public void giftPack(List<GiftPackBean> giftPackBean) {
|
public void giftPack(List<GiftPackBean> giftPackBean) {
|
||||||
giftPackList = new ArrayList<>();
|
giftPackList = new ArrayList<>();
|
||||||
if (bdgiftId!=null){
|
|
||||||
for (GiftPackBean item : giftPackBean){
|
if (giftPackBean != null && giftPackBean.size() > 0) {
|
||||||
if (item.getGift_id().equals(bdgiftId)){
|
|
||||||
item.setChecked(true);
|
if (bdgiftId != null) {
|
||||||
|
for (GiftPackBean item : giftPackBean) {
|
||||||
|
if (item.getGift_id().equals(bdgiftId)) {
|
||||||
|
item.setChecked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
giftPackList.addAll(giftPackBean);
|
||||||
|
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
||||||
|
for (int j = 0; j < pageCount; j++) {
|
||||||
giftPackList.addAll(giftPackBean);
|
|
||||||
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
|
||||||
for (int j = 0; j < pageCount; j++) {
|
|
||||||
// mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
|
// mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
|
||||||
// mBinding.rvGift.setAdapter(mAdapter);
|
// mBinding.rvGift.setAdapter(mAdapter);
|
||||||
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, j, "0");
|
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, j, "0");
|
||||||
|
mBinding.rvGift.setAdapter(packAdapter);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
giftPackBean = new ArrayList<>();
|
||||||
|
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
||||||
|
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, 0, "0");
|
||||||
mBinding.rvGift.setAdapter(packAdapter);
|
mBinding.rvGift.setAdapter(packAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +218,11 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {
|
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.xscm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/9/15
|
||||||
|
*@description: 背包礼物总价值
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GiftPackListCount {
|
||||||
|
private String count;
|
||||||
|
}
|
||||||
@@ -18,6 +18,7 @@ import com.xscm.moduleutil.bean.GiftBoxRecordBean;
|
|||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftName;
|
import com.xscm.moduleutil.bean.GiftName;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||||
import com.xscm.moduleutil.bean.HeadlineBean;
|
import com.xscm.moduleutil.bean.HeadlineBean;
|
||||||
import com.xscm.moduleutil.bean.HeatedBean;
|
import com.xscm.moduleutil.bean.HeatedBean;
|
||||||
@@ -193,7 +194,7 @@ public interface ApiServer {
|
|||||||
Observable<BaseModel<List<MyBagDataBean>>> packOutcome(@Query("page") String page, @Query("page_limit") String page_size);
|
Observable<BaseModel<List<MyBagDataBean>>> packOutcome(@Query("page") String page, @Query("page_limit") String page_size);
|
||||||
|
|
||||||
@GET(Constants.GET_GIFT_PACK)
|
@GET(Constants.GET_GIFT_PACK)
|
||||||
Observable<BaseModel<List<GiftPackBean>>> giftPack();
|
Call<BaseModel<List<GiftPackBean>>> giftPack();
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.ADD_BLACK_LIST)
|
@POST(Constants.ADD_BLACK_LIST)
|
||||||
@@ -767,10 +768,13 @@ public interface ApiServer {
|
|||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_GIFT_ALL_CLEAR)
|
@POST(Constants.POST_GIFT_ALL_CLEAR)
|
||||||
Call<BaseModel<String>> getGiftPack(@Field("room_id") String roomId,@Field("to_uid") String user_id,@Field("heart_id") String heart_id);
|
Call<BaseModel<String>> getGiftPack(@Field("room_id") String roomId,@Field("to_uid") String user_id,@Field("heart_id") String heart_id,@Field("auction_id") String auction_id);
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_ROOM_USER_CHARM_LIST)
|
@POST(Constants.POST_ROOM_USER_CHARM_LIST)
|
||||||
Call<BaseModel<List<RoomUserCharmListBean>>> roomUserCharmList(@Field("room_id") String roomId,@Field("user_id") String user_id);
|
Call<BaseModel<List<RoomUserCharmListBean>>> roomUserCharmList(@Field("room_id") String roomId,@Field("user_id") String user_id);
|
||||||
|
|
||||||
|
@GET(Constants.GET_GIFT_PACK_LIST_COUNT)
|
||||||
|
Call<BaseModel<GiftPackListCount>> getGiftPackListCount();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.xscm.moduleutil.bean.GiftBoxRecordBean;
|
|||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftName;
|
import com.xscm.moduleutil.bean.GiftName;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||||
import com.xscm.moduleutil.bean.HeadlineBean;
|
import com.xscm.moduleutil.bean.HeadlineBean;
|
||||||
import com.xscm.moduleutil.bean.HeatedBean;
|
import com.xscm.moduleutil.bean.HeatedBean;
|
||||||
@@ -455,11 +456,29 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void giftPack(BaseObserver<List<GiftPackBean>> observer) {
|
public void giftPack(BaseObserver<List<GiftPackBean>> observer) {
|
||||||
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.giftPack().enqueue(new Callback<BaseModel<List<GiftPackBean>>>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<List<GiftPackBean>>> call, Response<BaseModel<List<GiftPackBean>>> response) {
|
||||||
|
if (response.code() == 200){
|
||||||
|
BaseModel<List<GiftPackBean>> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1) {
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else {
|
||||||
|
observer.onNext(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<List<GiftPackBean>>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGiftPack(String roomId, String userId, String heart_id,BaseObserver<String> observer){
|
public void getGiftPack(String roomId, String userId, String heart_id,String auction_id,BaseObserver<String> observer){
|
||||||
sApiServer.getGiftPack(roomId,userId,heart_id).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.getGiftPack(roomId,userId,heart_id,auction_id).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
if (response.code() == 200){
|
if (response.code() == 200){
|
||||||
@@ -479,6 +498,25 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getGiftPackListCount(BaseObserver<GiftPackListCount> observer){
|
||||||
|
sApiServer.getGiftPackListCount().enqueue(new Callback<BaseModel<GiftPackListCount>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<GiftPackListCount>> call, Response<BaseModel<GiftPackListCount>> response) {
|
||||||
|
if (response.code() == 200){
|
||||||
|
BaseModel<GiftPackListCount> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1){
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<GiftPackListCount>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void tasksLihen(BaseObserver<GiftBoxBean> observer) {
|
public void tasksLihen(BaseObserver<GiftBoxBean> observer) {
|
||||||
sApiServer.tasksLihen().enqueue(new Callback<ResponseBody>() {
|
sApiServer.tasksLihen().enqueue(new Callback<ResponseBody>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.xscm.moduleutil.activity.IPresenter;
|
|||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
@@ -29,6 +30,8 @@ public class RewardGiftContacts {
|
|||||||
void giftPack(List<GiftPackBean> giftPackBean);
|
void giftPack(List<GiftPackBean> giftPackBean);
|
||||||
|
|
||||||
void getGiftPack(String s);
|
void getGiftPack(String s);
|
||||||
|
|
||||||
|
void getGiftPackListCount(GiftPackListCount giftPackListCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IIndexPre extends IPresenter {
|
public interface IIndexPre extends IPresenter {
|
||||||
@@ -51,6 +54,8 @@ public class RewardGiftContacts {
|
|||||||
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
||||||
void giftPack();
|
void giftPack();
|
||||||
|
|
||||||
void getGiftPack(String roomId,String userId,String heart_id);
|
void getGiftPack(String roomId,String userId,String heart_id,String auction_id );
|
||||||
|
|
||||||
|
void getGiftPackListCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
|
|
||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
@@ -17,6 +18,7 @@ import io.reactivex.disposables.Disposable;
|
|||||||
|
|
||||||
public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View> implements RewardGiftContacts.IIndexPre {
|
public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View> implements RewardGiftContacts.IIndexPre {
|
||||||
RewardGiftContacts.View mView;
|
RewardGiftContacts.View mView;
|
||||||
|
|
||||||
public RewardGiftPresenter(RewardGiftContacts.View view, Context context) {
|
public RewardGiftPresenter(RewardGiftContacts.View view, Context context) {
|
||||||
super(view, context);
|
super(view, context);
|
||||||
mView = view;
|
mView = view;
|
||||||
@@ -32,7 +34,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<RewardUserBean> rewardUserBeans) {
|
public void onNext(List<RewardUserBean> rewardUserBeans) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().getRewardList(rewardUserBeans);
|
MvpRef.get().getRewardList(rewardUserBeans);
|
||||||
@@ -51,7 +53,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<GiftLabelBean> giftLabelBeans) {
|
public void onNext(List<GiftLabelBean> giftLabelBeans) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().getGiftLabel(giftLabelBeans);
|
MvpRef.get().getGiftLabel(giftLabelBeans);
|
||||||
@@ -61,8 +63,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftList(String id, int type,String roomId) {
|
public void getGiftList(String id, int type, String roomId) {
|
||||||
api.getGiftList(Integer.parseInt(id),roomId, new BaseObserver<List<RoonGiftModel>>() {
|
api.getGiftList(Integer.parseInt(id), roomId, new BaseObserver<List<RoonGiftModel>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@@ -71,7 +73,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<RoonGiftModel> roonGiftModels) {
|
public void onNext(List<RoonGiftModel> roonGiftModels) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().setGiftList(roonGiftModels, type);
|
MvpRef.get().setGiftList(roonGiftModels, type);
|
||||||
@@ -90,7 +92,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().giveGift();
|
MvpRef.get().giveGift();
|
||||||
@@ -99,8 +101,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number,String heart_id) {
|
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number, String heart_id) {
|
||||||
api.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number,heart_id, new BaseObserver<String>() {
|
api.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id, new BaseObserver<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@@ -109,7 +111,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().giveGift();
|
MvpRef.get().giveGift();
|
||||||
@@ -127,7 +129,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(WalletBean walletBean) {
|
public void onNext(WalletBean walletBean) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().wallet(walletBean);
|
MvpRef.get().wallet(walletBean);
|
||||||
@@ -146,7 +148,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().reward_zone();
|
MvpRef.get().reward_zone();
|
||||||
@@ -164,7 +166,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().reward_zone();
|
MvpRef.get().reward_zone();
|
||||||
@@ -182,7 +184,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
|
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().roomAuctionJoin(auctionListBean);
|
MvpRef.get().roomAuctionJoin(auctionListBean);
|
||||||
@@ -201,7 +203,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<GiftPackBean> giftPackBeans) {
|
public void onNext(List<GiftPackBean> giftPackBeans) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().giftPack(giftPackBeans);
|
MvpRef.get().giftPack(giftPackBeans);
|
||||||
@@ -210,8 +212,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftPack(String roomId,String userId,String heart_id) {
|
public void getGiftPack(String roomId, String userId, String heart_id, String auction_id) {
|
||||||
api.getGiftPack(roomId,userId,heart_id, new BaseObserver<String>() {
|
api.getGiftPack(roomId, userId, heart_id, auction_id, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -219,15 +221,33 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
if (MvpRef==null){
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
if (s==null){
|
if (s == null) {
|
||||||
MvpRef.get().getGiftPack(null);
|
MvpRef.get().getGiftPack(null);
|
||||||
}else {
|
} else {
|
||||||
MvpRef.get().getGiftPack(s);
|
MvpRef.get().getGiftPack(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount() {
|
||||||
|
api.getGiftPackListCount(new BaseObserver<GiftPackListCount>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(GiftPackListCount giftPackListCount) {
|
||||||
|
if (MvpRef == null) {
|
||||||
|
MvpRef = new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
MvpRef.get().getGiftPackListCount(giftPackListCount);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,6 +386,7 @@ public class Constants {
|
|||||||
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
||||||
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
||||||
public static final String POST_ROOM_USER_CHARM_LIST = "/api/Room/room_user_charm_list";///房间用户当前魅力值列表
|
public static final String POST_ROOM_USER_CHARM_LIST = "/api/Room/room_user_charm_list";///房间用户当前魅力值列表
|
||||||
|
public static final String GET_GIFT_PACK_LIST_COUNT = "/api/UserGiftPack/get_gift_pack_list_count";///背包礼物总价值
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.xscm.moduleutil.R;
|
|||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
@@ -196,4 +197,9 @@ public class RewardDialogFragment extends BaseMvpDialogFragment<RewardGiftPresen
|
|||||||
public void getGiftPack(String s) {
|
public void getGiftPack(String s) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
|||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
@@ -292,6 +293,11 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<GiftLabelBean> list;
|
private List<GiftLabelBean> list;
|
||||||
|
|||||||
@@ -29,18 +29,6 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
|
||||||
<!-- android:id="@+id/iv_ripple"-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="0dp"-->
|
|
||||||
<!-- android:layout_marginTop="@dimen/dp_8"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintHeight_percent="0.99"-->
|
|
||||||
<!-- app:layout_constraintWidth_percent="0.99"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- />-->
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
android:id="@+id/iv_frame"
|
android:id="@+id/iv_frame"
|
||||||
@@ -50,13 +38,11 @@
|
|||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||||
app:layout_constraintHeight_percent="0.95"
|
app:layout_constraintStart_toStartOf="@id/riv"
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
app:layout_constraintTop_toTopOf="@id/riv"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_margin="-5dp"/>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintWidth_percent="0.95" />
|
|
||||||
|
|
||||||
<com.opensource.svgaplayer.SVGAImageView
|
<com.opensource.svgaplayer.SVGAImageView
|
||||||
android:id="@+id/iv_ripple"
|
android:id="@+id/iv_ripple"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
android:launchMode="singleInstance"
|
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
/>
|
/>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
CommonAppContext.getInstance().isShow = false;
|
CommonAppContext.getInstance().isShow = false;
|
||||||
ARouter.getInstance().build(ARouteConstants.ME)
|
ARouter.getInstance().build(ARouteConstants.ME)
|
||||||
.withFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
.withFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
.navigation();
|
.navigation();
|
||||||
// moveTaskToBack(true);
|
// moveTaskToBack(true);
|
||||||
|
|
||||||
@@ -1012,11 +1012,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
if (msgType == 1005) {
|
if (msgType == 1005) {
|
||||||
LogUtils.e("@@@@" + "EventBusnujm2" + "playQueue.size()====" + messageEvent.getText().getGiftInfo());
|
LogUtils.e("@@@@" + "EventBusnujm2" + "playQueue.size()====" + messageEvent.getText().getGiftInfo());
|
||||||
// synchronized (roomMessageLock) {
|
|
||||||
// roomMessageEventQueue.add(messageEvent.getText().getGiftInfo().getPlay_image());
|
|
||||||
// }
|
|
||||||
QXGiftPlayerManager.getInstance(this).displayFullEffectView(messageEvent.getText().getGiftInfo());
|
QXGiftPlayerManager.getInstance(this).displayFullEffectView(messageEvent.getText().getGiftInfo());
|
||||||
// handleMsgType1005(messageEvent, text);
|
|
||||||
hand1005(messageEvent, text);
|
hand1005(messageEvent, text);
|
||||||
} else if (msgType == 123) {
|
} else if (msgType == 123) {
|
||||||
EventBus.getDefault().post(new RoomSettingEvent());
|
EventBus.getDefault().post(new RoomSettingEvent());
|
||||||
@@ -1222,7 +1219,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
if (fromUserId != null && fromUserId.equals(currentUserId)) {
|
if (fromUserId != null && fromUserId.equals(currentUserId)) {
|
||||||
try {
|
try {
|
||||||
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(toBean.getPit_number()));
|
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(fromBean.getPit_number()));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
LogUtils.e("Invalid pit number: " + toBean.getPit_number());
|
LogUtils.e("Invalid pit number: " + toBean.getPit_number());
|
||||||
}
|
}
|
||||||
@@ -1230,7 +1227,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
try {
|
try {
|
||||||
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(fromBean.getPit_number()));
|
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(fromBean.getPit_number()));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
LogUtils.e("Invalid pit number: " + fromBean.getPit_number());
|
LogUtils.e("Invalid pit number: " + toBean.getPit_number());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1255,6 +1252,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else if ("7".equals(typeId)) {
|
} else if ("7".equals(typeId)) {
|
||||||
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
||||||
}
|
}
|
||||||
|
if (mRoomInfoResp.getUser_info().getPit_number()==9){
|
||||||
|
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||||
|
ivSoundEffects(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1443,6 +1444,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
if ("9".equals(pitNumber) && userId == currentUserId) {
|
if ("9".equals(pitNumber) && userId == currentUserId) {
|
||||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||||
|
ivSoundEffects(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userId == currentUserId) {
|
if (userId == currentUserId) {
|
||||||
@@ -1456,11 +1458,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
switchMic(2);
|
switchMic(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pitNumber.equals("9")) {
|
|
||||||
ivSoundEffects(true);
|
|
||||||
} else {
|
|
||||||
ivSoundEffects(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
String typeId = mRoomInfoResp.getRoom_info().getType_id();
|
String typeId = mRoomInfoResp.getRoom_info().getType_id();
|
||||||
if ("2".equals(typeId)) {
|
if ("2".equals(typeId)) {
|
||||||
@@ -1488,6 +1486,12 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
} else {
|
} else {
|
||||||
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (pitNumber.equals("9") && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId()+"")) {
|
||||||
|
// ivSoundEffects(true);
|
||||||
|
// } else {
|
||||||
|
// ivSoundEffects(false);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleMsgType1004(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
private void handleMsgType1004(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||||
@@ -1522,6 +1526,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
isMusic = false;
|
isMusic = false;
|
||||||
}
|
}
|
||||||
mBinding.roomTop.rl.setVisibility(GONE);
|
mBinding.roomTop.rl.setVisibility(GONE);
|
||||||
|
ivSoundEffects(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
String typeId = mRoomInfoResp.getRoom_info().getType_id();
|
String typeId = mRoomInfoResp.getRoom_info().getType_id();
|
||||||
@@ -1739,6 +1744,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
pendingRoomId = text.getRoom_id();
|
pendingRoomId = text.getRoom_id();
|
||||||
|
if (pendingRoomId == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
LogUtils.e("需要加入的房间id:pendingRoomId: " + pendingRoomId);
|
LogUtils.e("需要加入的房间id:pendingRoomId: " + pendingRoomId);
|
||||||
roomSwitchRunnable = () -> {
|
roomSwitchRunnable = () -> {
|
||||||
if (!isFinishing() && !isDestroyed()) {
|
if (!isFinishing() && !isDestroyed()) {
|
||||||
@@ -2480,18 +2488,14 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (roleType != 5) {
|
||||||
// 类型房间规则覆盖
|
|
||||||
if ("2".equals(typeId)) {
|
|
||||||
rl_misc.setVisibility(View.GONE);
|
|
||||||
rl_more.setVisibility(View.GONE);
|
|
||||||
} else if (roleType != 5) {
|
|
||||||
rl_misc.setVisibility(View.VISIBLE);
|
rl_misc.setVisibility(View.VISIBLE);
|
||||||
if (userPitNumber == 9) {
|
if (userPitNumber == 9) {
|
||||||
rl_more.setVisibility(GONE);
|
rl_more.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// label_id 和 type_id 联合判断
|
// label_id 和 type_id 联合判断
|
||||||
if (Arrays.asList("1", "3", "4").contains(typeId) && "2".equals(labelId)) {
|
if (Arrays.asList("1", "3", "4").contains(typeId) && "2".equals(labelId)) {
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
@@ -2514,7 +2518,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("7".equals(typeId)) {
|
if ("7".equals(typeId) || "2".equals(typeId)) {
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
rl_misc.setVisibility(View.GONE);
|
rl_misc.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -2667,8 +2671,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
this.mRoomInfoResp = resp;
|
this.mRoomInfoResp = resp;
|
||||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||||
|
ivSoundEffects(true);
|
||||||
} else {
|
} else {
|
||||||
mBinding.roomTop.rl.setVisibility(View.GONE);
|
mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||||
|
ivSoundEffects(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2771,8 +2777,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||||
|
ivSoundEffects(true);
|
||||||
} else {
|
} else {
|
||||||
mBinding.roomTop.rl.setVisibility(View.GONE);
|
mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||||
|
ivSoundEffects(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
setupEffectView();
|
setupEffectView();
|
||||||
@@ -3269,7 +3277,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
|
|
||||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2") || mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2") || mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||||
mBinding.rlMore.setVisibility(GONE);
|
mBinding.rlMore.setVisibility(GONE);
|
||||||
mBinding.rlMisc.setVisibility(GONE);
|
// mBinding.rlMisc.setVisibility(GONE);
|
||||||
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")) {
|
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")) {
|
||||||
mBinding.rlMore.setVisibility(GONE);
|
mBinding.rlMore.setVisibility(GONE);
|
||||||
mBinding.rlMisc.setVisibility(VISIBLE);
|
mBinding.rlMisc.setVisibility(VISIBLE);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
|||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoomTypeModel;
|
import com.xscm.moduleutil.bean.RoomTypeModel;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
@@ -99,7 +100,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
private final List<String> oldSelectedIds = new LinkedList<>();
|
private final List<String> oldSelectedIds = new LinkedList<>();
|
||||||
private int jingp;//1:是点击的竞拍,2:是点击的送礼物
|
private int jingp;//1:是点击的竞拍,2:是点击的送礼物
|
||||||
private String heart_id = "";//交友房中,点击助力需要发送heart_id
|
private String heart_id = "";//交友房中,点击助力需要发送heart_id
|
||||||
|
private String auction_id;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RewardGiftPresenter bindPresenter() {
|
protected RewardGiftPresenter bindPresenter() {
|
||||||
@@ -243,8 +244,8 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
pitList.addAll(uniquePitSet);
|
pitList.addAll(uniquePitSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomInfoResp.getRoom_auction().getAuction_user()!=null ){
|
if (roomInfoResp.getRoom_auction().getAuction_user() != null) {
|
||||||
if (roomInfoResp.getRoom_auction().getAuction_user().getUser_id()!=null && !roomInfoResp.getRoom_auction().getAuction_user().getUser_id().equals(SpUtil.getUserId()+"")) {
|
if (roomInfoResp.getRoom_auction().getAuction_user().getUser_id() != null && !roomInfoResp.getRoom_auction().getAuction_user().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||||
rewardUserBean.setUser_id(roomInfoResp.getRoom_auction().getAuction_user().getUser_id());
|
rewardUserBean.setUser_id(roomInfoResp.getRoom_auction().getAuction_user().getUser_id());
|
||||||
rewardUserBean.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
rewardUserBean.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
||||||
@@ -260,7 +261,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
for (RoomPitBean bean : pitList) {
|
for (RoomPitBean bean : pitList) {
|
||||||
if (bean.getPit_number().equals(targetPit) &&
|
if (bean.getPit_number().equals(targetPit) &&
|
||||||
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
||||||
!bean.getUser_id().equals(SpUtil.getUserId()+"")) {
|
!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
|
|
||||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||||
rewardUserBean.setUser_id(bean.getUser_id());
|
rewardUserBean.setUser_id(bean.getUser_id());
|
||||||
@@ -398,17 +399,24 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
all = !all;
|
all = !all;
|
||||||
oldSelectedIds.clear();
|
oldSelectedIds.clear();
|
||||||
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
||||||
}else if (view1.getId() == R.id.tv_bb_qs){
|
} else if (view1.getId() == R.id.tv_bb_qs) {
|
||||||
int count =gifyuseradapter.getSelectCount();
|
int count = gifyuseradapter.getSelectCount();
|
||||||
if (count<0){
|
if (count < 0) {
|
||||||
ToastUtils.show("请选择打赏的用户");
|
ToastUtils.show("请选择打赏的用户");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gifyuseradapter.getUserIdCount()>1){
|
if (gifyuseradapter.getUserIdCount() > 1) {
|
||||||
ToastUtils.show("一键全送只能选择一个用户");
|
ToastUtils.show("一键全送只能选择一个用户");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MvpPre.getGiftPack(roomId,gifyuseradapter.getUserIdToString(),heart_id);
|
if (userInfo != null) {
|
||||||
|
if (userInfo.getAuction_id() != null) {
|
||||||
|
auction_id =userInfo.getAuction_id();
|
||||||
|
} else {
|
||||||
|
auction_id = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MvpPre.getGiftPack(roomId, gifyuseradapter.getUserIdToString(), heart_id, auction_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,7 +472,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
FragmentManager fm = getParentFragmentManager();
|
FragmentManager fm = getParentFragmentManager();
|
||||||
if (fm != null && !fm.isDestroyed()) {
|
if (fm != null && !fm.isDestroyed()) {
|
||||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||||
String.valueOf(gift.getGift_bag()), roomId, userId,heart_id);
|
String.valueOf(gift.getGift_bag()), roomId, userId, heart_id);
|
||||||
newDialog.show(fm, "GiftLotteryDialog");
|
newDialog.show(fm, "GiftLotteryDialog");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -648,6 +656,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
mBinding.viewPager.setOffscreenPageLimit(0);
|
mBinding.viewPager.setOffscreenPageLimit(0);
|
||||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||||
|
refreshCurrentGiftFragment(giftLabelBeans.get(1).getId(),1,roomId);
|
||||||
mBinding.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
mBinding.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
@@ -658,6 +667,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
// 当页面切换时,控制 tv_bb_qs 按钮的显示
|
// 当页面切换时,控制 tv_bb_qs 按钮的显示
|
||||||
updateTvBbQsVisibility(position);
|
updateTvBbQsVisibility(position);
|
||||||
|
refreshCurrentGiftFragment(giftLabelBeans.get(position).getId(),1,roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -668,6 +678,35 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
// 初始化时设置按钮可见性
|
// 初始化时设置按钮可见性
|
||||||
updateTvBbQsVisibility(1);
|
updateTvBbQsVisibility(1);
|
||||||
}
|
}
|
||||||
|
// 调用示例
|
||||||
|
private void refreshCurrentGiftFragment(String id,int type,String roomId) {
|
||||||
|
// int currentPosition = mBinding.viewPager.getCurrentItem();
|
||||||
|
// if (currentPosition >= 0 && currentPosition < fragmentList.size()) {
|
||||||
|
// Fragment fragment = fragmentList.get(currentPosition);
|
||||||
|
// if (fragment instanceof GiftTwoDetailsFragment && fragment.isAdded()) {
|
||||||
|
// GiftTwoDetailsFragment giftFragment = (GiftTwoDetailsFragment) fragment;
|
||||||
|
// // 调用 fragment 的公共方法
|
||||||
|
// giftFragment.loadDataIfNeeded(id,type,roomId); // 假设 GiftTwoDetailsFragment 有这个方法
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
if (getCurrentGiftFragment()!=null){
|
||||||
|
getCurrentGiftFragment().loadDataIfNeeded(id,type,roomId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private GiftTwoDetailsFragment getCurrentGiftFragment() {
|
||||||
|
int currentPosition = mBinding.viewPager.getCurrentItem();
|
||||||
|
// 使用 ViewPager 的 adapter 获取当前 fragment
|
||||||
|
MyFragmentPagerAdapter adapter = (MyFragmentPagerAdapter) mBinding.viewPager.getAdapter();
|
||||||
|
if (adapter != null) {
|
||||||
|
// 直接从 adapter 获取 fragment
|
||||||
|
Fragment fragment = adapter.getItem(currentPosition);
|
||||||
|
if (fragment instanceof GiftTwoDetailsFragment) {
|
||||||
|
return (GiftTwoDetailsFragment) fragment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// 控制 tv_bb_qs 按钮显示的方法
|
// 控制 tv_bb_qs 按钮显示的方法
|
||||||
private void updateTvBbQsVisibility(int currentPosition) {
|
private void updateTvBbQsVisibility(int currentPosition) {
|
||||||
@@ -676,11 +715,15 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
// 显示按钮
|
// 显示按钮
|
||||||
if (mBinding.tvBbQs != null) {
|
if (mBinding.tvBbQs != null) {
|
||||||
mBinding.tvBbQs.setVisibility(View.VISIBLE);
|
mBinding.tvBbQs.setVisibility(View.VISIBLE);
|
||||||
|
mBinding.cz.setVisibility(View.GONE);
|
||||||
|
MvpPre.getGiftPackListCount();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 隐藏按钮
|
// 隐藏按钮
|
||||||
if (mBinding.tvBbQs != null) {
|
if (mBinding.tvBbQs != null) {
|
||||||
mBinding.tvBbQs.setVisibility(View.GONE);
|
mBinding.tvBbQs.setVisibility(View.GONE);
|
||||||
|
mBinding.cz.setVisibility(View.VISIBLE);
|
||||||
|
MvpPre.wallet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -695,7 +738,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
// dismiss();
|
// dismiss();
|
||||||
|
|
||||||
if (mBinding.viewPager.getCurrentItem() == 0) {
|
if (mBinding.viewPager.getCurrentItem() == 0) {
|
||||||
MvpPre.wallet();
|
MvpPre.getGiftPackListCount();
|
||||||
EventBus.getDefault().post(beibaoId);
|
EventBus.getDefault().post(beibaoId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -739,14 +782,21 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftPack(String s) {
|
public void getGiftPack(String s) {
|
||||||
if (s!=null){
|
if (s != null) {
|
||||||
com.hjq.toast.ToastUtils.show( s);
|
com.hjq.toast.ToastUtils.show(s);
|
||||||
dismiss();
|
dismiss();
|
||||||
}else {
|
} else {
|
||||||
com.hjq.toast.ToastUtils.show("一键全清背包礼物失败");
|
com.hjq.toast.ToastUtils.show("一键全清背包礼物失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||||
|
if (giftPackListCount != null){
|
||||||
|
mBinding.tvRewardGift.setText(giftPackListCount.getCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
private class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<GiftLabelBean> list;
|
private List<GiftLabelBean> list;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
|||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||||
|
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||||
import com.xscm.moduleutil.bean.RewardUserBean;
|
import com.xscm.moduleutil.bean.RewardUserBean;
|
||||||
import com.xscm.moduleutil.bean.RoomWheatEvent;
|
import com.xscm.moduleutil.bean.RoomWheatEvent;
|
||||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||||
@@ -220,6 +221,11 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<Fragment> fragmentList;
|
private List<Fragment> fragmentList;
|
||||||
|
|||||||
@@ -411,6 +411,9 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
if (userId==SpUtil.getUserId() && pitNumber.equals("9")){
|
if (userId==SpUtil.getUserId() && pitNumber.equals("9")){
|
||||||
myPitNumber=9;
|
myPitNumber=9;
|
||||||
configGameOptionBtn();
|
configGameOptionBtn();
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(true);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
for (int i = 0; i < mWheatViews.size(); i++){
|
for (int i = 0; i < mWheatViews.size(); i++){
|
||||||
if (i==Integer.parseInt(pitNumber) - 1){
|
if (i==Integer.parseInt(pitNumber) - 1){
|
||||||
@@ -443,6 +446,9 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
if (pitNumber.equals("9")){
|
if (pitNumber.equals("9")){
|
||||||
myPitNumber=0;
|
myPitNumber=0;
|
||||||
configGameOptionBtn();
|
configGameOptionBtn();
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
for (int i = 0; i < mWheatViews.size(); i++){
|
for (int i = 0; i < mWheatViews.size(); i++){
|
||||||
if (i==Integer.parseInt(pitNumber) - 1){
|
if (i==Integer.parseInt(pitNumber) - 1){
|
||||||
|
|||||||
@@ -836,9 +836,9 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1049:
|
case 1049:
|
||||||
if (text != null && text.getStep() != 3) {
|
// if (text != null && text.getStep() != 3) {
|
||||||
postAndAddMessage(message);
|
postAndAddMessage(message);
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1005:
|
case 1005:
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (!isShow) {
|
if (!isShow) {
|
||||||
switchMic(2);
|
switchMic(2);
|
||||||
|
isMute(1);
|
||||||
} else {
|
} else {
|
||||||
switchMic(1);
|
switchMic(1);
|
||||||
}
|
}
|
||||||
@@ -319,7 +320,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
|||||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||||
AgoraManager.getInstance(getActivity()).setLocalAudioEnabled(false,SpUtil.getUserId()+"");
|
AgoraManager.getInstance(getActivity()).setLocalAudioEnabled(false,SpUtil.getUserId()+"");
|
||||||
isShow = true;
|
isShow = true;
|
||||||
isMute(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1344,6 +1344,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
break;
|
break;
|
||||||
case 1021:
|
case 1021:
|
||||||
ktvFragment.event1021(messageEvent);
|
ktvFragment.event1021(messageEvent);
|
||||||
|
break;
|
||||||
case 1005:
|
case 1005:
|
||||||
ktvFragment.event1005(messageEvent);
|
ktvFragment.event1005(messageEvent);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -373,10 +373,13 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
mBinding.recyclerView.setAdapter(adapter);
|
mBinding.recyclerView.setAdapter(adapter);
|
||||||
|
// if (mBinding.llBz.getVisibility()== View.VISIBLE){
|
||||||
|
// AgoraManager.getInstance(getActivity()).selectAudioTrack(1);
|
||||||
|
// mBinding.imBz.setImageResource(com.xscm.moduleutil.R.mipmap.accompany_off);
|
||||||
|
// mBinding.tvBz.setText("伴奏");
|
||||||
|
// }
|
||||||
|
|
||||||
|
isRotate = false;
|
||||||
AgoraManager.getInstance(getActivity()).selectAudioTrack(1);
|
|
||||||
isRotate = true;
|
|
||||||
RoomKtvWheatView muYc = mBinding.muYc;
|
RoomKtvWheatView muYc = mBinding.muYc;
|
||||||
muYc.setOnClickListener(new View.OnClickListener() {
|
muYc.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -746,6 +749,9 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
if (pitBean.getPit_number().equals("9")) {
|
if (pitBean.getPit_number().equals("9")) {
|
||||||
RoomKtvWheatView roomDefaultWheatView = mBinding.muZc;
|
RoomKtvWheatView roomDefaultWheatView = mBinding.muZc;
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(true);
|
||||||
|
// }
|
||||||
} else if (pitBean.getPit_number().equals("10")) {
|
} else if (pitBean.getPit_number().equals("10")) {
|
||||||
RoomKtvWheatView roomDefaultWheatView = mBinding.muJb;
|
RoomKtvWheatView roomDefaultWheatView = mBinding.muJb;
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
@@ -788,6 +794,9 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
|||||||
if (pitBean.getPit_number().equals("9")) {
|
if (pitBean.getPit_number().equals("9")) {
|
||||||
RoomKtvWheatView roomDefaultWheatView = mBinding.muZc;
|
RoomKtvWheatView roomDefaultWheatView = mBinding.muZc;
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
||||||
|
// }
|
||||||
} else if (pitBean.getPit_number().equals("10")) {
|
} else if (pitBean.getPit_number().equals("10")) {
|
||||||
RoomKtvWheatView roomDefaultWheatView = mBinding.muJb;
|
RoomKtvWheatView roomDefaultWheatView = mBinding.muJb;
|
||||||
roomDefaultWheatView.setData(pitBean);
|
roomDefaultWheatView.setData(pitBean);
|
||||||
|
|||||||
@@ -1340,8 +1340,18 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
pitBean.setDress(message.getText().getFromUserInfo().getDress());
|
pitBean.setDress(message.getText().getFromUserInfo().getDress());
|
||||||
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
||||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
|
// if (pitBean.getPit_number().equals("9")){
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
} else {
|
} else {
|
||||||
|
// if (pitBean.getPit_number().equals("9")){
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
}
|
}
|
||||||
// 通知父 Fragment
|
// 通知父 Fragment
|
||||||
@@ -1369,8 +1379,18 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
pitBean.setDress("");
|
pitBean.setDress("");
|
||||||
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
||||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
|
// if (pitBean.getPit_number().equals("9")){
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
} else {
|
} else {
|
||||||
|
// if (pitBean.getPit_number().equals("9")){
|
||||||
|
// if (getActivity() instanceof RoomActivity) {
|
||||||
|
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
}
|
}
|
||||||
if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
||||||
|
|||||||
@@ -286,7 +286,7 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_misc"
|
android:id="@+id/rl_misc"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="20dp"
|
||||||
android:layout_marginEnd="@dimen/dp_5"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
android:layout_weight="0.3">
|
android:layout_weight="0.3">
|
||||||
|
|
||||||
@@ -492,7 +492,8 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_screenshare"
|
android:id="@+id/fl_screenshare"
|
||||||
@@ -506,6 +507,7 @@
|
|||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:translationZ="10dp"
|
||||||
android:src="@mipmap/quan" />
|
android:src="@mipmap/quan" />
|
||||||
<!-- 自定义内容 -->
|
<!-- 自定义内容 -->
|
||||||
</com.xscm.moduleutil.widget.floatingView.Floa>
|
</com.xscm.moduleutil.widget.floatingView.Floa>
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
android:layout_width="@dimen/dp_13"
|
android:layout_width="@dimen/dp_13"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@mipmap/accompany_off" />
|
android:src="@mipmap/accompany_on" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_bz"
|
android:id="@+id/tv_bz"
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
android:layout_height="@dimen/dp_14"
|
android:layout_height="@dimen/dp_14"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="伴奏"
|
android:text="原唱"
|
||||||
android:textColor="@color/color_white"
|
android:textColor="@color/color_white"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user