[Sugar-devel] Android ActionBar and Activity Toolbar

Manuel Quiñones manuq at laptop.org
Fri Jul 26 11:15:59 EDT 2013

Andrew pointed me to the Android ActionBar:

- http://developer.android.com/guide/topics/ui/actionbar.html
- http://developer.android.com/design/patterns/actionbar.html

It is pretty standard on Android apps, and gives consistency between
them.  For Sugar activities running on Android, we should aim to keep
that consistency.  And according to their documentation, it is one of
the most important design elements that developers can implement.

The good news is that the ActionBar really is very similar to our
Activity Toolbar:

- has the app icon on the left
- tends to have icon-only buttons
- has a drop-down menu

Next to the App Icon, the bar can have a View Control, to switch
views.  Sugar activities don't usually have different views, so we can
ignore this difference.

The drop-down menu is for the buttons that overflow, and for less
often used buttons.  We have the first in GTK, not the second.

Android also have split action bars, which is very interesting for a
solution to the design issue we were bumping with in GTK: toolbars
whose elements don't fit in portrait mode.

So the question is: what kind of consistency will we favor?

- consistency between sugar activities and other android apps?
- consistency between sugar activities in any platform?
- or can we find something in between?

To make sugar activities more like other Android apps, we could
programmatically replace the HTML toolbar with an Android ActionBar.
But then we'll lose Sugar palettes and the Sugar theme.  Or we'll have
to implement the Sugar theme on Android.

After all this considerations I conclude that we should make the HTML
toolbar imitate the ActionBar in style and behaviour.

1. Keep the web-activity toolbar on Android, not replace it with an

2. When the activity runs on Android, make the web-activity toolbar as
   similar as possible as the standard Android ActionBar.  This is:

   - Make the toolbar height the same height as the ActionBar of other
     apps in the same device.

   - Have a drop-down menu.  We need to implement it anyways for when
     icons don't fit, like in GTK.

   - Take advantage of the drop-down menu to add the View Source.  In
     Sugar GTK, we only have access to the View Source from the Frame.

   - Use long-press to display the button tooltip.  I was going to
     implement this anyways, we have the same behaviour in GTK

   - Hide the Stop Button in Android and in the browser.


.. manuq ..

More information about the Sugar-devel mailing list