-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Please, provide the details below:
When you create a custom ActionItem using the actionView property, the ActionItem is loosing its native touch-behaviour (the ripple effect on tap and the Toast on longpress for Android and also the native touch effect for iOS).
Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?
Yes, there is already an issue for Labels loosing their ripple effect:
https://github.com/NativeScript/NativeScript/issues/1778
It is also suggested there, that any layout container (StackLayout, GridLayout,...) should animate the ripple effect on Android and the native touch effect on iOS and that this should be extended to any touchable view inside the container.
This should also be referred to any custom actionView within the ActionBar.
Which platform(s) does your issue occur on?
Android and iOS
Please provide the following version numbers that your issue occurs with:
- CLI: 2.4.2
- Cross-platform modules: 2.4.4
- Runtime(s): 2.4.1
- Plugin(s): -
Please tell us how to recreate the issue in as much detail as possible.
In the following snippet I created an ActionBar with one 'default' ActionItem (using an Icon drawable resource) and a custom ActionItem using a FontAwesome icon, so that you can compare the behaviour between both approaches.
<ActionBar title="Index">
<ActionBar.actionItems>
<!-- Icon using image resource -->
<ActionItem text="Default ActionItem" position="right" icon="res://reply" />
<!-- Icon using custom ActionView -->
<ActionItem text="Custom ActionItem" position="right">
<ActionItem.actionView>
<Label text="" cssClass="actionItemIcon" />
</ActionItem.actionView>
</ActionItem>
</ActionBar.actionItems>
</ActionBar>
The result is demonstrated in the following GIF:
https://cdn-standard3.discourse.org/uploads/nativescript/original/1X/1de78f1463038d85be78daba01b60fd09d5a3894.gif