Package 

Class GroupModel_

    • Constructor Detail

      • GroupModel_

        GroupModel_()
      • GroupModel_

        GroupModel_(int layoutRes)
    • Method Detail

      • addTo

         void addTo(EpoxyController controller)

        Add this model to the given controller. Can only be called from inside .

      • handlePreBind

         void handlePreBind(EpoxyViewHolder holder, ModelGroupHolder object, int position)

        Called on the generated model immediately before the main model onBind method has been called.This let's the generated model handle binding setup of its own

        The ViewHolder is needed to get the model's adapter position when clicked.

      • handlePostBind

         void handlePostBind(ModelGroupHolder object, int position)

        Called on the generated model immediately after the main model onBind method has been called.This let's the generated model handle binding of its own and dispatch calls to its onBindlistener.

        We don't want to rely on the main onBind method to dispatch the onBind listener call becausethere are two onBind methods (one for payloads and one for no payloads), and one can call intothe other. We don't want to dispatch two onBind listener calls in that case.

      • unbind

         void unbind(ModelGroupHolder object)

        Called when the view bound to this model is recycled. Subclasses can override this if theirview should release resources when it's recycled.

        Note that bind can be called multiple times without an unbind call in betweenif the view has remained on screen to be reused across item changes. This means that you shouldnot rely on unbind to clear a view or model's state before bind is called again.

      • onVisibilityChanged

         void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, ModelGroupHolder object)

        TODO link to the wiki

      • id

         GroupModel_ id(long id)

        Override the default id in cases where the data subject naturally has an id, like an objectfrom a database. This id can only be set before the model is added to the adapter, it is anerror to change the id after that.

      • id

         GroupModel_ id(@Nullable() Array<Number> ids)

        Use multiple numbers as the id for this model. Useful when you don't have a single long thatrepresents a unique id.

        This hashes the numbers, so there is a tiny risk of collision with other ids.

      • id

         GroupModel_ id(long id1, long id2)

        Use two numbers as the id for this model. Useful when you don't have a single long thatrepresents a unique id.

        This hashes the two numbers, so there is a tiny risk of collision with other ids.

      • id

         GroupModel_ id(@Nullable() CharSequence key)

        Use a string as the model id. Useful for models that don't clearly map to a numerical id. Thisis preferable to using hashCode because that is a 32 bit hash and this is a 64bit hash, giving better spread and less chance of collision with other ids.

        Since this uses a hashcode method to convert the String to a long there is a very small chancethat you may have a collision with another id. Assuming an even spread of hashcodes, andseveral hundred models in the adapter, there would be roughly 1 in 100 trillion chance of acollision. (http://preshing.com/20110504/hash-collision-probabilities/)

      • id

         GroupModel_ id(@Nullable() CharSequence key, long id)

        Set an id that is namespaced with a string. This is useful when you need to show models ofmultiple types, side by side and don't want to risk id collisions.

        Since this uses a hashcode method to convert the String to a long there is a very small chancethat you may have a collision with another id. Assuming an even spread of hashcodes, andseveral hundred models in the adapter, there would be roughly 1 in 100 trillion chance of acollision. (http://preshing.com/20110504/hash-collision-probabilities/)