1
1
package com .morihacky .android .rxjava .fragments ;
2
2
3
+ import static android .os .Looper .getMainLooper ;
4
+
3
5
import android .os .Bundle ;
4
6
import android .os .Handler ;
5
7
import android .support .annotation .Nullable ;
11
13
import butterknife .BindView ;
12
14
import butterknife .ButterKnife ;
13
15
import butterknife .OnClick ;
16
+ import butterknife .Unbinder ;
14
17
import com .morihacky .android .rxjava .R ;
15
18
import com .morihacky .android .rxjava .wiring .LogAdapter ;
16
-
17
- import butterknife .Unbinder ;
18
19
import io .reactivex .Flowable ;
19
20
import io .reactivex .disposables .CompositeDisposable ;
20
21
import io .reactivex .subscribers .DisposableSubscriber ;
21
22
import java .util .ArrayList ;
22
23
import java .util .List ;
23
24
import timber .log .Timber ;
24
25
25
-
26
- import static android .os .Looper .getMainLooper ;
27
-
28
26
public class RotationPersist1Fragment
29
27
extends BaseFragment
30
28
implements RotationPersist1WorkerFragment .IAmYourMaster {
31
29
32
- public static final String FRAG_TAG = RotationPersist1WorkerFragment .class .getName ();
30
+ public static final String TAG = RotationPersist1Fragment .class .toString ();
33
31
34
32
@ BindView (R .id .list_threading_log ) ListView _logList ;
35
33
@@ -48,11 +46,12 @@ public void startOperationFromWorkerFrag() {
48
46
49
47
FragmentManager fm = getActivity ().getSupportFragmentManager ();
50
48
RotationPersist1WorkerFragment frag =
51
- (RotationPersist1WorkerFragment ) fm .findFragmentByTag (FRAG_TAG );
49
+ (RotationPersist1WorkerFragment ) fm .findFragmentByTag (
50
+ RotationPersist1WorkerFragment .TAG );
52
51
53
52
if (frag == null ) {
54
53
frag = new RotationPersist1WorkerFragment ();
55
- fm .beginTransaction ().add (frag , FRAG_TAG ).commit ();
54
+ fm .beginTransaction ().add (frag , RotationPersist1WorkerFragment . TAG ).commit ();
56
55
} else {
57
56
Timber .d ("Worker frag already spawned" );
58
57
}
0 commit comments