O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Very first user interface

Let's update MainActivity to look like this:

@BindView(R.id.hello_world_salute)TextView helloText;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);    setContentView(R.layout.activity_main);    ButterKnife.bind(this);    Observable.just("Hello! Please use this app responsibly!")        .subscribe(new Consumer<String>() {            @Override            public void accept(String s) {                helloText.setText(s);            }        }); }

The import block for the preceding code is as shown:

import butterknife.BindView;import butterknife.ButterKnife;import io.reactivex.Observable;import io.reactivex.functions.Consumer;
If you are in doubt as to which imports are used at any point in the book, feel free to check out the code that's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required