Class DateAdapter

    • Constructor Detail

      • DateAdapter

        public DateAdapter​(android.content.Context context,
                           java.util.List<EventDate> dataList)
        Constructor for DateAdapter
        Parameters:
        context - context of the view that the adapter to be attached
        dataList - list of EventDate to be displayed
    • Method Detail

      • createNormalViewHolder

        protected DateViewHolder createNormalViewHolder​(android.view.ViewGroup parent,
                                                        int viewType)
        Description copied from class: ListAdapter
        Abstract method to create normal view holder.
        Specified by:
        createNormalViewHolder in class ListAdapter<EventDate,​DateViewHolder>
        Parameters:
        parent - used to get resource
        viewType - type of view
        Returns:
        view holder for non special items
      • addAll

        public void addAll​(java.util.List<EventDate> data)
        Description copied from class: ListAdapter
        Appends all of the elements in the specified collection to the end of this list and notifies registered observers that the item list has been changed.
        Overrides:
        addAll in class ListAdapter<EventDate,​DateViewHolder>
        Parameters:
        data - list of items to add
      • enableUseOriginalWidth

        public void enableUseOriginalWidth​(boolean useOriginalWidth)
        Enable the use of original width
        Parameters:
        useOriginalWidth - true to use original width, else false
      • setOriginalWidth

        public void setOriginalWidth​(int originalWidth)
        Set the original width of each date cell
        Parameters:
        originalWidth - widht of date cell
      • setSelectedIndex

        public void setSelectedIndex​(int selectedIndex)
        Set the current selected index
        Parameters:
        selectedIndex - current index selected
      • updateSelectedIndex

        public void updateSelectedIndex​(int index)
        Update the selected index and the views for the current cell
        Parameters:
        index - index to set as selected
      • next

        public void next()
        Select the next item and update the properties of the view to be in selected state
      • previous

        public void previous()
        Select previous item and update the properties of the view in selected state