Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Created March 11, 2016 12:44
Show Gist options
  • Save pwittchen/3f45a27589d4624d1cbb to your computer and use it in GitHub Desktop.
Save pwittchen/3f45a27589d4624d1cbb to your computer and use it in GitHub Desktop.
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
info = (TextView) findViewById(R.id.info);
swipe = new Swipe();
subscription = swipe.observe()
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Action1<SwipeEvent>() {
@Override public void call(final SwipeEvent swipeEvent) {
info.setText(swipeEvent.toString());
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment