礼物墙列表UI修改
This commit is contained in:
@@ -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 -> {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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"/>
|
||||
|
@@ -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"
|
||||
|
@@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user