diff --git a/OsmAnd/res/layout/main_menu_drawer_btn_configure_profile.xml b/OsmAnd/res/layout/main_menu_drawer_btn_configure_profile.xml index d77cc9e7fc..f510c410d7 100644 --- a/OsmAnd/res/layout/main_menu_drawer_btn_configure_profile.xml +++ b/OsmAnd/res/layout/main_menu_drawer_btn_configure_profile.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + xmlns:osmand="http://schemas.android.com/apk/res-auto" android:orientation="vertical"> - diff --git a/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml b/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml index 8db59b63f7..1b67c92af5 100644 --- a/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml +++ b/OsmAnd/res/layout/main_menu_drawer_btn_switch_profile.xml @@ -1,6 +1,7 @@ - - diff --git a/OsmAnd/res/layout/profile_preference_toolbar_big.xml b/OsmAnd/res/layout/profile_preference_toolbar_big.xml index a3b4878258..17dd95658b 100644 --- a/OsmAnd/res/layout/profile_preference_toolbar_big.xml +++ b/OsmAnd/res/layout/profile_preference_toolbar_big.xml @@ -69,7 +69,6 @@ android:layout_marginLeft="6dp" android:layout_marginRight="6dp" android:layout_marginBottom="6dp" - android:background="@drawable/bg_transparent_rounded_profile" android:clickable="true" android:focusable="true" android:orientation="horizontal"> diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 20deabcdb2..0fd400308b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -65,6 +65,7 @@ import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu; import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RoutingHelper; +import net.osmand.plus.settings.ConfigureProfileFragment; import net.osmand.plus.views.BaseMapLayer; import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapTileLayer; @@ -668,7 +669,7 @@ public class MapActivityActions implements DialogProvider { .setListener(new ItemClickListener() { @Override public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) { - mapActivity.startActivity(new Intent(mapActivity, SettingsProfileActivity.class)); + ConfigureProfileFragment.showInstance(mapActivity.getSupportFragmentManager()); return true; } }) diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index 8862a10914..f3d8cd6d19 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.support.annotation.ColorRes; import android.support.v14.preference.SwitchPreference; +import android.support.v4.app.FragmentManager; import android.support.v7.preference.Preference; import net.osmand.aidl.OsmandAidlApi; @@ -168,4 +169,17 @@ public class ConfigureProfileFragment extends BaseSettingsFragment { return super.onPreferenceChange(preference, newValue); } + + public static boolean showInstance(FragmentManager fragmentManager) { + try { + ConfigureProfileFragment configureProfileFragment = new ConfigureProfileFragment(); + fragmentManager.beginTransaction() + .replace(R.id.fragmentContainer, configureProfileFragment, TAG) + .addToBackStack(TAG) + .commitAllowingStateLoss(); + return true; + } catch (Exception e) { + return false; + } + } } \ No newline at end of file