You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to define a custom view in ActionItem #1488
Implementation suggestion: For iOS - use - (id)initWithCustomView:(UIView *)customView of the UIBarButtonItem. The catch is that in order to be able to handle tap the custom view must be a button. So the custom view must be added as a sub view to a UIButton. And then the UIButton should be passed to the initWithCustomView method.
I'm sorry but I quite don't get your solution. I'm quite new to NativeScript, do you have a simple sample app about ActionBar and ActionItem customization? I would appreciate really much.
Activity
enchev commentedon Feb 4, 2016
Hey @PeterStaev,
Great suggestion! If you have already something working you can submit pull request and we will gladly help with the implementation.
PeterStaev commentedon Feb 4, 2016
@enchev not exactly like this, but have made something similar in a custom actionbar implementation. So will see if to plug it in the {N} code.
deanle17 commentedon Feb 23, 2016
I'm sorry but I quite don't get your solution. I'm quite new to NativeScript, do you have a simple sample app about ActionBar and ActionItem customization? I would appreciate really much.
vchimev commentedon Mar 2, 2016
@LeDinhsmarp, a sample page could be found here: https://github.com/NativeScript/NativeScript/blob/master/apps/ui-tests-app/action-bar/action-view.xml.
bfattori commentedon Mar 2, 2016
How about without having to use XML? I'm trying to approach the ActionBar programmatically, yet all examples start with XML.
enchev commentedon Mar 12, 2016
Hey @bfattori,
You can create some View (for example Label) and assign in to ActionItem actionView property:
https://github.com/NativeScript/NativeScript/blob/master/ui/action-bar/action-bar.d.ts#L124
sitefinitysteve commentedon Mar 18, 2016
I LOVE YOU GUYS
vjoao commentedon Mar 19, 2016
I LOVE YOU GUYS [2]
chief10 commentedon Aug 30, 2016
Does this work with "android.position='popup' ? For me, it is not working and places the inner items outside of the popup and into the action bar.
Here is the code for my action items -- the third one has the inner label:
But this is what is happening:
lock commentedon Aug 29, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.