[TIMOB-11342] Android: ActionItems do not display correctly
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-10-25T11:55:29.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
Components | Android |
Labels | actionbar, api, qe-testadded |
Reporter | Arthur Evans |
Assignee | Ping Wang |
Created | 2012-10-10T02:23:18.000+0000 |
Updated | 2013-10-03T07:28:10.000+0000 |
Description
Running the test code in TIMOB-9910 for ActionItems on a 4.0 device, the "Expand" item that appears appears partly off-screen, below the action bar.
(This assumes that all of the manifest voodoo is setup correctly to run using the action bar and associated themes.)
In my other testing, adding a menu item with showAsAction set to ALWAYS, I'm getting nothing in the action bar, a menu button displayed in the bottom row (like the legacy menu button), which brings up the menu item in the same place--below the action bar and halfway off screen.
Attachments
The issue describe above is due to "targetSdkVersion" is not correctly set in tiapp.xml. We should always use "android:targetSdkVersion", eg.
After fixing the setting issue, we found that in Menu.add() method many properties, eg. showAsAction, icon, are not set correctly. Sent PR https://github.com/appcelerator/titanium_mobile/pull/3208 to fix this. For FR: 1. Run the attached project "ThemeThree" on 4.0+ device. 2. Should see a "KS_nav_ui.png" icon shown in the action bar. 3. Click the action item. Should see the console log:
Master PR : https://github.com/appcelerator/titanium_mobile/pull/3208
backport PR: https://github.com/appcelerator/titanium_mobile/pull/3243
Tested with: SDK:3.0.0.v20121024144610 Studio: 3.0.0.201210220122 Device:HTC Desire V(Android 4.0.3) ActionItems are displayed correctly
Reopening to update labels