# What this gist provides:
tic()
'''code to be timed'''
toc()
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
private ObservableManager obsManager = new ObservableManager(EventBus.getDefault()); | |
@Override | |
public Subscription getStores() { | |
// Get the observable if exists and is not too old | |
Observable<StoresList> observable = obsManager.get(ObservableManager.Types.STORES); | |
if (observable == null) { | |
// If is null create it and us cache to keep it in memeroy | |
observable = api.getStoresList() | |
.compose(applySchedulers(api.getStoresList())) |
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
-optimizationpasses 5 | |
-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses | |
-dontskipnonpubliclibraryclassmembers | |
-dontpreverify | |
-verbose | |
#your package path where your gson models are stored | |
-keep class com.project.models.** { *; } |
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
fun View.visible() { | |
visibility = View.VISIBLE | |
} | |
fun View.invisible() { | |
visibility = View.INVISIBLE | |
} | |
fun View.gone() { | |
visibility = View.GONE |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.