Replace Personalization Items
Add New or Replace Personalization Items
If you want to add your own custom PersonalizationOption
. All you have to do is extend PersonalizationOption
and implement it’s two abstract methods
protected void onItemAddOrModify(PendingVoucher pendingVoucher, LoadingBaseActivity activity, CreateUIUpdater UIUpdater, @Nullable Long mediaId) {
// Called when the Personalization Option is clicked.
// Use this method to display customizations that the user can make to their Vouchr
// and call the UIUpdater if necessary.
// `mediaId` will be null unless the user is editing a current media item
}
protected void onItemRemoved(PendingVoucher pendingVoucher, LoadingBaseActivity activity, CreateUIUpdater UIUpdater, @Nullable Long mediaId) {
// Called when a user attempts to remove a personalization.
// Use this method to remove the option from the pendingVouchr and call UIUpdater if necessary.
}
protected fun onItemAddOrModify(pendingVoucher: PendingVoucher, activity: LoadingBaseActivity, UIUpdater: CreateUIUpdater, mediaId: Long?) {
// Called when the Personalization Option is clicked.
// Use this method to display customizations that the user can make to their Vouchr
// and call the UIUpdater if necessary.
// `mediaId` will be null unless the user is editing a current media item
}
protected fun onItemRemoved(pendingVoucher: PendingVoucher, activity: LoadingBaseActivity, UIUpdater: CreateUIUpdater, mediaId: Long?) {
// Called when a user attempts to remove a personalization.
// Use this method to remove the option from the pendingVouchr and call UIUpdater if necessary.
}