diff options
author | Pablo Guardiola <guardiola31337@gmail.com> | 2017-02-28 11:48:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 11:48:40 -0500 |
commit | 283aee0754837a05386bdb6bfacbd5d88156792e (patch) | |
tree | 247ac4efc8b776b32a016acee4942bd288f23a5d /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java | |
parent | 8e9d6a5b2cb316c90f88d9985afe48ca316a01d3 (diff) | |
download | qtlocation-mapboxgl-283aee0754837a05386bdb6bfacbd5d88156792e.tar.gz |
[WIP] InfoWindow refactor (#8080)
* [android] remove unnecessary info window class and add bubble layout
* fix some PR comments (remove hungarian notation, make bubble popup helper package protected and fix some code style issues)
* refactor replace enum in favor of intdef
* make bubble layout package protected and remove useless info window tip view class
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java deleted file mode 100644 index abcebfec83..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindowTipView.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.mapbox.mapboxsdk.annotations; - -import android.content.Context; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.graphics.Path; -import android.util.AttributeSet; -import android.view.View; - -import com.mapbox.mapboxsdk.R; - -final class InfoWindowTipView extends View { - - private Paint mPaint; - private Path mPath; - private int mLineWidth; - - public InfoWindowTipView(Context context, AttributeSet attrs) { - super(context, attrs); - - mPath = new Path(); - mLineWidth = (int) context.getResources().getDimension(R.dimen.mapbox_infowindow_line_width); - mPaint = new Paint(); - mPaint.setColor(Color.WHITE); - mPaint.setAntiAlias(true); - mPaint.setStrokeWidth(0.0f); - mPaint.setStyle(Paint.Style.FILL); - } - - @Override - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - int height = getMeasuredHeight(); - int width = getMeasuredWidth(); - - mPath.rewind(); - - this.mPaint.setColor(Color.WHITE); - this.mPaint.setAntiAlias(true); - this.mPaint.setStrokeWidth(0.0f); - this.mPaint.setStyle(Paint.Style.FILL); - - mPath.moveTo(0, 0); - mPath.lineTo(width, 0); - mPath.lineTo((width / 2), height); - mPath.lineTo(0, 0); - canvas.drawPath(mPath, this.mPaint); - - mPath.rewind(); - - this.mPaint.setColor(Color.parseColor("#C2C2C2")); - this.mPaint.setAntiAlias(true); - this.mPaint.setStrokeWidth(mLineWidth); - this.mPaint.setStyle(Paint.Style.STROKE); - - mPath.moveTo(0, 0); - mPath.lineTo(width / 2, height); - mPath.lineTo(width, 0); - canvas.drawPath(mPath, this.mPaint); - } -} |