Loading...
Searching...
No Matches
FollowMeButtonConfig.java
Go to the documentation of this file.
1package com.navigine.view.widgets;
2
3import android.graphics.drawable.Drawable;
4
18public class FollowMeButtonConfig {
19
20 private Drawable followMeIcon;
21 private Drawable followMeIconActive;
22 private Integer buttonBackgroundColor;
23 private Integer accentColor;
24 private Integer textColor;
25 private float buttonWidth;
26 private float buttonHeight;
27 private int marginRight;
28 private int marginBottom;
29
30 private FollowMeButtonConfig() {}
31
32 public static Builder builder() {
33 return new Builder();
34 }
35
36 public static FollowMeButtonConfig defaultConfig() {
37 return builder().build();
38 }
39
40 public static class Builder {
41 private final FollowMeButtonConfig config = new FollowMeButtonConfig();
42
43 public Builder followMeIcon(Drawable icon) {
44 config.followMeIcon = icon;
45 return this;
46 }
47
48 public Builder followMeIconActive(Drawable icon) {
49 config.followMeIconActive = icon;
50 return this;
51 }
52
53 public Builder buttonBackgroundColor(int color) {
54 config.buttonBackgroundColor = color;
55 return this;
56 }
57
58 public Builder accentColor(int color) {
59 config.accentColor = color;
60 return this;
61 }
62
63 public Builder textColor(int color) {
64 config.textColor = color;
65 return this;
66 }
67
68 public Builder buttonWidth(float dp) {
69 config.buttonWidth = dp;
70 return this;
71 }
72
73 public Builder buttonHeight(float dp) {
74 config.buttonHeight = dp;
75 return this;
76 }
77
78 public Builder marginRight(int dp) {
79 config.marginRight = dp;
80 return this;
81 }
82
83 public Builder marginBottom(int dp) {
84 config.marginBottom = dp;
85 return this;
86 }
87
88 public FollowMeButtonConfig build() {
89 return config;
90 }
91 }
92
93 public Drawable getFollowMeIcon() { return followMeIcon; }
94 public Drawable getFollowMeIconActive() { return followMeIconActive; }
95 public Integer getButtonBackgroundColor() { return buttonBackgroundColor; }
96 public Integer getAccentColor() { return accentColor; }
97 public Integer getTextColor() { return textColor; }
98 public float getButtonWidth() { return buttonWidth; }
99 public float getButtonHeight() { return buttonHeight; }
100 public int getMarginRight() { return marginRight; }
101 public int getMarginBottom() { return marginBottom; }
102}