Skip to content

Commit 71b52d1

Browse files
author
Dmitry Zaytsev
committed
Added @ColorInt to methods which take color as an argument.
1 parent 2c30b7e commit 71b52d1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

anymaps-base/src/main/java/com/car2go/maps/model/CircleOptions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
package com.car2go.maps.model;
88

9+
import android.support.annotation.ColorInt;
10+
911
/**
1012
* Accumulates parameters which are required to create {@link Circle} component.
1113
* Mutable.
@@ -40,7 +42,7 @@ public CircleOptions radius(double radius) {
4042
* @param color color used to fill the circle
4143
* @return same {@link CircleOptions}
4244
*/
43-
public CircleOptions fillColor(int color) {
45+
public CircleOptions fillColor(@ColorInt int color) {
4446
fillColor = color;
4547
return this;
4648
}
@@ -49,7 +51,7 @@ public CircleOptions fillColor(int color) {
4951
* @param color color of the circle outline (stroke)
5052
* @return same {@link CircleOptions}
5153
*/
52-
public CircleOptions strokeColor(int color) {
54+
public CircleOptions strokeColor(@ColorInt int color) {
5355
strokeColor = color;
5456
return this;
5557
}

anymaps-base/src/main/java/com/car2go/maps/model/PolygonOptions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
package com.car2go.maps.model;
88

9+
import android.support.annotation.ColorInt;
10+
911
import java.util.ArrayList;
1012
import java.util.List;
1113

@@ -25,7 +27,7 @@ public class PolygonOptions {
2527
* @param color color used to fill the polygon
2628
* @return same {@link PolygonOptions}
2729
*/
28-
public PolygonOptions fillColor(int color) {
30+
public PolygonOptions fillColor(@ColorInt int color) {
2931
fillColor = color;
3032
return this;
3133
}
@@ -43,7 +45,7 @@ public PolygonOptions strokeWidth(float width) {
4345
* @param color color of the polygon outline
4446
* @return same {@link PolygonOptions}
4547
*/
46-
public PolygonOptions strokeColor(int color) {
48+
public PolygonOptions strokeColor(@ColorInt int color) {
4749
strokeColor = color;
4850
return this;
4951
}

anymaps-base/src/main/java/com/car2go/maps/model/PolylineOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
package com.car2go.maps.model;
88

9+
import android.support.annotation.ColorInt;
10+
911
import java.util.ArrayList;
1012
import java.util.List;
1113

@@ -23,7 +25,7 @@ public class PolylineOptions {
2325
* @param color color of the line
2426
* @return same {@link PolylineOptions}
2527
*/
26-
public PolylineOptions color(int color) {
28+
public PolylineOptions color(@ColorInt int color) {
2729
this.color = color;
2830
return this;
2931
}

0 commit comments

Comments
 (0)