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
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin committed Nov 18, 2020
1 parent bb0b1db commit 76417da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void onNewAnimationValue(Float value) {
public void onNewAnimationValue(Float newPulseRadiusValue) {
Float newPulseOpacityValue = null;
if (options.pulseFadeEnabled()) {
newPulseOpacityValue = (float) 1 - ((newPulseRadiusValue / 100) * 3);
newPulseOpacityValue = 1 - 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 76417da

Please sign in to comment.