Custom UI

Customize the UI components in your app

The VFCustomUIDelegate allows you to customize the UI components, by giving you direct references to them.

VFPreviewCommentsFragment previewCommentsFragment = VFPreviewCommentsFragment.newInstance(articleViewModel.getStory().getContainerId(), articleMetadata, this, vfSettings);
previewCommentsFragment.setCustomUICallback(this);
val previewCommentsFragment = VFPreviewCommentsFragment.newInstance(
    articleViewModel.getStory().getContainerId(),
    articleMetadata,
    this,
    vfSettings
)
previewCommentsFragment.setCustomUICallback(this)

Implement the VFCustomUIInterface.

@Override
 public void customizeView(VFCustomViewType customViewType, View view) {
     switch (customViewType) {
         case commentCellCommentText:
             VFTextView commentTextView = (VFTextView) view;
             commentTextView.setTextColor(Color.RED);
             break;
     }
 }
fun customizeView(customViewType: VFCustomViewType ? , view : View) {
    when(customViewType) {
        VFCustomViewType.commentCellCommentText - > {
            val commentTextView = view as VFTextView
            commentTextView.setTextColor(Color.RED)
        }
    }
}

Customizable views

VFCustomViewType

View type

Description

commentCellDislikeImage

VFImageView

commentCellDislikeText

VFTextView

commentCellLikeImage

VFImageView

commentCellLikeText

VFTextView

commentCellDateText

VFTextView

commentCellUserText

VFTextVIew

commentCellCommentText

VFTextView

commentCellReplyText

VFTextView

commentCellRepliesText

VFTextView

postButton

VFButton

postEditText

VFEditText

postTitle

VFTextView

postLoadingView

VFLoadingView

profileNameText

VFTextView

profileLogoutText

VFTextView

profileLikesText

VFTextView

profileFollowersText

VFTextView

previewEmptyCommentsView

VFEmptyCommentsView

previewTitleText

VFTextView

previewCounterText

VFTextView

previewLoadingView

VFLoadingView

previewPoweredBy

VFPoweredByView

previewPrivacyText

VFTextView

trendingCarouselTitle

VFTextView

trendingCarouselImage

VFImageView

trendingCarouselCount

VFTextView

trendingVerticalFullImage

VFImageView

trendingVerticalFullTitle

VFTextView

trendingVerticalFullCount

VFTextView

trendingVerticalCondensedTitle

VFTextView

trendingVerticalCondensedCount

VFTextView

chatCellContentLabel

VFTextView

chatCellDateLabel

VFTextView

chatCellUserNameLabel

VFTextView


What’s Next