You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Ishai Borovoy <is...@worklight.com> on 2011/11/08 11:47:04 UTC
menubutton event
Hi,
By override the menu event in DroidGap you do no let the native options
menu to show up.
We (in Worklight) need to show the native options menu.
When override this event can you return false to let others override the
menu event in DroidGap.java?
Or can you tell how to explicit show the Native Options menu from
javascript?
Ishai Borovoy | Channels Team
Worklight | Office (972) 9-952-5625 | Mobile (972) 523-799-889
Download our free 30-day trial at <http://www.worklight.com/>
www.worklight.com
Re: menubutton event
Posted by Bryce Curtis <br...@curtiscountry.com>.
I've been looking at plugins implementing more than just the IPlugin
class, and this might be a good way to handle a menu plugin. A IMenu
interface can be defined that has all of the menu methods that an
Activity uses. DroidGap can be updated as your pull request suggests
to override the menu methods and pass to the plugins that implement
IMenu interface. This has the advantage that it doesn't add
special-purpose methods to the IPlugin interface that only one plugin
will ever use, yet it allows a plugin to implement just about any
functionality.
A second possible solution is to use the onMessage(string, object)
recently added to IPlugin. DroidGap could call
onMessage("onCreateOptionsMenu", Menu). The plugin could then fill
out the menu object. Now that I think about it, this option would be
the easiest to support with minimal changes - only hooks in DroidGap
to override menu methods and a menu plugin.
Bryce
On Tue, Nov 15, 2011 at 11:43 AM, Joe Bowser <bo...@gmail.com> wrote:
> Hey
>
> I currently have a patch waiting that shows how to allow plugins to
> access the Native Menu that is passed through with the MenuButton
> event. This is something that we've been working on in our projects
> for a bit. If you want to help it out, please review this pull
> request here:
> https://github.com/callback/callback-android/pull/16
>
> Also here's an example of it being used here in Wikipedia:
> https://github.com/nitobi/Wikipedia
>
> Let me know if you have an easier way to use Native Menus in PhoneGap
> with our current plugin architecture, and I'd be happy to adopt that
> instead.
>
> Joe
>
> On Tue, Nov 15, 2011 at 7:57 AM, Simon MacDonald
> <si...@gmail.com> wrote:
>> This is a bug, thanks for finding it. I've opened an issue here:
>>
>> https://issues.apache.org/jira/browse/CB-16
>>
>> I don't expect it will be too difficult to fix.
>>
>> Simon Mac Donald
>> http://hi.im/simonmacdonald
>>
>>
>>
>> On Tue, Nov 8, 2011 at 5:47 AM, Ishai Borovoy <is...@worklight.com> wrote:
>>> Hi,
>>>
>>> By override the menu event in DroidGap you do no let the native options
>>> menu to show up.
>>>
>>> We (in Worklight) need to show the native options menu.
>>>
>>> When override this event can you return false to let others override the
>>> menu event in DroidGap.java?
>>>
>>>
>>>
>>> Or can you tell how to explicit show the Native Options menu from
>>> javascript?
>>>
>>>
>>>
>>>
>>>
>>> Ishai Borovoy | Channels Team
>>>
>>> Worklight | Office (972) 9-952-5625 | Mobile (972) 523-799-889
>>>
>>> Download our free 30-day trial at <http://www.worklight.com/>
>>> www.worklight.com
>>>
>>>
>>>
>>>
>>
>
Re: menubutton event
Posted by Joe Bowser <bo...@gmail.com>.
Hey
I currently have a patch waiting that shows how to allow plugins to
access the Native Menu that is passed through with the MenuButton
event. This is something that we've been working on in our projects
for a bit. If you want to help it out, please review this pull
request here:
https://github.com/callback/callback-android/pull/16
Also here's an example of it being used here in Wikipedia:
https://github.com/nitobi/Wikipedia
Let me know if you have an easier way to use Native Menus in PhoneGap
with our current plugin architecture, and I'd be happy to adopt that
instead.
Joe
On Tue, Nov 15, 2011 at 7:57 AM, Simon MacDonald
<si...@gmail.com> wrote:
> This is a bug, thanks for finding it. I've opened an issue here:
>
> https://issues.apache.org/jira/browse/CB-16
>
> I don't expect it will be too difficult to fix.
>
> Simon Mac Donald
> http://hi.im/simonmacdonald
>
>
>
> On Tue, Nov 8, 2011 at 5:47 AM, Ishai Borovoy <is...@worklight.com> wrote:
>> Hi,
>>
>> By override the menu event in DroidGap you do no let the native options
>> menu to show up.
>>
>> We (in Worklight) need to show the native options menu.
>>
>> When override this event can you return false to let others override the
>> menu event in DroidGap.java?
>>
>>
>>
>> Or can you tell how to explicit show the Native Options menu from
>> javascript?
>>
>>
>>
>>
>>
>> Ishai Borovoy | Channels Team
>>
>> Worklight | Office (972) 9-952-5625 | Mobile (972) 523-799-889
>>
>> Download our free 30-day trial at <http://www.worklight.com/>
>> www.worklight.com
>>
>>
>>
>>
>
Re: menubutton event
Posted by Simon MacDonald <si...@gmail.com>.
This is a bug, thanks for finding it. I've opened an issue here:
https://issues.apache.org/jira/browse/CB-16
I don't expect it will be too difficult to fix.
Simon Mac Donald
http://hi.im/simonmacdonald
On Tue, Nov 8, 2011 at 5:47 AM, Ishai Borovoy <is...@worklight.com> wrote:
> Hi,
>
> By override the menu event in DroidGap you do no let the native options
> menu to show up.
>
> We (in Worklight) need to show the native options menu.
>
> When override this event can you return false to let others override the
> menu event in DroidGap.java?
>
>
>
> Or can you tell how to explicit show the Native Options menu from
> javascript?
>
>
>
>
>
> Ishai Borovoy | Channels Team
>
> Worklight | Office (972) 9-952-5625 | Mobile (972) 523-799-889
>
> Download our free 30-day trial at <http://www.worklight.com/>
> www.worklight.com
>
>
>
>