Search in sources :

Example 1 with DiscoveryActivity

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);
}
Also used : DiscoveryActivity(com.kickstarter.ui.activities.DiscoveryActivity) OnClick(butterknife.OnClick)

Example 2 with DiscoveryActivity

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));
}
Also used : ColorInt(android.support.annotation.ColorInt) DiscoveryActivity(com.kickstarter.ui.activities.DiscoveryActivity) TextView(android.widget.TextView)

Aggregations

DiscoveryActivity (com.kickstarter.ui.activities.DiscoveryActivity)2 ColorInt (android.support.annotation.ColorInt)1 TextView (android.widget.TextView)1 OnClick (butterknife.OnClick)1