礼物墙列表UI修改

This commit is contained in:
huangjian
2021-03-29 18:05:40 +08:00
parent 57979c8a8f
commit aedcd991cf
5 changed files with 41 additions and 28 deletions

View File

@@ -2,7 +2,9 @@ package com.yizhuan.erban.home.presenter;
import android.annotation.SuppressLint;
import android.os.Bundle;
import androidx.annotation.Nullable;
import android.text.TextUtils;
import com.netease.nim.uikit.common.util.log.LogUtil;
@@ -389,29 +391,30 @@ public class MainFragmentPresenter extends BaseMvpPresenter<IMainFragmentView> {
}
@SuppressLint("CheckResult")
public void getHomeConcerns(){
public void getHomeConcerns() {
GameHomeModel.get().getHomeConcerns().compose(RxHelper.handleException())
.subscribe((result, throwable) -> {
if (throwable != null) {
if (mMvpView != null) {
mMvpView.getFollowRoomFail();
}
} else {
if (mMvpView != null) {
mMvpView.getFollowRoomsSuccess(result);
}
}
});
}
@SuppressLint("CheckResult")
public void getRoomShortcut(){
GameHomeModel.get().getRoomShortcut().compose(RxHelper.handleException())
.subscribe((result, throwable) -> {
if (mMvpView != null) {
mMvpView.getRoomShortcut(result);
if (throwable != null) {
if (mMvpView != null) {
mMvpView.getFollowRoomFail();
}
} else {
if (mMvpView != null) {
mMvpView.getFollowRoomsSuccess(result);
}
}
});
}
@SuppressLint("CheckResult")
public void getRoomShortcut() {
GameHomeModel.get().getRoomShortcut().compose(RxHelper.handleException())
.subscribe(result -> {
if (mMvpView != null) {
mMvpView.getRoomShortcut(result);
}
}, throwable -> {
});
}
}

View File

@@ -2,12 +2,10 @@ package com.yizhuan.erban.ui.user;
import android.os.Bundle;
import com.netease.nim.uikit.StatusBarUtil;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public class UserGiftActivity extends BaseActivity {
private UserInfoGiftFragment userInfoGiftFragment;
@@ -17,9 +15,19 @@ public class UserGiftActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_gift);
initTitleBar("礼物");
initWhiteTitleBar("礼物");
userInfoGiftFragment = UserInfoGiftFragment.newInstance();
getSupportFragmentManager().beginTransaction().replace(R.id.fl_gift_container, userInfoGiftFragment, "userInfoGiftFragment")
.commit();
}
@Override
protected boolean needSteepStateBar() {
return true;
}
@Override
protected void setStatusBar() {
StatusBarUtil.transparencyBar(this);
}
}

View File

@@ -2,10 +2,12 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_normal_1c1b22"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_marginTop="@dimen/dp_25"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"/>

View File

@@ -20,12 +20,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-10dp"
android:textColor="@color/appColor"
android:textColor="@color/text_title_white"
android:textSize="12dp"
android:paddingStart="8dp"
android:paddingEnd="@dimen/dp_8"
android:gravity="center"
android:background="@drawable/bg_user_gift_count"
android:background="@drawable/shape_bg_mini_world_name"
tools:text="x120" />
<TextView
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:textColor="@color/color_333333"
android:textColor="@color/text_title_white"
android:lines="1"
android:ellipsize="end"
android:textSize="13dp"
@@ -46,7 +46,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:textColor="@color/color_666666"
android:textColor="@color/text_normal_c6c6e9"
android:gravity="center_vertical"
android:textSize="11dp"
android:drawableStart="@drawable/ic_gift_diamond"

View File

@@ -91,7 +91,7 @@ public class GameHomeModel extends BaseModel {
return api.apiRoomShortcut(String.valueOf(AuthModel.get().getCurrentUid()),
CommunityConstant.VERSION_VALID_TYPE,
AuthModel.get().getTicket())
.compose(RxHelper.handleStringData())
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers());
}