[android] #4304 - logo visibility fix for attributes defined in xml

This commit is contained in:
Tobrun
2016-03-14 15:10:45 -04:00
parent 922269cd7c
commit e04fea8409
2 changed files with 5 additions and 12 deletions

View File

@@ -130,14 +130,14 @@ public class MapboxMapOptions implements Parcelable {
, ((int) typedArray.getDimension(R.styleable.MapView_compass_margin_right, DIMENSION_TEN_DP * screenDensity))
, ((int) typedArray.getDimension(R.styleable.MapView_compass_margin_bottom, DIMENSION_TEN_DP * screenDensity))});
mapboxMapOptions.logoEnabled(typedArray.getBoolean(R.styleable.MapView_logo_visibility, true));
mapboxMapOptions.logoEnabled(typedArray.getBoolean(R.styleable.MapView_logo_enabled, true));
mapboxMapOptions.logoGravity(typedArray.getInt(R.styleable.MapView_logo_gravity, Gravity.BOTTOM | Gravity.START));
mapboxMapOptions.logoMargins(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_logo_margin_left, DIMENSION_SIXTEEN_DP) * screenDensity)
, (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_top, DIMENSION_SIXTEEN_DP) * screenDensity)
, (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_right, DIMENSION_SIXTEEN_DP) * screenDensity)
, (int) (typedArray.getDimension(R.styleable.MapView_logo_margin_bottom, DIMENSION_SIXTEEN_DP) * screenDensity)});
mapboxMapOptions.attributionEnabled(typedArray.getBoolean(R.styleable.MapView_attribution_visibility, true));
mapboxMapOptions.attributionEnabled(typedArray.getBoolean(R.styleable.MapView_attribution_enabled, true));
mapboxMapOptions.attributionGravity(typedArray.getInt(R.styleable.MapView_attribution_gravity, Gravity.BOTTOM));
mapboxMapOptions.attributionMargins(new int[]{(int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_left, DIMENSION_SEVENTY_SIX_DP) * screenDensity)
, (int) (typedArray.getDimension(R.styleable.MapView_attribution_margin_top, DIMENSION_SEVEN_DP) * screenDensity)

View File

@@ -59,11 +59,8 @@
<attr name="logo_margin_top" format="dimension" />
<attr name="logo_margin_right" format="dimension" />
<attr name="logo_margin_bottom" format="dimension" />
<attr name="logo_visibility">
<enum name="visible" value="0x0" />
<enum name="invisible" value="0x4" />
<enum name="gone" value="0x8" />
</attr>
<attr name="logo_enabled" format="boolean" />
<attr name="attribution_gravity">
<flag name="top" value="0x30" />
<flag name="bottom" value="0x50" />
@@ -84,10 +81,6 @@
<attr name="attribution_margin_top" format="dimension" />
<attr name="attribution_margin_right" format="dimension" />
<attr name="attribution_margin_bottom" format="dimension" />
<attr name="attribution_visibility">
<enum name="visible" value="0x0" />
<enum name="invisible" value="0x4" />
<enum name="gone" value="0x8" />
</attr>
<attr name="attribution_enabled" format="boolean" />
</declare-styleable>
</resources>