UI对稿,部分错误提示优化
This commit is contained in:
@@ -540,7 +540,7 @@ public class XChatApplication extends Application {
|
||||
Log.e(TAG, "testtest", e);
|
||||
}
|
||||
|
||||
initRxNet(instance, UriProvider.WEB_URL);
|
||||
initRxNet(instance, UriProvider.API_URL);
|
||||
|
||||
/**
|
||||
* 使用到realm 数据库,这里配置数据库 这里必须先于模块初始化前进行初始化配置
|
||||
|
@@ -347,7 +347,7 @@ public class AvRoomPresenter extends BaseMvpPresenter<IAvRoomView> {
|
||||
.doOnSuccess(roomResult -> {
|
||||
if (roomResult == null) {
|
||||
if (getMvpView() != null) {
|
||||
getMvpView().requestRoomInfoFailView(new Throwable("网络错误"));
|
||||
getMvpView().requestRoomInfoFailView(new Throwable("请求房间信息失败,请稍后重试!"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@@ -328,7 +328,7 @@ public abstract class BaseFragment extends RxFragment implements KeyEvent.Callba
|
||||
return;
|
||||
}
|
||||
View status = view.findViewById(R.id.status_layout);
|
||||
if (status == null || view.getId() == View.NO_ID) {
|
||||
if (status == null || status.getId() == View.NO_ID) {
|
||||
return;
|
||||
}
|
||||
Fragment fragment;
|
||||
@@ -355,7 +355,7 @@ public abstract class BaseFragment extends RxFragment implements KeyEvent.Callba
|
||||
return;
|
||||
}
|
||||
View status = view.findViewById(R.id.status_layout);
|
||||
if (status == null || view.getId() == View.NO_ID) {
|
||||
if (status == null || status.getId() == View.NO_ID) {
|
||||
MLog.error(this, "xuwakao, had not set layout id ");
|
||||
return;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ public abstract class BaseFragment extends RxFragment implements KeyEvent.Callba
|
||||
|
||||
@Override
|
||||
public void showNoData(int drawable, CharSequence charSequence) {
|
||||
showNoData(getView(), drawable, charSequence);
|
||||
showNoData(mView, drawable, charSequence);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -379,7 +379,7 @@ public abstract class BaseFragment extends RxFragment implements KeyEvent.Callba
|
||||
return;
|
||||
}
|
||||
View status = view.findViewById(R.id.status_layout);
|
||||
if (status == null || view.getId() == View.NO_ID) {
|
||||
if (status == null || status.getId() == View.NO_ID) {
|
||||
MLog.error(this, "xuwakao, had not set layout id ");
|
||||
return;
|
||||
}
|
||||
|
@@ -808,6 +808,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
giftNumLayout.setVisibility(View.GONE);
|
||||
llDrawGift.setVisibility(View.VISIBLE);
|
||||
drawGiftHelper.setDrawEnable(true);
|
||||
sendGiftButton.setBackgroundResource(R.drawable.bg_magic_dialog_button_send_draw);
|
||||
sendGiftButton.setEnabled(false);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
if (params.dimAmount != 0.7f) {
|
||||
@@ -828,6 +829,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
drawGiftHelper.setDrawEnable(false);
|
||||
drawGiftHelper.resetDrawGiftView();
|
||||
boolean isDrawGiftTab = giftIndicator.getCurrrentType() == GiftIndicator.TYPE_DRAW_GIFT;
|
||||
sendGiftButton.setBackgroundResource(R.drawable.bg_magic_dialog_button_send);
|
||||
sendGiftButton.setEnabled(!isDrawGiftTab);
|
||||
giftNumLayout.setVisibility(isDrawGiftTab ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 586 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_room_normal_default_pic.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_room_normal_default_pic.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#CC161722" />
|
||||
<solid android:color="#181B2C" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
|
@@ -8,7 +8,7 @@
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_CCCCCC" />
|
||||
<solid android:color="#E5DC8B" />
|
||||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="100dp" android:topLeftRadius="0dp" android:topRightRadius="100dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFE710" />
|
||||
<corners android:radius="100dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#E5DC8B" />
|
||||
<corners android:radius="100dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
@@ -141,34 +141,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.nnbc123.app.ui.widget.TopRoundLinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="#01ffffff"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_dialog_bottom_gift">
|
||||
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:id="@+id/realtime_blur_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:realtimeBlurRadius="30dp"
|
||||
app:realtimeDownsampleFactor="3"
|
||||
app:realtimeOverlayColor="#CC161722" />
|
||||
|
||||
</com.nnbc123.app.ui.widget.TopRoundLinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ll_dialog_bottom_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:background="@drawable/bg_dialog_room_operation">
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_draw_gift"
|
||||
@@ -178,6 +158,9 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
@@ -221,8 +204,13 @@
|
||||
android:id="@+id/ll_tab_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp">
|
||||
android:background="@drawable/bg_dialog_room_operation"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingTop="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_draw_gift">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_send_gift"
|
||||
@@ -273,16 +261,24 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/line_tab_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/white_tran_10" />
|
||||
android:background="#181B2C"
|
||||
android:src="@color/white_transparent_5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_tab_type" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_avatars"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#181B2C"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line_tab_type">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/desc_layout"
|
||||
@@ -320,7 +316,8 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -358,16 +355,40 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/line_tab_avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@id/ll_avatar_list"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="#181B2C"
|
||||
android:src="@color/white_transparent_5" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:id="@+id/realtime_blur_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_recharge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_tabs"
|
||||
app:realtimeBlurRadius="25dp"
|
||||
app:realtimeDownsampleFactor="4"
|
||||
app:realtimeOverlayColor="#e0161722" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ll_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rl_avatars"
|
||||
tools:background="@color/blue">
|
||||
|
||||
<com.nnbc123.app.ui.widget.magicindicator.GiftIndicator
|
||||
@@ -399,7 +420,10 @@
|
||||
android:id="@+id/rl_gifts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="261dp"
|
||||
android:layout_marginTop="@dimen/dp_10">
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_tabs">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_loading"
|
||||
@@ -434,7 +458,6 @@
|
||||
android:id="@+id/layout_load_failed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
@@ -471,14 +494,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="6dp" />
|
||||
android:layout_marginEnd="@dimen/dp_10" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
tools:visibility="gone">
|
||||
@@ -504,11 +525,12 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_gift_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@color/color_F5F5F5_transparent_5"
|
||||
android:hint="@string/hints_tips_gift_message"
|
||||
android:maxLength="15"
|
||||
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
@@ -516,6 +538,9 @@
|
||||
android:textColorHint="@color/white_transparent_30"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rl_gifts"
|
||||
tools:ignore="SpUsage"
|
||||
tools:visibility="gone" />
|
||||
|
||||
@@ -523,7 +548,10 @@
|
||||
android:id="@+id/layout_recharge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="#161722">
|
||||
android:background="#161722"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_gift_message">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gold"
|
||||
@@ -601,13 +629,13 @@
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="@drawable/bg_magic_dialog_button_send"
|
||||
android:text="赠送"
|
||||
android:textColor="@color/color_161958"
|
||||
android:textColor="@color/text_normal_282828"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.nnbc123.app.common.widget.StatusLayout
|
||||
<com.nnbc123.app.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@@ -16,7 +13,7 @@
|
||||
android:id="@+id/rv_dynamic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</com.nnbc123.app.common.widget.StatusLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</com.nnbc123.app.common.widget.StatusLayout>
|
@@ -53,12 +53,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="13sp"
|
||||
android:lines="2"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.4"
|
||||
tools:text="故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在~" />
|
||||
@@ -86,7 +84,7 @@
|
||||
|
||||
<com.nnbc123.app.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_mini_world"
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
|
||||
|
@@ -179,7 +179,7 @@ public class RxHelper {
|
||||
|
||||
public final static String DEFAULT_MSG = "网络错误";
|
||||
|
||||
public static String getValidMessage(ServiceResult result) {
|
||||
public static <T> String getValidMessage(ServiceResult<T> result) {
|
||||
if (result != null && !TextUtils.isEmpty(result.getMessage())) {
|
||||
return result.getMessage();
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public class RxHelper {
|
||||
};
|
||||
}
|
||||
|
||||
public static Throwable createThrowable(ServiceResult result) {
|
||||
public static <T> Throwable createThrowable(ServiceResult<T> result) {
|
||||
return new Throwable(getValidMessage(result));
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ MobSDK.spEdition=FP
|
||||
|
||||
with_flutter_aar=true
|
||||
with_jenkins=false
|
||||
only_arm64=true
|
||||
only_arm64=false
|
||||
|
||||
channel_file=channel.txt
|
||||
|
||||
|
@@ -11,6 +11,8 @@ import com.hjq.toast.ToastUtils;
|
||||
public class SingleToastUtil {
|
||||
|
||||
public static void showToast(String s) {
|
||||
//不弹这种没意义的错误
|
||||
if ("网络错误".equals(s)) return;
|
||||
ToastUtils.show(s);
|
||||
}
|
||||
|
||||
@@ -20,22 +22,27 @@ public class SingleToastUtil {
|
||||
|
||||
@Deprecated
|
||||
public static void showToastShort(String s) {
|
||||
//不弹这种没意义的错误
|
||||
if ("网络错误".equals(s)) return;
|
||||
ToastUtils.show(s);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void showToastShort(int resId) {
|
||||
|
||||
ToastUtils.show(resId);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void showToast(Context context, String s) {
|
||||
//不弹这种没意义的错误
|
||||
if ("网络错误".equals(s)) return;
|
||||
ToastUtils.show(s);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void showToast(Context mContext, final String s, final int length) {
|
||||
//先解决问题再说,不弹这种没意义的错误
|
||||
//不弹这种没意义的错误
|
||||
if ("网络错误".equals(s)) return;
|
||||
ToastUtils.show(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user