35
35
*/
36
36
public class MapboxMapOptions implements Parcelable {
37
37
38
- private static final float DIMENSION_SEVEN_DP = 7f ;
39
- private static final float DIMENSION_TEN_DP = 10f ;
40
- private static final float DIMENSION_SIXTEEN_DP = 16f ;
41
- private static final float DIMENSION_SEVENTY_SIX_DP = 76f ;
38
+ private static final float FOUR_DP = 4f ;
39
+ private static final float EIGHTY_NINE_DP = 92f ;
42
40
43
41
private CameraPosition cameraPosition ;
44
42
@@ -206,13 +204,13 @@ public static MapboxMapOptions createFromAttributes(@NonNull Context context, @N
206
204
Gravity .TOP | Gravity .END ));
207
205
mapboxMapOptions .compassMargins (new int [] {
208
206
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiCompassMarginLeft ,
209
- DIMENSION_TEN_DP * pxlRatio )),
207
+ FOUR_DP * pxlRatio )),
210
208
((int ) typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiCompassMarginTop ,
211
- DIMENSION_TEN_DP * pxlRatio )),
209
+ FOUR_DP * pxlRatio )),
212
210
((int ) typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiCompassMarginRight ,
213
- DIMENSION_TEN_DP * pxlRatio )),
211
+ FOUR_DP * pxlRatio )),
214
212
((int ) typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiCompassMarginBottom ,
215
- DIMENSION_TEN_DP * pxlRatio ))});
213
+ FOUR_DP * pxlRatio ))});
216
214
mapboxMapOptions .compassFadesWhenFacingNorth (typedArray .getBoolean (
217
215
R .styleable .mapbox_MapView_mapbox_uiCompassFadeFacingNorth , true ));
218
216
Drawable compassDrawable = typedArray .getDrawable (
@@ -227,13 +225,13 @@ public static MapboxMapOptions createFromAttributes(@NonNull Context context, @N
227
225
Gravity .BOTTOM | Gravity .START ));
228
226
mapboxMapOptions .logoMargins (new int [] {
229
227
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiLogoMarginLeft ,
230
- DIMENSION_SIXTEEN_DP * pxlRatio )),
228
+ FOUR_DP * pxlRatio )),
231
229
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiLogoMarginTop ,
232
- DIMENSION_SIXTEEN_DP * pxlRatio )),
230
+ FOUR_DP * pxlRatio )),
233
231
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiLogoMarginRight ,
234
- DIMENSION_SIXTEEN_DP * pxlRatio )),
232
+ FOUR_DP * pxlRatio )),
235
233
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiLogoMarginBottom ,
236
- DIMENSION_SIXTEEN_DP * pxlRatio ))});
234
+ FOUR_DP * pxlRatio ))});
237
235
238
236
mapboxMapOptions .attributionTintColor (typedArray .getColor (
239
237
R .styleable .mapbox_MapView_mapbox_uiAttributionTintColor , -1 ));
@@ -243,13 +241,13 @@ public static MapboxMapOptions createFromAttributes(@NonNull Context context, @N
243
241
R .styleable .mapbox_MapView_mapbox_uiAttributionGravity , Gravity .BOTTOM ));
244
242
mapboxMapOptions .attributionMargins (new int [] {
245
243
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiAttributionMarginLeft ,
246
- DIMENSION_SEVENTY_SIX_DP ) * pxlRatio ),
244
+ EIGHTY_NINE_DP * pxlRatio ) ),
247
245
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiAttributionMarginTop ,
248
- DIMENSION_SEVEN_DP * pxlRatio )),
246
+ FOUR_DP * pxlRatio )),
249
247
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiAttributionMarginRight ,
250
- DIMENSION_SEVEN_DP * pxlRatio )),
248
+ FOUR_DP * pxlRatio )),
251
249
(int ) (typedArray .getDimension (R .styleable .mapbox_MapView_mapbox_uiAttributionMarginBottom ,
252
- DIMENSION_SEVEN_DP * pxlRatio ))});
250
+ FOUR_DP * pxlRatio ))});
253
251
254
252
mapboxMapOptions .locationEnabled (typedArray .getBoolean (R .styleable .mapbox_MapView_mapbox_myLocation , false ));
255
253
mapboxMapOptions .myLocationForegroundTintColor (
0 commit comments