Skip to main content

Widget Documentation: LMFeedPollOptionView

Widget: LMFeedPollOptionView

The LMFeedPollOptionView represents a customizable view for a single poll option, enabling advanced styling, configuration, and interaction options.

MethodDescription
setStyle(postPollOptionViewStyle: LMFeedPostPollOptionViewStyle)Applies the given style to the poll option view.
configurePollOptionText(pollOptionTextStyle: LMFeedTextStyle)Configures the text style for the poll option.
configurePollOptionAddedByText(pollOptionAddedByTextStyle: LMFeedTextStyle)Configures the text style for the "added by" information.
configurePollOptionCheckedIcon(pollOptionCheckIconStyle: LMFeedIconStyle)Configures the style of the checked icon.
configurePollOptionVotesCountText(pollOptionVotesCountTextStyle: LMFeedTextStyle)Configures the text style for the votes count.
setPollOptionText(pollOptionText: String)Sets the text for the poll option.
setPollOptionAddedByText(pollOptionViewData: LMFeedPollOptionViewData, pollOptionViewStyle: LMFeedPostPollOptionViewStyle)Sets the "added by" text for the poll option.
setPollOptionCheckedIconVisibility(pollOptionViewData: LMFeedPollOptionViewData, pollOptionViewStyle: LMFeedPostPollOptionViewStyle)Configures the visibility of the checked icon.
setPollVotesCountText(pollOptionViewData: LMFeedPollOptionViewData, pollOptionViewStyle: LMFeedPostPollOptionViewStyle)Sets the text for the poll option votes count.
setPollOptionBackgroundAndProgress(pollOptionViewData: LMFeedPollOptionViewData, pollOptionViewStyle: LMFeedPostPollOptionViewStyle)Configures the background and progress for the poll option.
setPollOptionClicked(listener: LMFeedOnClickListener)Registers a click listener for the poll option.
setPollOptionVotesCountClicked(listener: LMFeedOnClickListener)Registers a click listener for the poll option votes count.

View the code on GitHub

View Style: LMFeedPostPollOptionViewStyle

The LMFeedPostPollOptionViewStyle defines the appearance and layout properties for the LMFeedPollOptionView, enabling customization for text, colors, and icons.

FieldDescriptionType
pollOptionTextStyleDefines the text style for poll options.LMFeedTextStyle
pollSelectedOptionColorSpecifies the color for the selected poll option.Int
pollOtherOptionColorSpecifies the color for unselected poll options.Int
pollOptionVotesCountTextStyleDefines the text style for displaying vote counts.LMFeedTextStyle
pollOptionAddedByTextStyleSpecifies the text style for "added by" information.LMFeedTextStyle
pollOptionCheckIconStyleDefines the style of the check icon for poll options.LMFeedIconStyle

View the code on GitHub