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

Extracting code into methods

Extracting code into separate methods is a very simple yet super effective technique to clarify the purpose of certain elements and make it easier to understand what is going on.

As we will see, it is also very easy to use in an RxJava setting because basically every part of the flow can be extracted into an independent method that does one thing and doesn't depend on anything else.

Also, modern IDEs, such as Android Studio, make a quick work of refactoring, such as method extraction. In the next section, we will see how we can use IDE to make these extractions super quick and simple.

A more advanced developer can feel free to skip the next section about method extractions because these techniques might seem obvious. ...

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