This commit is contained in:
Denis 2014-10-02 12:08:07 +03:00
parent b4961d3401
commit 6b436d928d

View file

@ -10,6 +10,9 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.opengl.GLSurfaceView;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import com.actionbarsherlock.app.ActionBar;
import net.osmand.Location;
import net.osmand.StateChangedListener;
import net.osmand.access.AccessibilityPlugin;
@ -102,6 +105,8 @@ public class MapActivity extends AccessibleActivity {
private FrameLayout lockView;
private GpxImportHelper gpxImportHelper;
private MapViewBaseController mapViewController;
private ActionBarDrawerToggle mDrawerToggle;
private DrawerLayout mDrawerLayout;
private Notification getNotification() {
@ -125,7 +130,7 @@ public class MapActivity extends AccessibleActivity {
mapActions = new MapActivityActions(this);
mapLayers = new MapActivityLayers(this);
requestWindowFeature(Window.FEATURE_NO_TITLE);
// requestWindowFeature(Window.FEATURE_NO_TITLE);
// Full screen is not used here
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
@ -272,9 +277,17 @@ public class MapActivity extends AccessibleActivity {
mapViewController.resume();
cancelNotification();
//fixing bug with action bar appearing on android 2.3.3
if (getSupportActionBar() != null){
getSupportActionBar().hide();
}
// if (getSupportActionBar() != null){
// getSupportActionBar().hide();
// }
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_navigation_drawer_light,
R.string.default_buttons_other_actions, R.string.close);
if (settings.MAP_SCREEN_ORIENTATION.get() != getRequestedOrientation()) {
setRequestedOrientation(settings.MAP_SCREEN_ORIENTATION.get());
// can't return from this method we are not sure if activity will be recreated or not