diff options
| author | Arne Schwabe <arne@rfc2549.org> | 2014-04-20 21:38:19 +0200 |
|---|---|---|
| committer | Arne Schwabe <arne@rfc2549.org> | 2014-05-17 13:08:14 +0200 |
| commit | be26c1845210a1c8824677ed6e2d093073ea5c84 (patch) | |
| tree | 81d02773f4fd9edc5d05b44c770be89994a9c207 /main/res/menu/map_activity.xml | |
| parent | 496878826d638367c129b02e66f992202e0d36c9 (diff) | |
| download | cgeo-be26c1845210a1c8824677ed6e2d093073ea5c84.zip cgeo-be26c1845210a1c8824677ed6e2d093073ea5c84.tar.gz cgeo-be26c1845210a1c8824677ed6e2d093073ea5c84.tar.bz2 | |
Implement ActionBar using AppCompat in cgeo
This a first version of an ActionBar implementation with following properties:
- The application should be usuable (there still might be bugs left from the conversation to Action)
- Provides a more modern feeling on all devices
- gets rid of the "dots of shame" on Android 3.0+ devices
- The Maps classes MUST inherit from Activity instead of ActionBarActivity. There these classes use the old ActionBar on Android 2.3 devices and the real ActionBar on 3.0+
- This can be fixed when cgeo is ported to Google Maps API v2.0 API which usesFragment
- The Dialog classes (CachePopup and WaypointPopup) have been converted to DialogFragments
- The AppCombat themes provide no Theme.Dialog theme
- this will later ease using these Fragment in other Activities
- Use an almost empty activity which just shows the DialogFragment
- Use the 'old' ActionBar but which overflow menu button to fit into Holo Design Style
- Using a real ActionBar for Dialogs is not really support by Android and trying to force the frame into showing an Actionbar on a dialog leeds to strange bugs/effects
- Most of the icon are still the Android 2.3 Menu Icon. These need to be replaced with Holo Style Icons
- for most menu icon the ifRoom and/or withText attributes should be reviewed and set
- The ActionBar of the main Activity is transparent. This is more or less by accident but looks good
- Review Up Action of activities. Is going back to Main Activity always the semantically right thing to do?
- Shortpress/Longpress on the Actionbars Compass Icon for primary/secondary Navigation clashes the normal ActionBar behaviour of long pressing to show the text of the action
This commit contains many fixes and suggestions from rsudev
Diffstat (limited to 'main/res/menu/map_activity.xml')
| -rw-r--r-- | main/res/menu/map_activity.xml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/main/res/menu/map_activity.xml b/main/res/menu/map_activity.xml index d81a49b..3dfc5ae 100644 --- a/main/res/menu/map_activity.xml +++ b/main/res/menu/map_activity.xml @@ -1,9 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android" > +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:cgeo="http://schemas.android.com/apk/res-auto"> + + <item android:id="@+id/menu_toggle_mypos" + android:title="@string/menu_centerposition" + android:icon="@drawable/ic_menu_myposition" + cgeo:showAsAction="always" + android:showAsAction="always" + + /> <item android:id="@+id/menu_select_mapview" android:icon="@drawable/ic_menu_mapmode" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_view_map"> <menu> <group @@ -15,37 +25,44 @@ <item android:id="@+id/menu_map_live" android:icon="@drawable/ic_menu_refresh" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_live_disable"> </item> <item android:id="@+id/menu_store_caches" android:enabled="false" android:icon="@drawable/ic_menu_set_as" + cgeo:showAsAction="ifRoom|withText" android:title="@string/caches_store_offline"> </item> <item android:id="@+id/submenu_modes" android:icon="@drawable/ic_menu_mark" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_modes"> <menu> <item android:id="@+id/menu_trail_mode" android:icon="@drawable/ic_menu_trail" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_trail_hide"> </item> <item android:id="@+id/menu_circle_mode" android:icon="@drawable/ic_menu_circle" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_circles_hide"> </item> <item android:id="@+id/menu_mycaches_mode" android:icon="@android:drawable/ic_menu_myplaces" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_mycaches_hide"> </item> <item android:id="@+id/menu_theme_mode" android:icon="@drawable/ic_menu_preferences" + cgeo:showAsAction="ifRoom|withText" android:title="@string/map_theme_select"> </item> </menu> |
