diff options
author | Tobrun <tobrun@mapbox.com> | 2017-05-31 09:46:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 09:46:12 +0200 |
commit | 83df8a8621287e548ee771599c9c98b61b9971a3 (patch) | |
tree | 73b7960e3e4037d208c75c2e38631cd43a474ce3 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils | |
parent | a39116a552bbb7b77f2946b5931944c7065d818e (diff) | |
download | qtlocation-mapboxgl-83df8a8621287e548ee771599c9c98b61b9971a3.tar.gz |
[android] - javadoc update for 5.1.0 release (#9138)
* [android] - javadoc update for 5.1.0 release
* oxford comma
* Grammar/spelling tweaks
* grammar tweak
* grammar tweak
* Grammar tweaks
* Grammar tweaks
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils')
2 files changed, 62 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/AnimatorUtils.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/AnimatorUtils.java index 7694604d9f..34c52c829b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/AnimatorUtils.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/AnimatorUtils.java @@ -10,13 +10,31 @@ import android.support.annotation.Nullable; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.view.View; +/** + * Animator utility class. + */ public class AnimatorUtils { + /** + * Animate a view from an animator resource. + * + * @param view the view to be animated + * @param animatorRes the animator resource to be loaded + * @param listener the animator end listener + */ public static void animate(@NonNull final View view, @AnimatorRes int animatorRes, @Nullable OnAnimationEndListener listener) { animate(view, animatorRes, -1, listener); } + /** + * Animate a view from an animator resource. + * + * @param view the view to be animated + * @param animatorRes the animator resource to be loaded + * @param duration the duration of the animator + * @param listener the animator end listener + */ public static void animate(final View view, @AnimatorRes int animatorRes, int duration, @Nullable final OnAnimationEndListener listener) { if (view == null) { @@ -43,14 +61,33 @@ public class AnimatorUtils { animator.start(); } + /** + * Animate a view from an animator resource. + * + * @param view the view to be animated + * @param animatorRes the animator resource to be loaded + */ public static void animate(@NonNull final View view, @AnimatorRes int animatorRes) { animate(view, animatorRes, -1); } + /** + * Animate a view from an animator resource. + * + * @param view the view to be animated + * @param animatorRes the animator resource to be loaded + * @param duration the duration of the animator + */ public static void animate(@NonNull final View view, @AnimatorRes int animatorRes, int duration) { animate(view, animatorRes, duration, null); } + /** + * Animate a view rotation property to a value. + * + * @param view the view to be rotated + * @param rotation the value to animate to + */ public static void rotate(@NonNull final View view, float rotation) { view.setLayerType(View.LAYER_TYPE_HARDWARE, null); ObjectAnimator rotateAnimator = ObjectAnimator.ofFloat(view, View.ROTATION, view.getRotation(), rotation); @@ -64,6 +101,12 @@ public class AnimatorUtils { rotateAnimator.start(); } + /** + * Animate a view rotation property by a value. + * + * @param view the view to be rotated + * @param rotationBy the value to animate by + */ public static void rotateBy(@NonNull final View view, float rotationBy) { view.setLayerType(View.LAYER_TYPE_HARDWARE, null); view.animate().rotationBy(rotationBy).setInterpolator(new FastOutSlowInInterpolator()).setListener( @@ -76,6 +119,13 @@ public class AnimatorUtils { }); } + /** + * Animate a view alpha property to a value. + * + * @param convertView the view to be animated + * @param alpha the value to animate to + * @param listener the animator end listener + */ public static void alpha(@NonNull final View convertView, float alpha, @Nullable final OnAnimationEndListener listener) { convertView.setLayerType(View.LAYER_TYPE_HARDWARE, null); @@ -99,10 +149,19 @@ public class AnimatorUtils { rotateAnimator.start(); } + /** + * Animate a view alpha property to a value. + * + * @param convertView the view to be animated + * @param alpha the value to animate to + */ public static void alpha(@NonNull final View convertView, float alpha) { alpha(convertView, alpha, null); } + /** + * An interface definition that is invoked when an animation ends. + */ public interface OnAnimationEndListener { void onAnimationEnd(); } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java index 2da2472d69..24c76243d9 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java @@ -17,6 +17,9 @@ import com.mapbox.mapboxsdk.exceptions.ConversionException; import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Color utility class. + */ public class ColorUtils { /** |