<ios> and <android> tags do not work inside ActionBar
See original GitHub issueThere seems to be an issue when trying to use <ios>
and <android>
tags inside of an ActionBar that cause the app to crash.
<ActionBar title="test">
<ios>
<ActionItem icon="res://ic_menu" ios.position="left" (tap)="openDrawer()"></ActionItem>
</ios>
<android>
<NavigationButton icon="res://ic_menu" (tap)="openDrawer()"></NavigationButton>
</android>
</ActionBar>
However, outside of ActionBar this works.
<StackLayout class="mainStackLayout">
<android>
<Label [text]="mainContentText" textWrap="true" class="drawerContentText"></Label>
<Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
<Button text="LIST VIEW" [nsRouterLink]="['/list']"></Button>
</android>
<ios>
<Button text="ACCOUNT VIEW" [nsRouterLink]="['/account']"></Button>
</ios>
</StackLayout>
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Menu Items are not showing on Action Bar - android
Context. There seems to be a misunderstanding about this showAsAction property in the menu configuration. The information I find in the many stackoverflow ......
Read more >Create Options Menu in ActionBar in Android using Jetpack ...
An ActionBar by default displays the activity name inside it. However, we can add other elements like the back button, images, options menu,...
Read more >Menus - Android Developers
The action mode is disabled and the contextual action bar disappears when the user deselects all items, presses the BACK button, or selects...
Read more >Using lists in Android wth ListView - Tutorial - Vogella.com
The input of a list (items in the list) can be arbitrary Java objects. The adapter extracts the correct data from the data...
Read more >App bars: top - Material Design
A top app bar can transform into a contextual action bar, remaining active until ... iOS. Titles are center-aligned by default in navigation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tsonevn When it is essential and often used, why don’t we ship it as built-in directive within NativeScript Angular package.
@tsonevn - I won’t pretend to know all the details about angular or the integration. I’ve been working on several NG apps lately and coming from plain NS background I always default to
<android>
&<ios>
tags for platform specific nodes in my templates. Is there reasoning this doesn’t work with the angular integration? What would it take to make this possible? After DevDays I wouldn’t mind working on helping get this done. I am thinking something like the directive @vakrilov has come up with should ship with the core and be available or support for the platform nodes similar to plain NS apps. At any rate, any info on concerns or limitations from the team are appreciated.