Skip to content

Instantly share code, notes, and snippets.

@luckyhandler
Created September 26, 2016 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luckyhandler/5469657f0cfd29e26eda3fb445722a03 to your computer and use it in GitHub Desktop.
Save luckyhandler/5469657f0cfd29e26eda3fb445722a03 to your computer and use it in GitHub Desktop.
Android - Annotation Example
import android.support.annotation.IntDef;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static android.support.design.widget.Snackbar.LENGTH_INDEFINITE;
import static android.support.design.widget.Snackbar.LENGTH_LONG;
import static android.support.design.widget.Snackbar.LENGTH_SHORT;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@IntDef({LENGTH_INDEFINITE, LENGTH_SHORT, LENGTH_LONG})
@interface DisplayLength {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment