on 2021 Jun 03 5:04 PM
Hi Experts,
We have a scenario to show the notification icon in ActionBar. We have a rule that fetches the status whether new notification is available or not. Based on that we will return different icons to show. We read doing a redraw on control will retrigger the rules. But we couldn't find any target path for ActionBar/ActionBartItems to redraw.
Could you guys suggest an approach to solve this problem.
Thanks,
Thamizharasan.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
You have two choices for this.
In terms of if one is better than the other, it will depend on your use case. Option 1 of toggling the visibility would be my choice for most use case since it is cleaner from a metadata standpoint and I can have my OnPress rule specific to the one action versus having a switch statement based on which state is currently being shown. It also has the advantage of not doing a full page redraw but you should evaluate both based on your use case.
Keep in mind that you need to use the index of the button when calling setActionBarItemVisible. We will be adding support for names in a future release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello thamizharasan
I have the same requirement. Did you manage?
Thanks
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.