congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FieldAnnotationParser$ViewFinder.findViewById
Code IndexAdd Tabnine to your IDE (free)

How to use
findViewById
method
in
uk.co.ribot.easyadapter.annotations.FieldAnnotationParser$ViewFinder

Best Java code snippets using uk.co.ribot.easyadapter.annotations.FieldAnnotationParser$ViewFinder.findViewById (Showing top 1 results out of 315)

origin: ribot/easy-adapter

/**
 * Parse {@link ViewId} annotation and try to assign the view with that id to the annotated field.
 * It will throw a {@link ClassCastException} if the field and the view with the given ID have different types.
 *
 * @param object     object where the annotation is.
 * @param viewFinder callback that provides a way of finding the view by the viewID given in the annotation.
 */
private static void setViewFields(final Object object, final ViewFinder viewFinder) {
  Field[] fields = object.getClass().getDeclaredFields();
  for (Field field : fields) {
    if (field.isAnnotationPresent(ViewId.class)) {
      field.setAccessible(true);
      ViewId viewIdAnnotation = field.getAnnotation(ViewId.class);
      try {
        field.set(object, field.getType().cast(viewFinder.findViewById(viewIdAnnotation.value())));
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      }
    }
  }
}
uk.co.ribot.easyadapter.annotationsFieldAnnotationParser$ViewFinderfindViewById

Popular methods of FieldAnnotationParser$ViewFinder

    Popular in Java

    • Reading from database using SQL prepared statement
    • getExternalFilesDir (Context)
    • setContentView (Activity)
    • getContentResolver (Context)
    • BorderLayout (java.awt)
      A border layout lays out a container, arranging and resizing its components to fit in five regions:
    • FlowLayout (java.awt)
      A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • Path (java.nio.file)
    • MessageFormat (java.text)
      Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
    • Arrays (java.util)
      This class contains various methods for manipulating arrays (such as sorting and searching). This cl
    • Best plugins for Eclipse
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now