[TIMOB-11602] Android: Expose activity.invalidateOptionsMenu to allow changing action items in Android 3.0 and above
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-15T21:13:54.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 23 Core, 2012 Sprint 23 |
Components | Android |
Labels | 3.0.0beta2, module_android, qe-automation, qe-port, triage |
Reporter | Arthur Evans |
Assignee | Allen Yeung |
Created | 2012-10-29T21:24:17.000+0000 |
Updated | 2014-08-15T21:13:54.000+0000 |
Description
As described in http://developer.android.com/guide/topics/ui/menus.html#ChangingTheMenu, to change menu items (action items) in 3.0 and above, we'd need to expose the invalidateOptionsMenu method.
Test Steps: 1. Add the following entry into your Tiapp.xml:
2. Run the code snippet:
3. Click the login button in the action bar and it should change to logout This should be run on a 2.3 and a 3.0+ devices. When testing on a 2.3 device also click on the window and make sure that the menu bar opens.
PR: https://github.com/appcelerator/titanium_mobile/pull/3369
3.X PR: https://github.com/appcelerator/titanium_mobile/pull/3414
Closing as fixed. Expected behavior is shown. Tested and verified on: Titanium Studio, build: 3.0.0.201211121907 Titanium SDK, builds: 3.0.0.v20121113111657; 3.1.0.v20121112192600 Device: Samsung Galaxy SIII (4.0.4)
Reopening to add label.