From be26c1845210a1c8824677ed6e2d093073ea5c84 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 20 Apr 2014 21:38:19 +0200 Subject: 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 --- main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java') diff --git a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java index e74751b..527f024 100644 --- a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java +++ b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java @@ -4,7 +4,7 @@ import butterknife.InjectView; import cgeo.geocaching.Intents; import cgeo.geocaching.R; -import cgeo.geocaching.activity.AbstractActivity; +import cgeo.geocaching.activity.AbstractActionBarActivity; import cgeo.geocaching.utils.BundleUtils; import cgeo.geocaching.utils.Log; import cgeo.geocaching.utils.MatcherWrapper; @@ -32,7 +32,7 @@ import android.widget.TextView; import java.io.IOException; import java.util.regex.Pattern; -public abstract class OAuthAuthorizationActivity extends AbstractActivity { +public abstract class OAuthAuthorizationActivity extends AbstractActionBarActivity { public static final int NOT_AUTHENTICATED = 0; public static final int AUTHENTICATED = 1; -- cgit v1.1