Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11342] Android: ActionItems do not display correctly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-25T11:55:29.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsactionbar, api, qe-testadded
ReporterArthur Evans
AssigneePing Wang
Created2012-10-10T02:23:18.000+0000
Updated2013-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

FileDateSize
ThemeThree.zip2012-10-13T16:17:56.000+00003747551

Comments

  1. Ping Wang 2012-10-13

    The issue describe above is due to "targetSdkVersion" is not correctly set in tiapp.xml. We should always use "android:targetSdkVersion", eg.
       <uses-sdk android:targetSdkVersion="14"/>
       
    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:
       I was clicked
       
  2. Hieu Pham 2012-10-15

    Master PR : https://github.com/appcelerator/titanium_mobile/pull/3208
  3. Ping Wang 2012-10-15

    backport PR: https://github.com/appcelerator/titanium_mobile/pull/3243
  4. Anshu Mittal 2012-10-25

    Tested with: SDK:3.0.0.v20121024144610 Studio: 3.0.0.201210220122 Device:HTC Desire V(Android 4.0.3) ActionItems are displayed correctly
  5. Anshu Mittal 2012-10-25

    Reopening to update labels

JSON Source