-
public final class PollsDisplayAdaptor extends ListAdapter<QuestionContainer, PollDisplayQuestionHolder<ViewBinding>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPollsDisplayAdaptor.Companion
-
Field Summary
Fields Modifier and Type Field Description private final List<PollDisplayQuestionHolder<ViewBinding>>updaterprivate final HMSPeerlocalPeerprivate final HmsPollgetPollprivate final Function3<HMSPollQuestion, String, HmsPoll, Boolean>saveInfoTextprivate final Function4<HMSPollQuestion, Integer, HmsPoll, Long, Boolean>saveInfoSingleChoiceprivate final Function4<HMSPollQuestion, List<Integer>, HmsPoll, Long, Boolean>saveInfoMultiChoiceprivate final Function2<HMSPollQuestion, HmsPoll, Unit>skippedprivate final Function1<HmsPoll, Unit>endPollprivate final Function1<QuestionContainer.Question, Long>getQuestionStartTimeprivate final Function1<QuestionContainer.Question, Unit>setQuestionStartTimeprivate final Function1<String, Unit>showLeaderBoardprivate final AsyncListDiffer<QuestionContainer>mDiffer
-
Constructor Summary
Constructors Constructor Description PollsDisplayAdaptor(HMSPeer localPeer, HmsPoll getPoll, Function3<HMSPollQuestion, String, HmsPoll, Boolean> saveInfoText, Function4<HMSPollQuestion, Integer, HmsPoll, Long, Boolean> saveInfoSingleChoice, Function4<HMSPollQuestion, List<Integer>, HmsPoll, Long, Boolean> saveInfoMultiChoice, Function2<HMSPollQuestion, HmsPoll, Unit> skipped, Function1<HmsPoll, Unit> endPoll, Function1<QuestionContainer.Question, Long> getQuestionStartTime, Function1<QuestionContainer.Question, Unit> setQuestionStartTime, Function1<String, Unit> showLeaderBoard)
-
Method Summary
-
Methods inherited from class androidx.recyclerview.widget.ListAdapter
bindViewHolder, canRestoreState, createViewHolder, findRelativeAdapterPositionIn, getItemId, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver -
Methods inherited from class live.hms.roomkit.ui.polls.display.PollsDisplayAdaptor
getCurrentList, getItem, getItemCount, onCurrentListChanged, submitList, submitList -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PollsDisplayAdaptor
PollsDisplayAdaptor(HMSPeer localPeer, HmsPoll getPoll, Function3<HMSPollQuestion, String, HmsPoll, Boolean> saveInfoText, Function4<HMSPollQuestion, Integer, HmsPoll, Long, Boolean> saveInfoSingleChoice, Function4<HMSPollQuestion, List<Integer>, HmsPoll, Long, Boolean> saveInfoMultiChoice, Function2<HMSPollQuestion, HmsPoll, Unit> skipped, Function1<HmsPoll, Unit> endPoll, Function1<QuestionContainer.Question, Long> getQuestionStartTime, Function1<QuestionContainer.Question, Unit> setQuestionStartTime, Function1<String, Unit> showLeaderBoard)
-
-
Method Detail
-
getUpdater
final List<PollDisplayQuestionHolder<ViewBinding>> getUpdater()
-
getLocalPeer
final HMSPeer getLocalPeer()
-
getGetPoll
final HmsPoll getGetPoll()
-
getSaveInfoText
final Function3<HMSPollQuestion, String, HmsPoll, Boolean> getSaveInfoText()
-
getSaveInfoSingleChoice
final Function4<HMSPollQuestion, Integer, HmsPoll, Long, Boolean> getSaveInfoSingleChoice()
-
getSaveInfoMultiChoice
final Function4<HMSPollQuestion, List<Integer>, HmsPoll, Long, Boolean> getSaveInfoMultiChoice()
-
getSkipped
final Function2<HMSPollQuestion, HmsPoll, Unit> getSkipped()
-
getEndPoll
final Function1<HmsPoll, Unit> getEndPoll()
-
getGetQuestionStartTime
final Function1<QuestionContainer.Question, Long> getGetQuestionStartTime()
-
getSetQuestionStartTime
final Function1<QuestionContainer.Question, Unit> getSetQuestionStartTime()
-
getShowLeaderBoard
final Function1<String, Unit> getShowLeaderBoard()
-
displayPoll
final Unit displayPoll(HmsPoll hmsPoll)
-
onCreateViewHolder
PollDisplayQuestionHolder<ViewBinding> onCreateViewHolder(ViewGroup parent, Integer viewType)
-
onBindViewHolder
Unit onBindViewHolder(PollDisplayQuestionHolder<ViewBinding> holder, Integer position)
-
getItemViewType
Integer getItemViewType(Integer position)
-
updatePollVotes
final Unit updatePollVotes(HmsPoll hmsPoll)
-
getItemForPosition
final QuestionContainer getItemForPosition(Integer position)
-
-
-
-