[Modify]个播房ui调整
This commit is contained in:
@@ -38,7 +38,6 @@ import com.yizhuan.xchat_android_core.im.custom.bean.RoomPKAttachment
|
|||||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||||
import com.yizhuan.xchat_android_core.manager.RoomEvent
|
import com.yizhuan.xchat_android_core.manager.RoomEvent
|
||||||
import com.yizhuan.xchat_android_core.pay.event.FirstChargeEvent
|
import com.yizhuan.xchat_android_core.pay.event.FirstChargeEvent
|
||||||
import com.yizhuan.xchat_android_core.user.UserModel
|
|
||||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter
|
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
@@ -85,11 +84,11 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
|||||||
super.initiate()
|
super.initiate()
|
||||||
mvpPresenter?.getBannerList()
|
mvpPresenter?.getBannerList()
|
||||||
initSpeedyMessage(gameBinding.flSpeedyMessage)
|
initSpeedyMessage(gameBinding.flSpeedyMessage)
|
||||||
UserModel.get().currentUserInfo
|
// UserModel.get().currentUserInfo
|
||||||
.compose(bindToLifecycle())
|
// .compose(bindToLifecycle())
|
||||||
.subscribe { userInfo ->
|
// .subscribe { userInfo ->
|
||||||
gameBinding.ivFirstChargeEnter.isVisible = userInfo.isFirstCharge
|
// gameBinding.ivFirstChargeEnter.isVisible = userInfo.isFirstCharge
|
||||||
}
|
// }
|
||||||
GoldBoxHelper.isHideBox().subscribe(
|
GoldBoxHelper.isHideBox().subscribe(
|
||||||
{
|
{
|
||||||
if (it == false) {
|
if (it == false) {
|
||||||
|
@@ -3,7 +3,9 @@ package com.yizhuan.erban.avroom.presenter;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
|
||||||
import com.yizhuan.erban.avroom.view.ISingleRoomView;
|
import com.yizhuan.erban.avroom.view.ISingleRoomView;
|
||||||
|
import com.yizhuan.erban.treasure_box.widget.GoldBoxHelper;
|
||||||
|
import com.yizhuan.erban.utils.UserUtils;
|
||||||
|
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p> </p>
|
* <p> </p>
|
||||||
@@ -18,7 +20,38 @@ public class SingleRoomPresenter extends BaseRoomPresenter<ISingleRoomView> {
|
|||||||
mAvRoomModel.getRoomBanner()
|
mAvRoomModel.getRoomBanner()
|
||||||
.compose(bindToLifecycle())
|
.compose(bindToLifecycle())
|
||||||
.subscribe(bannerInfos -> {
|
.subscribe(bannerInfos -> {
|
||||||
|
final boolean firstCharge = UserUtils.getUserInfo().isFirstCharge();
|
||||||
|
if (GoldBoxHelper.needIntegrateBoxEntrance()) {
|
||||||
|
if (firstCharge) {
|
||||||
|
BannerInfo bannerInfo = new BannerInfo();
|
||||||
|
bannerInfo.setFirstCharge(true);
|
||||||
|
bannerInfos.add(0, bannerInfo);
|
||||||
|
}
|
||||||
|
if (GoldBoxHelper.isShowRadish()) {
|
||||||
|
BannerInfo bannerInfo = new BannerInfo();
|
||||||
|
bannerInfo.setRadish(true);
|
||||||
|
bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
|
||||||
|
}
|
||||||
|
GoldBoxHelper.isHideBox()
|
||||||
|
.subscribe(isHide -> {
|
||||||
|
if (!isHide) {
|
||||||
|
BannerInfo bannerInfo = new BannerInfo();
|
||||||
|
bannerInfo.setBox(true);
|
||||||
|
int index = 0;
|
||||||
|
if (firstCharge) index++;
|
||||||
|
if (GoldBoxHelper.isShowRadish()) index++;
|
||||||
|
bannerInfos.add(index, bannerInfo);
|
||||||
|
}
|
||||||
getMvpView().onShowBanner(bannerInfos);
|
getMvpView().onShowBanner(bannerInfos);
|
||||||
|
}, throwable -> getMvpView().onShowBanner(bannerInfos));
|
||||||
|
} else {
|
||||||
|
if (firstCharge) {
|
||||||
|
BannerInfo bannerInfo = new BannerInfo();
|
||||||
|
bannerInfo.setFirstCharge(true);
|
||||||
|
bannerInfos.add(0, bannerInfo);
|
||||||
|
}
|
||||||
|
getMvpView().onShowBanner(bannerInfos);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -392,7 +392,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/tv_hour_rank"
|
android:layout_below="@id/tv_hour_rank"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:layout="@layout/avroom_music_player_layout" />
|
android:layout="@layout/avroom_music_player_layout" />
|
||||||
|
|
||||||
<com.yizhuan.erban.vip.VipBroadcastView
|
<com.yizhuan.erban.vip.VipBroadcastView
|
||||||
|
@@ -41,57 +41,12 @@
|
|||||||
app:barrierDirection="bottom"
|
app:barrierDirection="bottom"
|
||||||
app:constraint_referenced_ids="view_pk_board,micro_view" />
|
app:constraint_referenced_ids="view_pk_board,micro_view" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/contribute_list"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_marginTop="85dp"
|
|
||||||
android:background="@drawable/bg_contribute_entrance_single_room"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:onClick="@{click}"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_rank_0"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/default_avatar" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_rank_1"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/default_avatar" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_rank_2"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/default_avatar" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:text="@string/layout_fragment_single_room_01"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="12dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@drawable/arrow_right_white" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_fans_team"
|
android:id="@+id/fl_fans_team"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/contribute_list">
|
app:layout_constraintTop_toBottomOf="@id/contribute_list">
|
||||||
|
|
||||||
@@ -142,20 +97,50 @@
|
|||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_hour_rank"
|
android:id="@+id/contribute_list"
|
||||||
android:layout_width="76dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="22dp"
|
android:layout_height="20dp"
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:background="@drawable/bg_single_room_rank_entrance"
|
android:background="@drawable/bg_single_room_rank_entrance"
|
||||||
android:drawableStart="@drawable/ic_single_room_rank"
|
android:drawablePadding="@dimen/dp_2"
|
||||||
android:drawablePadding="4dp"
|
android:gravity="center"
|
||||||
android:gravity="center_vertical"
|
android:onClick="@{click}"
|
||||||
android:includeFontPadding="false"
|
android:paddingStart="@dimen/dp_8"
|
||||||
android:text="@string/layout_fragment_single_room_04"
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:layout_marginTop="85dp"
|
||||||
|
android:text="@string/room_contribute_list"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="12dp"
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/contribute_list" />
|
app:drawableStartCompat="@drawable/ic_sing_room_contribute_list" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hour_rank"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:background="@drawable/bg_single_room_rank_entrance"
|
||||||
|
android:drawablePadding="@dimen/dp_2"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/dp_8"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:text="@string/room_list_hour"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
app:drawableStartCompat="@drawable/ic_single_room_rank"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/contribute_list" />
|
||||||
|
|
||||||
|
<ViewStub
|
||||||
|
android:id="@+id/vs_music_player"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout="@layout/avroom_music_player_layout"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_hour_rank" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_speedy_message"
|
android:id="@+id/fl_speedy_message"
|
||||||
@@ -304,17 +289,6 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<ViewStub
|
|
||||||
android:id="@+id/vs_music_player"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginTop="125dp"
|
|
||||||
android:layout="@layout/avroom_music_player_layout"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<com.yizhuan.erban.vip.VipBroadcastView
|
<com.yizhuan.erban.vip.VipBroadcastView
|
||||||
android:id="@+id/vip_broadcast_view"
|
android:id="@+id/vip_broadcast_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
Reference in New Issue
Block a user