Android Open Source - Android-RxJava Main Activity






From Project

Back to project page Android-RxJava.

License

The source code is released under:

Apache License

If you think the Android project Android-RxJava listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.morihacky.android.rxjava;
/* w  ww.j  a  va2  s .  co  m*/
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.morihacky.android.rxjava.app.R;
import com.morihacky.android.rxjava.rxbus.RxBus;
import timber.log.Timber;

public class MainActivity
    extends FragmentActivity {

  private RxBus _rxBus = null;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Timber.plant(new Timber.DebugTree());

    getSupportFragmentManager().beginTransaction()
        .addToBackStack(this.toString())
        .replace(R.id.activity_main, new MainFragment(), this.toString())
        .commit();
  }

  // This is better done with a DI Library like Dagger
  public RxBus getRxBusSingleton() {
    if (_rxBus == null) {
      _rxBus = new RxBus();
    }

    return _rxBus;
  }
}




Java Source Code List

com.morihacky.android.rxjava.BufferDemoFragment.java
com.morihacky.android.rxjava.ConcurrencyWithSchedulersDemoFragment.java
com.morihacky.android.rxjava.DemoTimeoutFragment.java
com.morihacky.android.rxjava.DoubleBindingTextViewFragment.java
com.morihacky.android.rxjava.MainActivity.java
com.morihacky.android.rxjava.MainFragment.java
com.morihacky.android.rxjava.PollingFragment.java
com.morihacky.android.rxjava.RetrofitFragment.java
com.morihacky.android.rxjava.SubjectDebounceSearchEmitterFragment.java
com.morihacky.android.rxjava.app.ApplicationTest.java
com.morihacky.android.rxjava.retrofit.Contributor.java
com.morihacky.android.rxjava.retrofit.GithubApi.java
com.morihacky.android.rxjava.retrofit.User.java
com.morihacky.android.rxjava.rxbus.RxBusDemoFragment.java
com.morihacky.android.rxjava.rxbus.RxBusDemo_Bottom1Fragment.java
com.morihacky.android.rxjava.rxbus.RxBusDemo_Bottom2Fragment.java
com.morihacky.android.rxjava.rxbus.RxBusDemo_Bottom3Fragment.java
com.morihacky.android.rxjava.rxbus.RxBusDemo_TopFragment.java
com.morihacky.android.rxjava.rxbus.RxBus.java