use of com.afollestad.aesthetic.Rx in project Shuttle by timusus.
the class CustomCheckbox method onAttachedToWindow.
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
subscriptions = new CompositeDisposable();
// noinspection ConstantConditions
subscriptions.add(Observable.combineLatest(ViewUtil.getObservableForResId(getContext(), backgroundResId, Aesthetic.get(getContext()).colorAccent()), Aesthetic.get(getContext()).isDark(), ColorIsDarkState.creator()).compose(Rx.<ColorIsDarkState>distinctToMainThread()).subscribe(colorIsDarkState -> invalidateColors(colorIsDarkState), onErrorLogAndRethrow()));
ViewTextColorAction.create(this).accept(Color.BLACK);
}
Aggregations