Skip to content

Commit

Permalink
1.rxbus发送不限制线程
Browse files Browse the repository at this point in the history
  • Loading branch information
bauer committed Feb 7, 2018
1 parent ef814f7 commit 741013c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
3 changes: 2 additions & 1 deletion baselib/src/main/java/com/babase/lib/utils/Rx2Bus.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
}
Expand Down
9 changes: 5 additions & 4 deletions baselib/src/main/res/layout/widget_ba_empty_error_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand Down

0 comments on commit 741013c

Please sign in to comment.