You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Remzi Cavdar (JIRA)" <ji...@apache.org> on 2012/11/01 11:55:12 UTC

[jira] [Created] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Remzi Cavdar created CB-1795:
--------------------------------

             Summary: 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: Joe Bowser
             Fix For: 2.2.0, 2.3.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

[jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489688#comment-13489688 ] 

Remzi Cavdar commented on CB-1795:
----------------------------------

Thank you for you quick answer!!

And I'm making an application for my work.
There is one nasty bug, but I have forgotten it.

On Monday I will report A bug which is also blocking my development.
It's weekend and I have free :P

So don't release it!!!!  PhoneGap 2.2.0 isn't fully stable
                
> 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

[jira] [Resolved] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald resolved CB-1795.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.3.0)

Thanks for catching this. I was able to squeeze the fix into the 2.2.0 release.
                
> 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

[jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489679#comment-13489679 ] 

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

You can see my commit here:

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blobdiff;f=framework/src/org/apache/cordova/DroidGap.java;h=f504d2ea2478ce77a0588824ea21a4dea20a4738;hp=927e27e02dcecf0dd2e4bc375fa8b4686fcc81d7;hb=d9db845b435d7b614e20ed5a3065be124a5842f5;hpb=e55327b0649180e8c99006a7b0021cc6704ba159

We were returning false which means don't show the menu when we should have been returning true.

                
> 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

[jira] [Assigned] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald reassigned CB-1795:
-----------------------------------

    Assignee: Simon MacDonald  (was: Joe Bowser)
    
> 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, 2.3.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

[jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489334#comment-13489334 ] 

Remzi Cavdar commented on CB-1795:
----------------------------------

Thank you for your fast response, is it fixed now??
                
> 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

[jira] [Commented] (CB-1795) onCreateOptionsMenu in PhoneGap 2.2.0 Release Candidate 2 isn't working anymore

Posted by "Remzi Cavdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489672#comment-13489672 ] 

Remzi Cavdar commented on CB-1795:
----------------------------------

Thank you and I'm a little curious, what was the problem.

I'm studying for Application Developer and I'm learning Java.
Can you please tell me what was wrong in the code?
                
> 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