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

VFCustomViewTypeView typeDescription
commentCellDislikeImageVFImageView
commentCellDislikeTextVFTextView
commentCellLikeImageVFImageView
commentCellLikeTextVFTextView
commentCellDateTextVFTextView
commentCellUserTextVFTextVIew
commentCellCommentTextVFTextView
commentCellReplyTextVFTextView
commentCellRepliesTextVFTextView
postButtonVFButton
postEditTextVFEditText
postTitleVFTextView
postLoadingViewVFLoadingView
profileNameTextVFTextView
profileLogoutTextVFTextView
profileLikesTextVFTextView
profileFollowersTextVFTextView
previewEmptyCommentsViewVFEmptyCommentsView
previewTitleTextVFTextView
previewCounterTextVFTextView
previewLoadingViewVFLoadingView
previewPoweredByVFPoweredByView
previewPrivacyTextVFTextView
trendingCarouselTitleVFTextView
trendingCarouselImageVFImageView
trendingCarouselCountVFTextView
trendingVerticalFullImageVFImageView
trendingVerticalFullTitleVFTextView
trendingVerticalFullCountVFTextView
trendingVerticalCondensedTitleVFTextView
trendingVerticalCondensedCountVFTextView
chatCellContentLabelVFTextView
chatCellDateLabelVFTextView
chatCellUserNameLabelVFTextView

What’s Next