From 741013c3cb2316c2cf726b00495f1a66f5770f52 Mon Sep 17 00:00:00 2001 From: bauer Date: Wed, 7 Feb 2018 18:03:34 +0800 Subject: [PATCH] =?UTF-8?q?1.rxbus=E5=8F=91=E9=80=81=E4=B8=8D=E9=99=90?= =?UTF-8?q?=E5=88=B6=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java | 3 ++- .../src/main/res/layout/widget_ba_empty_error_view.xml | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f30d50c..50a69a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,5 +31,5 @@ dependencies { implementation 'com.android.support:design:27.0.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation project(':baselib') -// implementation 'com.github.bauer-bao:base-lib:1.0.3' +// implementation 'com.github.bauer-bao:base-lib:1.0.19' } diff --git a/baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java b/baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java index 64dec8a..9a47e17 100755 --- a/baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java +++ b/baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java @@ -1,6 +1,7 @@ package com.babase.lib.utils; import com.hwangjr.rxbus.Bus; +import com.hwangjr.rxbus.thread.ThreadEnforcer; /** * github https://github.com/AndroidKnife/RxBus @@ -23,7 +24,7 @@ public final class Rx2Bus { public synchronized static Bus get() { if (sBus == null) { - sBus = new Bus(); + sBus = new Bus(ThreadEnforcer.ANY); } return sBus; } diff --git a/baselib/src/main/res/layout/widget_ba_empty_error_view.xml b/baselib/src/main/res/layout/widget_ba_empty_error_view.xml index 60c37c2..d347f05 100755 --- a/baselib/src/main/res/layout/widget_ba_empty_error_view.xml +++ b/baselib/src/main/res/layout/widget_ba_empty_error_view.xml @@ -40,7 +40,7 @@ android:layout_marginTop="@dimen/dp_5" android:gravity="center_horizontal" android:textSize="@dimen/text_size_14" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toTopOf="@+id/widget_empty_error_btn" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@+id/widget_empty_error_iv" /> @@ -51,14 +51,15 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/dp_20" android:layout_marginRight="@dimen/dp_20" - android:layout_marginTop="@dimen/dp_5" + android:layout_marginTop="@dimen/dp_20" android:gravity="center" - android:paddingBottom="@dimen/dp_5" + android:paddingBottom="@dimen/dp_8" android:paddingEnd="@dimen/dp_20" android:paddingStart="@dimen/dp_20" - android:paddingTop="@dimen/dp_5" + android:paddingTop="@dimen/dp_8" android:textSize="@dimen/text_size_14" android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@+id/widget_empty_error_tv" />