@@ -0,0 +1,811 @@
+package com.marverenic.music.ui;%0A%0Aimport android.databinding.BaseObservable;%0Aimport android.support.annotation.CheckResult;%0Aimport android.support.annotation.NonNull;%0A%0Aimport com.trello.rxlifecycle.FragmentEvent;%0Aimport com.trello.rxlifecycle.LifecycleTransformer;%0Aimport com.trello.rxlifecycle.RxLifecycle;%0Aimport com.trello.rxlifecycle.components.support.RxFragment;%0A%0Aimport rx.Observable;%0A%0Apublic abstract class RxViewModel extends BaseObservable %7B%0A%0A    private Observable%3CFragmentEvent%3E fragmentLifecycle;%0A%0A    public RxViewModel(RxFragment fragment) %7B%0A        fragmentLifecycle = fragment.lifecycle();%0A    %7D%0A%0A    @NonNull%0A    @CheckResult%0A    protected final %3CT%3E LifecycleTransformer%3CT%3E bindToLifecycle() %7B%0A        return RxLifecycle.bindUntilEvent(fragmentLifecycle, FragmentEvent.DESTROY_VIEW);%0A    %7D%0A%0A%7D%0A

Create RxViewModel base class