Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01FFD9F3E for ; Tue, 14 May 2013 05:17:18 +0000 (UTC) Received: (qmail 31169 invoked by uid 500); 14 May 2013 02:27:17 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 31136 invoked by uid 500); 14 May 2013 02:27:17 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 30998 invoked by uid 99); 14 May 2013 02:27:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 02:27:16 +0000 Date: Tue, 14 May 2013 02:27:16 +0000 (UTC) From: "Simon MacDonald (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CB-3068) Android menu not appearing as actionoverflow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-3068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon MacDonald resolved CB-3068. --------------------------------- Resolution: Fixed Fix Version/s: 2.8.0 I took a look at this tonight. It was easy to reproduce and after a quick investigation I could see the key up method was returning true to say the menu button key had been handled. Quick fix was to call super.onKeyUp. > Android menu not appearing as actionoverflow > -------------------------------------------- > > Key: CB-3068 > URL: https://issues.apache.org/jira/browse/CB-3068 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.6.0, 2.7.0 > Environment: Android > Reporter: Umang Kedia > Assignee: Simon MacDonald > Priority: Minor > Fix For: 2.8.0 > > > The android native menu is not opening when pressing menu button while using PhoneGap. When I am pressing menu button, onCreateOptionsMenu() method is getting called but the menu is not getting created. > public class PhoneGapActivity extends DroidGap { > @Override > public void onCreate(Bundle savedInstanceState) { > super.setBooleanProperty("showTitle", true); > super.onCreate(savedInstanceState); > super.loadUrl("file:///android_asset/www/index.html"); > } > @Override > public boolean onCreateOptionsMenu(Menu menu) { > // Inflate the menu; this adds items to the action bar if it is present. > super.onCreateOptionsMenu(menu); > Log.d("Menu","Menu option called"); > getMenuInflater().inflate(R.menu.phone_gap, menu); > return true; > } > } > The log is getting printed, that means the function is getting called. > XML file for menu: When the android:showAsAction is set to always, its showing in the action bar, otherwise its not showing in the actionoverflow. > > android:id="@+id/action_settings" > android:icon="@drawable/ic_menu_settings_holo_light" > android:showAsAction="always" > android:title="@string/action_settings"/> > android:id="@+id/more" > android:icon="@drawable/ic_menu_moreoverflow_normal_holo_light" > android:showAsAction="never" > android:title="@string/more"/> > > Ok. The code is working on 2.5 but its not working on version 2.6. I tested it on Android 4.0, 4.1 and 4.2. Will add it to description. Version 2.5 is working properly on 4.x+. -- 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