Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Fix pulse circle opacity calculate error (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Li authored Nov 19, 2020
1 parent c897a08 commit a470e39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ public void onNewAnimationValue(Float value) {
@Override
public void onNewAnimationValue(Float newPulseRadiusValue) {
Float newPulseOpacityValue = null;
if (options.pulseFadeEnabled()) {
newPulseOpacityValue = (float) 1 - ((newPulseRadiusValue / 100) * 3);
if (options.pulseFadeEnabled() && options.pulseMaxRadius() > 0) {
newPulseOpacityValue = 1.0f - newPulseRadiusValue / options.pulseMaxRadius();
}
locationLayerRenderer.updatePulsingUi(newPulseRadiusValue, newPulseOpacityValue);
}
Expand Down
2 changes: 2 additions & 0 deletions MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@
</activity>
<activity
android:name=".activity.location.BasicLocationPulsingCircleActivity"
android:exported="true"
android:description="@string/description_location_basic_pulsing_circle"
android:label="@string/activity_basic_location_pulsing_circle">
<meta-data
Expand All @@ -1028,6 +1029,7 @@
</activity>
<activity
android:name=".activity.location.CustomizedLocationPulsingCircleActivity"
android:exported="true"
android:description="@string/description_location_customized_pulsing_circle"
android:label="@string/activity_customized_location_pulsing_circle">
<meta-data
Expand Down

0 comments on commit a470e39

Please sign in to comment.