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 |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
|
| |
|
| |
|
|
|
| |
|
| |
|
| |
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
|
| |
|
|
|
| |
|
| |
|
|
|
| |
|
|
|
| |
|
| |
|
|
Updated about 2 hours ago