Skip to content

Instantly share code, notes, and snippets.

@dlew
dlew / gist:f7026c13fa09fe6df0d6
Last active August 29, 2015 14:06
Why I hate mixing implicit/explicit styles
<style name="Widget" />

<style name="Widget.Button" />

<style name="Widget.Button.Alternative" parent="@android:style/SomeOtherStyle />

All buttons either use Widget.Button or Widget.Button.Alternative.

I decide to change something in Widget.Button.

RetrofitService.doTheThing(params) // Your typical API call
.subscribeOn(Schedulers.io()) // Execute API call on IO thread
.observeOn(AndroidSchedulers.mainThread()) // Execute observers on Android's main thread
.subscribe(results -> handle(results)); // Handling the results of the API call