@@ -25,110 +25,127 @@ public View onCreateView(LayoutInflater inflater,
2525 public void demoConcurrencyWithSchedulers () {
2626 getActivity ().getSupportFragmentManager ()
2727 .beginTransaction ()
28- .addToBackStack (this . toString ())
29- .replace (R .id .activity_main ,
28+ .addToBackStack (ConcurrencyWithSchedulersDemoFragment . class . getName ())
29+ .replace (android . R .id .content ,
3030 new ConcurrencyWithSchedulersDemoFragment (),
31- this . toString ())
31+ ConcurrencyWithSchedulersDemoFragment . class . getName ())
3232 .commit ();
3333 }
3434
3535 @ OnClick (R .id .btn_demo_buffer )
3636 public void demoBuffer () {
3737 getActivity ().getSupportFragmentManager ()
3838 .beginTransaction ()
39- .addToBackStack (this .toString ())
40- .replace (R .id .activity_main , new BufferDemoFragment (), this .toString ())
39+ .addToBackStack (BufferDemoFragment .class .toString ())
40+ .replace (android .R .id .content ,
41+ new BufferDemoFragment (),
42+ BufferDemoFragment .class .toString ())
4143 .commit ();
4244 }
4345
4446 @ OnClick (R .id .btn_demo_debounce )
4547 public void demoThrottling () {
4648 getActivity ().getSupportFragmentManager ()
4749 .beginTransaction ()
48- .addToBackStack (this .toString ())
49- .replace (R .id .activity_main , new DebounceSearchEmitterFragment (), this .toString ())
50+ .addToBackStack (DebounceSearchEmitterFragment .class .toString ())
51+ .replace (android .R .id .content ,
52+ new DebounceSearchEmitterFragment (),
53+ DebounceSearchEmitterFragment .class .toString ())
5054 .commit ();
5155 }
5256
5357 @ OnClick (R .id .btn_demo_retrofit )
5458 public void demoRetrofitCalls () {
55- getActivity ().getSupportFragmentManager ().beginTransaction ().addToBackStack (this .toString ())
56- //.replace(R.id.activity_main, new RetrofitAsyncTaskDeathFragment(), this.toString())
57- .replace (R .id .activity_main , new RetrofitFragment (), this .toString ()).commit ();
59+ getActivity ().getSupportFragmentManager ()
60+ .beginTransaction ().addToBackStack (RetrofitFragment .class .toString ())
61+ //.replace(android.R.id.content, new RetrofitAsyncTaskDeathFragment(), RetrofitAsyncTaskDeathFragment.class.toString())
62+ .replace (android .R .id .content ,
63+ new RetrofitFragment (),
64+ RetrofitFragment .class .toString ()).commit ();
5865 }
5966
6067 @ OnClick (R .id .btn_demo_double_binding_textview )
6168 public void demoDoubleBindingWithPublishSubject () {
6269 getActivity ().getSupportFragmentManager ()
6370 .beginTransaction ()
64- .addToBackStack (this .toString ())
65- .replace (R .id .activity_main , new DoubleBindingTextViewFragment (), this .toString ())
71+ .addToBackStack (DoubleBindingTextViewFragment .class .toString ())
72+ .replace (android .R .id .content ,
73+ new DoubleBindingTextViewFragment (),
74+ DoubleBindingTextViewFragment .class .toString ())
6675 .commit ();
6776 }
6877
6978 /*@OnClick(R.id.btn_demo_polling)
7079 public void demoPolling() {
7180 getActivity().getSupportFragmentManager()
7281 .beginTransaction()
73- .addToBackStack(this .toString())
74- .replace(R.id.activity_main , new PollingFragment(), this .toString())
82+ .addToBackStack(PollingFragment.class .toString())
83+ .replace(android. R.id.content , new PollingFragment(), PollingFragment.class .toString())
7584 .commit();
7685 }*/
7786
7887 @ OnClick (R .id .btn_demo_rxbus )
7988 public void demoRxBus () {
8089 getActivity ().getSupportFragmentManager ()
8190 .beginTransaction ()
82- .addToBackStack (this .toString ())
83- .replace (R .id .activity_main , new RxBusDemoFragment (), this .toString ())
91+ .addToBackStack (RxBusDemoFragment .class .toString ())
92+ .replace (android .R .id .content ,
93+ new RxBusDemoFragment (),
94+ RxBusDemoFragment .class .toString ())
8495 .commit ();
8596 }
8697
8798 //@OnClick(R.id.btn_demo_subject_timeout)
8899 public void demoTimeout () {
89100 getActivity ().getSupportFragmentManager ()
90101 .beginTransaction ()
91- .addToBackStack (this .toString ())
92- .replace (R .id .activity_main , new TimeoutDemoFragment (), this .toString ())
102+ .addToBackStack (TimeoutDemoFragment .class .toString ())
103+ .replace (android .R .id .content ,
104+ new TimeoutDemoFragment (),
105+ TimeoutDemoFragment .class .toString ())
93106 .commit ();
94107 }
95108
96109 @ OnClick (R .id .btn_demo_form_validation_combinel )
97110 public void formValidation () {
98111 getActivity ().getSupportFragmentManager ()
99112 .beginTransaction ()
100- .addToBackStack (this .toString ())
101- .replace (R .id .activity_main ,
113+ .addToBackStack (FormValidationCombineLatestFragment . class .toString ())
114+ .replace (android . R .id .content ,
102115 new FormValidationCombineLatestFragment (),
103- this .toString ())
116+ FormValidationCombineLatestFragment . class .toString ())
104117 .commit ();
105118 }
106119
107120 @ OnClick (R .id .btn_demo_pseudo_cache )
108121 public void pseudoCacheDemo () {
109- getActivity ().getSupportFragmentManager ()
110- . beginTransaction ( )
111- . addToBackStack ( this .toString ())
112- // .replace(R.id.activity_main, new PseudoCacheConcatFragment(), this.toString())
113- . replace ( R . id . activity_main , new PseudoCacheMergeFragment (), this . toString ())
114- .commit ();
122+ getActivity ().getSupportFragmentManager (). beginTransaction (). addToBackStack (
123+ PseudoCacheMergeFragment . class . toString () )
124+ //.replace(android.R.id.content, new PseudoCacheConcatFragment(), PseudoCacheConcatFragment.class .toString())
125+ .replace (android . R .id .content ,
126+ new PseudoCacheMergeFragment (),
127+ PseudoCacheMergeFragment . class . toString ()) .commit ();
115128 }
116129
117130 @ OnClick (R .id .btn_demo_timing )
118131 public void demoTimerIntervalDelays () {
119132 getActivity ().getSupportFragmentManager ()
120133 .beginTransaction ()
121- .addToBackStack (this .toString ())
122- .replace (R .id .activity_main , new TimingDemoFragment (), this .toString ())
134+ .addToBackStack (TimingDemoFragment .class .toString ())
135+ .replace (android .R .id .content ,
136+ new TimingDemoFragment (),
137+ TimingDemoFragment .class .toString ())
123138 .commit ();
124139 }
125140
126141 @ OnClick (R .id .btn_demo_exponential_backoff )
127142 public void demoExponentialBackoff () {
128143 getActivity ().getSupportFragmentManager ()
129144 .beginTransaction ()
130- .addToBackStack (this .toString ())
131- .replace (R .id .activity_main , new ExponentialBackoffFragment (), this .toString ())
145+ .addToBackStack (ExponentialBackoffFragment .class .toString ())
146+ .replace (android .R .id .content ,
147+ new ExponentialBackoffFragment (),
148+ ExponentialBackoffFragment .class .toString ())
132149 .commit ();
133150 }
134151}
0 commit comments