All Downloads are FREE. Search and download functionalities are using the official Maven repository.

onactivityresult.ExtraFloat Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package onactivityresult;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.CLASS;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * parameters of a {@link OnActivityResult} annotated method can be annotated to get a float extra of the Intent
* Example:
*

* * @OnActivityResult(requestCode = 1) * void onResult(@ExtraFloat final float extraFloat) { * // Do something * } * *

*
* extra name: same as parameter
* NOTE: In this case it would be extraFloat
*
* NOTE: If you don't care about the {@link ExtraFloat#defaultValue()} you can also use the {@link Extra} annotation
*
* * @since 0.3.0 */ @Retention(CLASS) @Target(PARAMETER) public @interface ExtraFloat { /** * @return the set default value if the extra is not set on the intent * @since 0.3.0 */ float defaultValue() default 0; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy