Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging toolbar part 2 #460

Merged
merged 2 commits into from
Feb 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/src/main/java/com/kickstarter/ui/toolbars/KSToolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import butterknife.Bind;
import butterknife.BindDimen;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Subscription;
import rx.subscriptions.CompositeSubscription;

public class KSToolbar extends Toolbar {
protected @Nullable @Bind(R.id.title_text_view) TextView titleTextView;
protected @BindDimen(R.dimen.grid_2) float grid_2;

private Paint backgroundPaint;
private @WebEndpoint String webEndpoint;
Expand Down Expand Up @@ -56,7 +58,7 @@ protected void onDraw(final Canvas canvas) {
super.onDraw(canvas);

if (!isInEditMode() && !this.webEndpoint.equals(Secrets.WebEndpoint.PRODUCTION)) {
canvas.drawRect(0, 0, getWidth(), getHeight(), this.backgroundPaint);
canvas.drawRect(0, 0, this.grid_2, getHeight(), this.backgroundPaint);
}
}

Expand Down Expand Up @@ -111,7 +113,7 @@ private void init(final @NonNull Context context) {
if (!isInEditMode()) {
this.backgroundPaint = new Paint();
this.backgroundPaint.setStyle(Paint.Style.FILL);
this.backgroundPaint.setColor(ContextCompat.getColor(context, R.color.ksr_dark_grey_400));
this.backgroundPaint.setColor(ContextCompat.getColor(context, R.color.ksr_cobalt_500));

this.webEndpoint = environment().webEndpoint();
}
Expand Down