Annotation Type EpoxyDataBindingPattern


  • @Target(TYPE)
    @Retention(CLASS)
    public @interface EpoxyDataBindingPattern
    Used to specify a naming pattern for the databinding layouts that you want models generated for. Use this instead of EpoxyDataBindingLayouts to avoid having to explicitly list every databinding layout.

    The layouts must not specify a custom databinding class name or package via the class="com.example.CustomClassName" override in the layout xml.

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String layoutPrefix
      A string prefix that your databinding layouts start with.
      java.lang.Class<?> rClass
      The R class used in this module (eg "com.example.app.R.class").
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean enableDoNotHash
      If true, any variable whose type does not implement equals and hashcode will have the EpoxyAttribute.Option.DoNotHash behavior applied to them automatically.
    • Element Detail

      • rClass

        java.lang.Class<?> rClass
        The R class used in this module (eg "com.example.app.R.class"). This is needed so Epoxy can look up layout files.
      • layoutPrefix

        java.lang.String layoutPrefix
        A string prefix that your databinding layouts start with. Epoxy will generate a model for each databinding layout whose name starts with this.

        For example, if you set this prefix to "view_holder" and you have a "view_holder_header.xml" databinding layout, Epoxy will generate a HeaderBindingModel_ class for that layout.

      • enableDoNotHash

        boolean enableDoNotHash
        If true, any variable whose type does not implement equals and hashcode will have the EpoxyAttribute.Option.DoNotHash behavior applied to them automatically.

        This is generally helpful for listeners - other variables should almost always implement equals and hashcode.

        For details on the nuances of this, see https://github.com/airbnb/epoxy/wiki/DoNotHash

        Default:
        true