cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore
Date Fri, 02 Nov 2012 18:05:12 GMT

    [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489604#comment-13489604
] 

Simon MacDonald commented on CB-1795:
-------------------------------------

Yes, it is fixed for 2.2.0.
                
> onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore
> -------------------------------------------------------------------------------
>
>                 Key: CB-1795
>                 URL: https://issues.apache.org/jira/browse/CB-1795
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Samsung Galaxy S2 with Android 4.0.4
> About my device: my device has stock Android, but it's rooted.
>            Reporter: Remzi Cavdar
>            Assignee: Simon MacDonald
>             Fix For: 2.2.0
>
>
> The menu doesn't show anymore.
> This is my code:
> package com.test.test.project;
> import android.os.Bundle;
> import android.view.Menu;
> import android.view.MenuInflater;
> import android.view.MenuItem;
> import android.view.WindowManager;
> import org.apache.cordova.*;
> public class MainActivity extends DroidGap
> {
>     @Override
>     public void onCreate(Bundle savedInstanceState)
>     {
>         super.onCreate(savedInstanceState);
>         super.loadUrl("file:///android_asset/www/index.html");
>         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
>     }
>     
>     @Override
>     public boolean onCreateOptionsMenu(Menu menu) {
>         MenuInflater inflater = getMenuInflater();
>         inflater.inflate(R.menu.menu, menu);
>         return true;
>     }
>     
>     @Override
>     public boolean onOptionsItemSelected(MenuItem item) {
>         switch (item.getItemId()) {
>             case R.id.close: finish ();
>             break;
>         }
>         return true;
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message