Skip to content

Commit

Permalink
Added @ColorInt to methods which take color as an argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Zaytsev committed Sep 4, 2017
1 parent 2c30b7e commit 71b52d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package com.car2go.maps.model;

import android.support.annotation.ColorInt;

/**
* Accumulates parameters which are required to create {@link Circle} component.
* Mutable.
Expand Down Expand Up @@ -40,7 +42,7 @@ public CircleOptions radius(double radius) {
* @param color color used to fill the circle
* @return same {@link CircleOptions}
*/
public CircleOptions fillColor(int color) {
public CircleOptions fillColor(@ColorInt int color) {
fillColor = color;
return this;
}
Expand All @@ -49,7 +51,7 @@ public CircleOptions fillColor(int color) {
* @param color color of the circle outline (stroke)
* @return same {@link CircleOptions}
*/
public CircleOptions strokeColor(int color) {
public CircleOptions strokeColor(@ColorInt int color) {
strokeColor = color;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package com.car2go.maps.model;

import android.support.annotation.ColorInt;

import java.util.ArrayList;
import java.util.List;

Expand All @@ -25,7 +27,7 @@ public class PolygonOptions {
* @param color color used to fill the polygon
* @return same {@link PolygonOptions}
*/
public PolygonOptions fillColor(int color) {
public PolygonOptions fillColor(@ColorInt int color) {
fillColor = color;
return this;
}
Expand All @@ -43,7 +45,7 @@ public PolygonOptions strokeWidth(float width) {
* @param color color of the polygon outline
* @return same {@link PolygonOptions}
*/
public PolygonOptions strokeColor(int color) {
public PolygonOptions strokeColor(@ColorInt int color) {
strokeColor = color;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package com.car2go.maps.model;

import android.support.annotation.ColorInt;

import java.util.ArrayList;
import java.util.List;

Expand All @@ -23,7 +25,7 @@ public class PolylineOptions {
* @param color color of the line
* @return same {@link PolylineOptions}
*/
public PolylineOptions color(int color) {
public PolylineOptions color(@ColorInt int color) {
this.color = color;
return this;
}
Expand Down

0 comments on commit 71b52d1

Please sign in to comment.