MemberCardView
Introduction#
Use this built-in view to display summary information of the member include: name, avatar, current balance points, current tier.
Usage#
- Android
- iOS
Prerequiresite#
To use this component, the main app needs to use androidx component for its fragment/activity:
Adding LoyaltyMemberCardView to your layout#
Setting up the controller in activity/fragment#
There is a note when we use the LoyaltyMemberCardView. When we add that view to our screen, it will fetch data of member automatically. This process can cause some errors like network connect... In these cases, that view will notify error to the client via callback. The client can show dialog or something for these errors and try to reload LoyaltyMemberCardView by reload method.
- Setup in Activity
- Or setup in Fragment
Usage#
You can embed MemberCardView as a subview in .xib files, or can create it programatically.
MemberCardView use MemberCardViewController as its controller. When controller.enable(), it will get member info.
In case there is an error, client app can call controller.reload() to retry request these data.
The parent ViewController must conform to MemberCardViewDelegate