Class ItemClickListener<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected android.content.Intent createDetailsIntent​(java.lang.String id, java.lang.String action)
      Method called to create the necessary intent based on the item id and the action set
      protected boolean handleItemClick​(android.content.Context context, int id, int awardId, java.lang.String awardStatus, java.lang.String action)
      Handles the screen redirection from the list Usually called inside the implementation of onItemClick(Object, View, int)
      abstract void onItemClick​(T item, android.view.View view, int position)
      Abstract method to be called after clicking an item from the list
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ItemClickListener

        public ItemClickListener()
    • Method Detail

      • onItemClick

        public abstract void onItemClick​(T item,
                                         android.view.View view,
                                         int position)
        Abstract method to be called after clicking an item from the list
        Parameters:
        item - object of type BaseData
        view - the view which received the click
        position - position of the view
      • handleItemClick

        protected boolean handleItemClick​(@NonNull
                                          android.content.Context context,
                                          int id,
                                          int awardId,
                                          @Nullable
                                          java.lang.String awardStatus,
                                          java.lang.String action)
        Handles the screen redirection from the list Usually called inside the implementation of onItemClick(Object, View, int)
        Parameters:
        context - used to get resources
        id - id of the item clicked
        awardId - id of the award if from the awards list otherwise set to -1
        awardStatus - status to set for current award
        action - implicit action for the intent
        Returns:
        true if the offer click was handle otherwise false
      • createDetailsIntent

        protected android.content.Intent createDetailsIntent​(java.lang.String id,
                                                             java.lang.String action)
        Method called to create the necessary intent based on the item id and the action set
        Parameters:
        id - id of the item clicked
        action - implicit action for the intent
        Returns:
        intent for details