use of com.kickstarter.ui.activities.DiscoveryActivity in project android-oss by kickstarter.
the class DiscoveryToolbar method menuButtonClick.
@OnClick({ R.id.menu_button, R.id.filter_text_view })
protected void menuButtonClick() {
final DiscoveryActivity activity = (DiscoveryActivity) getContext();
activity.discoveryLayout().openDrawer(GravityCompat.START);
}
use of com.kickstarter.ui.activities.DiscoveryActivity in project android-oss by kickstarter.
the class DiscoveryToolbar method loadParams.
public void loadParams(@NonNull final DiscoveryParams params) {
final DiscoveryActivity activity = (DiscoveryActivity) getContext();
filterTextView.setText(params.filterString(activity, ksString, true, false));
if (ApiCapabilities.canSetStatusBarColor() && ApiCapabilities.canSetDarkStatusBarIcons()) {
discoveryStatusBar.setBackgroundColor(DiscoveryUtils.secondaryColor(activity, params.category()));
if (DiscoveryUtils.overlayShouldBeLight(params.category())) {
StatusBarUtils.setLightStatusBarIcons(activity);
} else {
StatusBarUtils.setDarkStatusBarIcons(activity);
}
}
this.setBackgroundColor(DiscoveryUtils.primaryColor(activity, params.category()));
final Observable<TextView> views = Observable.just(activityFeedButton, filterTextView, menuButton, searchButton);
@ColorInt final int overlayTextColor = DiscoveryUtils.overlayTextColor(activity, params.category());
views.subscribe(view -> view.setTextColor(overlayTextColor));
}
Aggregations