This commit is contained in:
GaidamakUA 2015-10-23 16:46:39 +03:00
commit d8c0e5f539
7 changed files with 42 additions and 16 deletions

View file

@ -14,7 +14,7 @@
android:insetRight="@dimen/map_button_inset_shadow"
android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" >
<solid android:color="@color/fab_color" />
<solid android:color="@color/map_widget_blue" />
</shape>
</inset>
</item>

View file

@ -14,7 +14,7 @@
android:insetRight="@dimen/map_button_inset_shadow"
android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" >
<solid android:color="@color/fab_color_pressed" />
<solid android:color="@color/map_widget_blue_pressed" />
</shape>
</inset>
</item>

View file

@ -24,7 +24,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_weight="1"
android:text="@string/share_menu_title"
android:text="@string/share_menu_location"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"/>

View file

@ -2266,4 +2266,25 @@
<string name="poi_tomb_crypt">Type: krypt</string>
<string name="poi_tomb_pyramid">Type: pyramide</string>
<string name="poi_historic_civilization_ancient_roman">Civilisation: antik romersk</string>
<string name="poi_historic_civilization_nuragic">Civilisation: nuragherkulturen</string>
<string name="poi_historic_civilization_etruscan">Civilisation: etruskisk</string>
<string name="poi_historic_civilization_prehistoric">Civilisation: forhistorisk</string>
<string name="poi_historic_civilization_ancient_greek">Civilisation: oldgræsk</string>
<string name="poi_historic_civilization_roman">Civilisation: romersk</string>
<string name="poi_historic_civilization_byzantine">Civilisation: byzantinsk</string>
<string name="poi_historic_civilization_imperial_chinese">Civilisation: kinesiske dynastier</string>
<string name="poi_historic_civilization_ancient_egyptian">Civilisation: gammelegyptisk</string>
<string name="poi_historic_civilization_celtic">Civilisation: celtic</string>
<string name="poi_historic_civilization_western_roman">Civilisation: vestlig romersk</string>
<string name="poi_historic_civilization_mycenaean">Civilisation: mykensk</string>
<string name="poi_historic_civilization_dacian">Civilisation: daker</string>
<string name="poi_historic_civilization_hernici">Civilisation: herniker</string>
<string name="poi_historic_civilization_greek_egyptian">Civilisation: græsk egyptisk</string>
<string name="poi_historic_civilization_roman_and_byzantine_egyptian">Civilisation: romersk og byzantinsk egyptisk</string>
<string name="poi_historic_civilization_helladic">Civilisation: helladisk</string>
<string name="poi_historic_civilization_cycladic">Civilisation: kykladisk</string>
<string name="poi_historic_civilization_minoan">Civilisation: minoisk</string>
<string name="poi_historic_civilization_tiahuanacota">Civilisation: tiahuanacota</string>
</resources>

View file

@ -2194,4 +2194,5 @@
<string name="share_menu_location">Del placering</string>
<string name="shared_string_send">Send</string>
<string name="hello_blank_fragment">Hej tomme fragment</string>
<string name="application_dir_description">Vælg hvor kortfilerne skal gemmes.</string>
</resources>

View file

@ -193,7 +193,7 @@ public class MapContextMenuFragment extends Fragment {
showOnMap(menu.getLatLon(), true, false);
if (hasMoved) {
applyPosY(getViewY(), false);
applyPosY(getViewY(), false, false);
}
return true;
}
@ -217,7 +217,7 @@ public class MapContextMenuFragment extends Fragment {
hasMoved = true;
float y = event.getY();
float newY = getViewY() + (y - dy);
setViewY((int) newY, false);
setViewY((int) newY, false, false);
menuFullHeight = view.getHeight() - (int) newY + 10;
if (!oldAndroid()) {
@ -246,13 +246,16 @@ public class MapContextMenuFragment extends Fragment {
boolean needCloseMenu = false;
int oldMenuState = menu.getCurrentMenuState();
if (menuBottomViewHeight > 0 && slidingUp) {
menu.slideUp();
} else if (slidingDown) {
needCloseMenu = !menu.slideDown();
}
int newMenuState = menu.getCurrentMenuState();
boolean needMapAdjust = oldMenuState != newMenuState && newMenuState != MenuController.MenuState.FULL_SCREEN;
applyPosY(currentY, needCloseMenu);
applyPosY(currentY, needCloseMenu, needMapAdjust);
break;
@ -260,7 +263,7 @@ public class MapContextMenuFragment extends Fragment {
return true;
}
private void applyPosY(final int currentY, final boolean needCloseMenu) {
private void applyPosY(final int currentY, final boolean needCloseMenu, boolean needMapAdjust) {
final int posY = getPosY(needCloseMenu);
if (currentY != posY) {
if (posY < currentY) {
@ -297,9 +300,11 @@ public class MapContextMenuFragment extends Fragment {
.setInterpolator(new DecelerateInterpolator())
.start();
adjustMapPosition(posY, true);
if (needMapAdjust) {
adjustMapPosition(posY, true);
}
} else {
setViewY(posY, false);
setViewY(posY, false, needMapAdjust);
updateMainViewLayout(posY);
}
}
@ -576,7 +581,7 @@ public class MapContextMenuFragment extends Fragment {
}
}
private void setViewY(int y, boolean animated) {
private void setViewY(int y, boolean animated, boolean adjustMapPos) {
if (!oldAndroid()) {
mainView.setY(y);
fabView.setY(getFabY(y));
@ -585,7 +590,9 @@ public class MapContextMenuFragment extends Fragment {
fabView.setPadding(0, getFabY(y), 0, 0);
}
if (!customMapCenter) {
adjustMapPosition(y, animated);
if (adjustMapPos) {
adjustMapPosition(y, animated);
}
} else {
customMapCenter = false;
}
@ -645,7 +652,7 @@ public class MapContextMenuFragment extends Fragment {
private void doLayoutMenu() {
final int posY = getPosY();
setViewY(posY, true);
setViewY(posY, true, true);
updateMainViewLayout(posY);
}

View file

@ -2,16 +2,13 @@ package net.osmand.plus.mapcontextmenu.details;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.search.SearchHistoryFragment;
import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.parkingpoint.ParkingPositionPlugin;
import net.osmand.util.Algorithms;
@ -76,7 +73,7 @@ public class ParkingPositionController extends MenuController {
@Override
public String getTitleButtonCaption() {
return getMapActivity().getText(R.string.osmand_parking_delete).toString();
return getMapActivity().getString(R.string.osmand_parking_delete);
}
@Override