AliSherKashif / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

RFE: Enhanced support for the native ActionBar on ICS devices #246

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please provide any additional information below.

This RFE based on the ActionBar design guide 
(http://developer.android.com/design/patterns/actionbar.html).

1. Add support for the top-left icon to the actionbar (typically the appicon or 
a contextual icon)?

2. All the developer to control when command text is shown and when icons are 
shown?  Normally, only icons are shown on actionbar (but not always, ie.  
tablets), and the overflow normally contains only the text.  If I set all 
actions to only have buttons, then the overflow looks strange.  If I add text, 
the actionbar itself looks strange, currently there's no happy medium.

3. Add support for spinner or tab navigation in place of the ActionBar title, 
as per the following images from the android design guide:
http://developer.android.com/design/media/action_bar_basics.png
http://developer.android.com/design/media/tabs_youtube.png

4. Using the Galaxy Nexus as an example, in landscape mode there should be 5 
action buttons (including overflow), but I'm only getting 3, same as Portrait.
These numbers are listed under the heading "Action Overflow" in the guideline.

5. Add support for forcing commands into the overflow.   For example, if the 
form has 6 commands, but only one is desired visible the rest under overflow.  
This is part of the ActionBar pattern as well, they suggest only frequently 
used buttons should be visible.  In my own implementation, any command id over 
10 goes into the overflow, anything under 10 is a hint to be visible (as per #5 
above).

6. Add support for the two part ActionBar, where typically the action buttons 
are at the bottom of the form on portrait mode, and at the top in landscape 
mode, as per this image:

http://developer.android.com/design/media/action_bar_pattern_rotation.png

7. I may be overlooking something here, but I can't seem to change the style of 
the ActionBar buttons, tried overriding Command, CommandList, etc.  I override 
the holo theme to the 'holo mixed', where the title is dark, rest is 
holo_light, but I can't seem to get the buttons styled, as well as the back 
chevron.

Response from Chen in discussion forums:

At the moment the native ActionBar simply supports the following:

1) places the commands on the overflow menu 
2) replaces the regular Form title with the ActionBar title - which means 
calling setTitle will change the ActionBar title
3) maps the Form back command to the  ActionBar back command.

In the future we will enhance the ActionBar to support most of the use-cases 
you described above.

Besides that we in the near future we will introduce better commands support 
which also includes better iphone support for commands.

Original issue reported on code.google.com by 1815...@coolman.ca on 6 Jul 2012 at 6:16

GoogleCodeExporter commented 9 years ago
Assigning to Chen (FYI Chen will be on vacation this week so ping on this in a 
couple of weeks).

Original comment by shai.almog on 6 Jul 2012 at 6:23

GoogleCodeExporter commented 9 years ago
Another important use case I forgot to include:

9. Temporary contextual ActionBars (CAB), as per this image:
http://developer.android.com/design/media/action_bar_cab.png

I believe the 'search textfield' also falls under CAB as well although it's not 
discussed on the design guide document that I could find.  

Original comment by 1815...@coolman.ca on 10 Jul 2012 at 5:08