Coder Social home page Coder Social logo

rxlifecycle's People

Contributors

gejiaheng avatar nekocode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxlifecycle's Issues

fragmentManager.findFragmentByTag sometime cannot find an attaching BindingFragment

when binding on Activity/Fragment onCreate() , Rxlifecycle would add an bindingFragment, look like this:

protected void onCreate(Bundle savedInstanceState) {
    	Log.d(TAG, "" + "ActionBarActivity onCreate");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jnitest);
 
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment(), "myfragment")
                    .commit();
        }
        Log.d(TAG, "Fragment:"+getSupportFragmentManager().findFragmentById(R.id.container));

findFragmentById will return null.
if we bind lifeCycle during onCreate() more than once, which is very common to do such as load a lot of data, it would attach more than one BindingFragment !
and it seems to be wrong.

About bind(Fragment)

I read the sample, it only support android.app.Fragment?
If i use android.support.v4.app.Fragment. What should I do?

Interesting idea

I just read the code, it's an interesting way to get notified of activity lifecycle event via a headless fragment, thanks!

I think you can mention this idea in README.

Application release minify enabled

I have problem with release build of application (proguard enabled). All observables not emitting any events when is added bind to fragment. Do You have any idea how to configure proguard for this lib?
Example code:

public class TestFragment extends android.support.v4.app.Fragment{

    @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        new RxDao()
                .fetchAll()
                .compose(RxLifecycleCompact.bind(this).withObservable())
                .subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(this::addItems);
    }
}

build.gradle.txt
proguard-rules.pro.txt

onComplete still be signalled after onDestroy

onComplete still be signalled after Activity's onDestroy. That means we cannot do some operations(such as dismiss dialog) in onComplete after the activity has been destroyed.
So any suggestions for that situation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.