diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2018-11-02 15:53:31 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-11-07 18:32:07 +0100 |
commit | 81258a25539e9edb29a744c85de294a6b5c15bd3 (patch) | |
tree | fdfa6fad6ba02de5adf62961948f4abb836a7e90 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java | |
parent | c8f59d3692ad086bf49c3a97335a23804a503dd3 (diff) | |
download | qtlocation-mapboxgl-81258a25539e9edb29a744c85de294a6b5c15bd3.tar.gz |
[android] - nullify codebase with annotations
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java index c58cc310a8..dc359fa13a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BubbleLayout.java @@ -5,6 +5,7 @@ import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.RectF; +import android.support.annotation.NonNull; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.widget.LinearLayout; @@ -32,7 +33,7 @@ public class BubbleLayout extends LinearLayout { * * @param context The context used to inflate this bubble layout */ - public BubbleLayout(Context context) { + public BubbleLayout(@NonNull Context context) { this(context, null, 0); } @@ -42,7 +43,7 @@ public class BubbleLayout extends LinearLayout { * @param context The context used to inflate this bubble layout * @param attrs The attribute set to initialise this bubble layout from */ - public BubbleLayout(Context context, AttributeSet attrs) { + public BubbleLayout(@NonNull Context context, AttributeSet attrs) { this(context, attrs, 0); } @@ -53,7 +54,7 @@ public class BubbleLayout extends LinearLayout { * @param attrs The attribute set to initialise this bubble layout from * @param defStyleAttr The default style to apply this bubble layout with */ - public BubbleLayout(Context context, AttributeSet attrs, int defStyleAttr) { + public BubbleLayout(@NonNull Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.mapbox_BubbleLayout); @@ -84,7 +85,7 @@ public class BubbleLayout extends LinearLayout { } @Override - protected void dispatchDraw(Canvas canvas) { + protected void dispatchDraw(@NonNull Canvas canvas) { if (bubble != null) { bubble.draw(canvas); } @@ -111,6 +112,7 @@ public class BubbleLayout extends LinearLayout { * @param arrowDirection The direction of the arrow * @return this */ + @NonNull public BubbleLayout setArrowDirection(ArrowDirection arrowDirection) { resetPadding(); this.arrowDirection = arrowDirection; @@ -133,6 +135,7 @@ public class BubbleLayout extends LinearLayout { * @param arrowWidth The width of the arrow * @return this */ + @NonNull public BubbleLayout setArrowWidth(float arrowWidth) { resetPadding(); this.arrowWidth = arrowWidth; @@ -155,6 +158,7 @@ public class BubbleLayout extends LinearLayout { * @param arrowHeight The height of the arrow * @return this */ + @NonNull public BubbleLayout setArrowHeight(float arrowHeight) { resetPadding(); this.arrowHeight = arrowHeight; @@ -177,6 +181,7 @@ public class BubbleLayout extends LinearLayout { * @param arrowPosition The arrow position * @return this */ + @NonNull public BubbleLayout setArrowPosition(float arrowPosition) { resetPadding(); this.arrowPosition = arrowPosition; @@ -199,6 +204,7 @@ public class BubbleLayout extends LinearLayout { * @param cornersRadius The corner radius * @return this */ + @NonNull public BubbleLayout setCornersRadius(float cornersRadius) { this.cornersRadius = cornersRadius; requestLayout(); @@ -220,6 +226,7 @@ public class BubbleLayout extends LinearLayout { * @param bubbleColor The buble color * @return this */ + @NonNull public BubbleLayout setBubbleColor(int bubbleColor) { this.bubbleColor = bubbleColor; requestLayout(); @@ -241,6 +248,7 @@ public class BubbleLayout extends LinearLayout { * @param strokeWidth The stroke width * @return this */ + @NonNull public BubbleLayout setStrokeWidth(float strokeWidth) { resetPadding(); this.strokeWidth = strokeWidth; @@ -263,6 +271,7 @@ public class BubbleLayout extends LinearLayout { * @param strokeColor The stroke color * @return this */ + @NonNull public BubbleLayout setStrokeColor(int strokeColor) { this.strokeColor = strokeColor; requestLayout(); |