Created
October 6, 2017 08:03
-
-
Save stfalconaleks/8185325fd9fd4e06e88fa7503ab2dc6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BindingActivity<B extends ViewDataBinding, VM extends ActivityViewModel> extends AppCompatActivity { | |
private B binding; | |
private VM viewModel; | |
public B getBinding() { | |
return binding; | |
} | |
} | |
public abstract class ActivityViewModel<A extends AppCompatActivity> | |
extends BaseObservable { | |
protected A activity; | |
public ActivityViewModel(A activity) { | |
this.activity = activity; | |
} | |
public A getActivity() { | |
return activity; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment