Merge branch 'master' into plan_route_options
This commit is contained in:
commit
5a156eca63
31 changed files with 1055 additions and 287 deletions
|
@ -292,8 +292,9 @@ public abstract class MapRenderingTypes {
|
||||||
rtype.category = parentCategory == null ? null : parentCategory.category;
|
rtype.category = parentCategory == null ? null : parentCategory.category;
|
||||||
rtype.onlyPoint = Boolean.parseBoolean(parser.getAttributeValue("", "point")); //$NON-NLS-1$
|
rtype.onlyPoint = Boolean.parseBoolean(parser.getAttributeValue("", "point")); //$NON-NLS-1$
|
||||||
rtype.relation = Boolean.parseBoolean(parser.getAttributeValue("", "relation")); //$NON-NLS-1$
|
rtype.relation = Boolean.parseBoolean(parser.getAttributeValue("", "relation")); //$NON-NLS-1$
|
||||||
|
rtype.relationGroup = Boolean.parseBoolean(parser.getAttributeValue("", "relationGroup")); //$NON-NLS-1$
|
||||||
if (rtype.isMain()) {
|
if (rtype.isMain()) {
|
||||||
if (rtype.relation) {
|
if (rtype.relationGroup) {
|
||||||
MapRulType mrt = MapRulType.createMainEntity(tag + "_" + value, null);
|
MapRulType mrt = MapRulType.createMainEntity(tag + "_" + value, null);
|
||||||
mrt.order = rtype.order;
|
mrt.order = rtype.order;
|
||||||
mrt.category = rtype.category;
|
mrt.category = rtype.category;
|
||||||
|
@ -533,6 +534,7 @@ public abstract class MapRenderingTypes {
|
||||||
|
|
||||||
protected String category = null;
|
protected String category = null;
|
||||||
protected boolean relation;
|
protected boolean relation;
|
||||||
|
protected boolean relationGroup;
|
||||||
// creation of only section
|
// creation of only section
|
||||||
protected boolean map = true;
|
protected boolean map = true;
|
||||||
protected boolean poi = true;
|
protected boolean poi = true;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -18,6 +17,7 @@ import java.util.Map.Entry;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
|
@ -26,7 +26,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||||
public class RenderingRulesStorage {
|
public class RenderingRulesStorage {
|
||||||
|
|
||||||
private final static Log log = PlatformUtil.getLog(RenderingRulesStorage.class);
|
private final static Log log = PlatformUtil.getLog(RenderingRulesStorage.class);
|
||||||
static boolean STORE_ATTTRIBUTES = false;
|
static boolean STORE_ATTRIBUTES = false;
|
||||||
|
|
||||||
// keep sync !
|
// keep sync !
|
||||||
// keep sync ! not change values
|
// keep sync ! not change values
|
||||||
|
@ -40,6 +40,10 @@ public class RenderingRulesStorage {
|
||||||
|
|
||||||
private final static int SHIFT_TAG_VAL = 16;
|
private final static int SHIFT_TAG_VAL = 16;
|
||||||
|
|
||||||
|
|
||||||
|
private final static String SEQ_ATTR_KEY = "seq";
|
||||||
|
private final static String SEQ_PLACEHOLDER = "#SEQ";
|
||||||
|
|
||||||
// C++
|
// C++
|
||||||
List<String> dictionary = new ArrayList<String>();
|
List<String> dictionary = new ArrayList<String>();
|
||||||
Map<String, Integer> dictionaryMap = new LinkedHashMap<String, Integer>();
|
Map<String, Integer> dictionaryMap = new LinkedHashMap<String, Integer>();
|
||||||
|
@ -183,31 +187,86 @@ public class RenderingRulesStorage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class XmlTreeSequence {
|
||||||
|
XmlTreeSequence parent;
|
||||||
|
String seqOrder;
|
||||||
|
Map<String, String> attrsMap = new LinkedHashMap<String, String>();
|
||||||
|
String name;
|
||||||
|
List<XmlTreeSequence> children = new ArrayList<RenderingRulesStorage.XmlTreeSequence>();
|
||||||
|
|
||||||
|
private void process(RenderingRulesHandler handler, int el) throws XmlPullParserException, IOException {
|
||||||
|
Map<String, String> seqAttrsMap = new HashMap<String, String>(attrsMap);
|
||||||
|
if (attrsMap.containsKey(SEQ_ATTR_KEY)) {
|
||||||
|
attrsMap.remove(SEQ_ATTR_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Entry<String, String> attr: attrsMap.entrySet()) {
|
||||||
|
if (attr.getValue().contains(SEQ_PLACEHOLDER)) {
|
||||||
|
seqAttrsMap.put(attr.getKey(), attr.getValue().replace(SEQ_PLACEHOLDER, el+""));
|
||||||
|
} else {
|
||||||
|
seqAttrsMap.put(attr.getKey(), attr.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
handler.startElement(seqAttrsMap, name);
|
||||||
|
for(XmlTreeSequence s : children) {
|
||||||
|
s.process(handler, el);
|
||||||
|
}
|
||||||
|
handler.endElement(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class RenderingRulesHandler {
|
private class RenderingRulesHandler {
|
||||||
private final XmlPullParser parser;
|
private final XmlPullParser parser;
|
||||||
private int state;
|
private int state;
|
||||||
|
|
||||||
Stack<RenderingRule> stack = new Stack<RenderingRule>();
|
Stack<RenderingRule> stack = new Stack<RenderingRule>();
|
||||||
|
|
||||||
Map<String, String> attrsMap = new LinkedHashMap<String, String>();
|
|
||||||
private final RenderingRulesStorageResolver resolver;
|
private final RenderingRulesStorageResolver resolver;
|
||||||
private RenderingRulesStorage dependsStorage;
|
private RenderingRulesStorage dependsStorage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public RenderingRulesHandler(XmlPullParser parser, RenderingRulesStorageResolver resolver){
|
public RenderingRulesHandler(XmlPullParser parser, RenderingRulesStorageResolver resolver){
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
this.resolver = resolver;
|
this.resolver = resolver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parse(InputStream is) throws XmlPullParserException, IOException {
|
public void parse(InputStream is) throws XmlPullParserException, IOException {
|
||||||
|
XmlPullParser parser = this.parser;
|
||||||
|
Map<String, String> attrsMap = new LinkedHashMap<String, String>();
|
||||||
parser.setInput(is, "UTF-8");
|
parser.setInput(is, "UTF-8");
|
||||||
int tok;
|
int tok;
|
||||||
|
XmlTreeSequence currentSeqElement = null;
|
||||||
while ((tok = parser.next()) != XmlPullParser.END_DOCUMENT) {
|
while ((tok = parser.next()) != XmlPullParser.END_DOCUMENT) {
|
||||||
if (tok == XmlPullParser.START_TAG) {
|
if (tok == XmlPullParser.START_TAG) {
|
||||||
startElement(parser.getName());
|
attrsMap.clear();
|
||||||
|
parseAttributes(parser, attrsMap);
|
||||||
|
String name = parser.getName();
|
||||||
|
if (!Algorithms.isEmpty(parser.getAttributeValue("", SEQ_ATTR_KEY)) || currentSeqElement != null) {
|
||||||
|
XmlTreeSequence seq = new XmlTreeSequence();
|
||||||
|
seq.name = name;
|
||||||
|
seq.attrsMap = new HashMap<String, String>(attrsMap);
|
||||||
|
seq.parent = currentSeqElement;
|
||||||
|
if (currentSeqElement == null) {
|
||||||
|
seq.seqOrder = parser.getAttributeValue("", SEQ_ATTR_KEY);
|
||||||
|
} else {
|
||||||
|
currentSeqElement.children.add(seq);
|
||||||
|
seq.seqOrder = currentSeqElement.seqOrder;
|
||||||
|
}
|
||||||
|
currentSeqElement = seq;
|
||||||
|
} else {
|
||||||
|
startElement(attrsMap, name);
|
||||||
|
}
|
||||||
} else if (tok == XmlPullParser.END_TAG) {
|
} else if (tok == XmlPullParser.END_TAG) {
|
||||||
|
if(currentSeqElement == null) {
|
||||||
endElement(parser.getName());
|
endElement(parser.getName());
|
||||||
|
} else {
|
||||||
|
XmlTreeSequence process = currentSeqElement;
|
||||||
|
currentSeqElement = currentSeqElement.parent;
|
||||||
|
if (currentSeqElement == null) {
|
||||||
|
// Here we process sequence element
|
||||||
|
int seqEnd = Integer.parseInt(process.seqOrder.substring(process.seqOrder.indexOf(':') + 1, process.seqOrder.length()));
|
||||||
|
for(int i = 1; i < seqEnd; i++) {
|
||||||
|
process.process(this, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,16 +285,14 @@ public class RenderingRulesStorage {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startElement(String name) throws XmlPullParserException, IOException {
|
public void startElement(Map<String, String> attrsMap, String name) throws XmlPullParserException, IOException {
|
||||||
boolean stateChanged = false;
|
boolean stateChanged = false;
|
||||||
final boolean isCase = isCase(name);
|
final boolean isCase = isCase(name);
|
||||||
final boolean isSwitch = isSwitch(name);
|
final boolean isSwitch = isSwitch(name);
|
||||||
if(isCase || isSwitch){ //$NON-NLS-1$
|
if(isCase || isSwitch){ //$NON-NLS-1$
|
||||||
attrsMap.clear();
|
|
||||||
boolean top = stack.size() == 0 || isTopCase();
|
boolean top = stack.size() == 0 || isTopCase();
|
||||||
parseAttributes(attrsMap);
|
|
||||||
RenderingRule renderingRule = new RenderingRule(attrsMap, isSwitch, RenderingRulesStorage.this);
|
RenderingRule renderingRule = new RenderingRule(attrsMap, isSwitch, RenderingRulesStorage.this);
|
||||||
if(top || STORE_ATTTRIBUTES){
|
if(top || STORE_ATTRIBUTES){
|
||||||
renderingRule.storeAttributes(attrsMap);
|
renderingRule.storeAttributes(attrsMap);
|
||||||
}
|
}
|
||||||
if (stack.size() > 0 && stack.peek() instanceof RenderingRule) {
|
if (stack.size() > 0 && stack.peek() instanceof RenderingRule) {
|
||||||
|
@ -244,10 +301,8 @@ public class RenderingRulesStorage {
|
||||||
}
|
}
|
||||||
stack.push(renderingRule);
|
stack.push(renderingRule);
|
||||||
} else if(isApply(name)){ //$NON-NLS-1$
|
} else if(isApply(name)){ //$NON-NLS-1$
|
||||||
attrsMap.clear();
|
|
||||||
parseAttributes(attrsMap);
|
|
||||||
RenderingRule renderingRule = new RenderingRule(attrsMap, false, RenderingRulesStorage.this);
|
RenderingRule renderingRule = new RenderingRule(attrsMap, false, RenderingRulesStorage.this);
|
||||||
if(STORE_ATTTRIBUTES) {
|
if(STORE_ATTRIBUTES) {
|
||||||
renderingRule.storeAttributes(attrsMap);
|
renderingRule.storeAttributes(attrsMap);
|
||||||
}
|
}
|
||||||
if (stack.size() > 0 && stack.peek() instanceof RenderingRule) {
|
if (stack.size() > 0 && stack.peek() instanceof RenderingRule) {
|
||||||
|
@ -272,14 +327,14 @@ public class RenderingRulesStorage {
|
||||||
state = POLYGON_RULES;
|
state = POLYGON_RULES;
|
||||||
stateChanged = true;
|
stateChanged = true;
|
||||||
} else if("renderingAttribute".equals(name)){ //$NON-NLS-1$
|
} else if("renderingAttribute".equals(name)){ //$NON-NLS-1$
|
||||||
String attr = parser.getAttributeValue("", "name");
|
String attr = attrsMap.get("name");
|
||||||
RenderingRule root = new RenderingRule(new HashMap<String, String>(), false, RenderingRulesStorage.this);
|
RenderingRule root = new RenderingRule(new HashMap<String, String>(), false, RenderingRulesStorage.this);
|
||||||
renderingAttributes.put(attr, root);
|
renderingAttributes.put(attr, root);
|
||||||
stack.push(root);
|
stack.push(root);
|
||||||
} else if("renderingProperty".equals(name)){ //$NON-NLS-1$
|
} else if("renderingProperty".equals(name)){ //$NON-NLS-1$
|
||||||
String attr = parser.getAttributeValue("", "attr");
|
String attr = attrsMap.get("attr");
|
||||||
RenderingRuleProperty prop;
|
RenderingRuleProperty prop;
|
||||||
String type = parser.getAttributeValue("", "type");
|
String type = attrsMap.get("type");
|
||||||
if("boolean".equalsIgnoreCase(type)){
|
if("boolean".equalsIgnoreCase(type)){
|
||||||
prop = RenderingRuleProperty.createInputBooleanProperty(attr);
|
prop = RenderingRuleProperty.createInputBooleanProperty(attr);
|
||||||
} else if("string".equalsIgnoreCase(type)){
|
} else if("string".equalsIgnoreCase(type)){
|
||||||
|
@ -287,20 +342,20 @@ public class RenderingRulesStorage {
|
||||||
} else {
|
} else {
|
||||||
prop = RenderingRuleProperty.createInputIntProperty(attr);
|
prop = RenderingRuleProperty.createInputIntProperty(attr);
|
||||||
}
|
}
|
||||||
prop.setDescription(parser.getAttributeValue("", "description"));
|
prop.setDescription(attrsMap.get("description"));
|
||||||
prop.setDefaultValueDescription(parser.getAttributeValue("", "defaultValueDescription"));
|
prop.setDefaultValueDescription(attrsMap.get("defaultValueDescription"));
|
||||||
prop.setCategory(parser.getAttributeValue("", "category"));
|
prop.setCategory(attrsMap.get("category"));
|
||||||
prop.setName(parser.getAttributeValue("", "name"));
|
prop.setName(attrsMap.get("name"));
|
||||||
if(parser.getAttributeValue("", "possibleValues") != null){
|
if (attrsMap.get("possibleValues") != null) {
|
||||||
prop.setPossibleValues(parser.getAttributeValue("", "possibleValues").split(","));
|
prop.setPossibleValues(attrsMap.get("possibleValues").split(","));
|
||||||
}
|
}
|
||||||
PROPS.registerRule(prop);
|
PROPS.registerRule(prop);
|
||||||
} else if("renderingConstant".equals(name)){ //$NON-NLS-1$
|
} else if("renderingConstant".equals(name)){ //$NON-NLS-1$
|
||||||
if(!renderingConstants.containsKey(parser.getAttributeValue("", "name"))){
|
if(!renderingConstants.containsKey(attrsMap.get("name"))){
|
||||||
renderingConstants.put(parser.getAttributeValue("", "name"), parser.getAttributeValue("", "value"));
|
renderingConstants.put(attrsMap.get("name"), attrsMap.get("value"));
|
||||||
}
|
}
|
||||||
} else if("renderingStyle".equals(name)){ //$NON-NLS-1$
|
} else if("renderingStyle".equals(name)){ //$NON-NLS-1$
|
||||||
String depends = parser.getAttributeValue("", "depends");
|
String depends = attrsMap.get("depends");
|
||||||
if(depends != null && depends.length()> 0){
|
if(depends != null && depends.length()> 0){
|
||||||
this.dependsStorage = resolver.resolve(depends, resolver);
|
this.dependsStorage = resolver.resolve(depends, resolver);
|
||||||
}
|
}
|
||||||
|
@ -311,7 +366,7 @@ public class RenderingRulesStorage {
|
||||||
PROPS = new RenderingRuleStorageProperties(dependsStorage.PROPS);
|
PROPS = new RenderingRuleStorageProperties(dependsStorage.PROPS);
|
||||||
|
|
||||||
}
|
}
|
||||||
internalRenderingName = parser.getAttributeValue("", "name");
|
internalRenderingName = attrsMap.get("name");
|
||||||
|
|
||||||
} else if("renderer".equals(name)){ //$NON-NLS-1$
|
} else if("renderer".equals(name)){ //$NON-NLS-1$
|
||||||
throw new XmlPullParserException("Rendering style is deprecated and no longer supported.");
|
throw new XmlPullParserException("Rendering style is deprecated and no longer supported.");
|
||||||
|
@ -337,7 +392,7 @@ public class RenderingRulesStorage {
|
||||||
return "group".equals(name) || "switch".equals(name);
|
return "group".equals(name) || "switch".equals(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> parseAttributes(Map<String, String> m) {
|
private Map<String, String> parseAttributes(XmlPullParser parser, Map<String, String> m) {
|
||||||
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
||||||
String name = parser.getAttributeName(i);
|
String name = parser.getAttributeName(i);
|
||||||
String vl = parser.getAttributeValue(i);
|
String vl = parser.getAttributeValue(i);
|
||||||
|
@ -396,7 +451,7 @@ public class RenderingRulesStorage {
|
||||||
vl = ns.remove("value");
|
vl = ns.remove("value");
|
||||||
// reset rendering rule attributes
|
// reset rendering rule attributes
|
||||||
renderingRule.init(ns);
|
renderingRule.init(ns);
|
||||||
if(STORE_ATTTRIBUTES) {
|
if(STORE_ATTRIBUTES) {
|
||||||
renderingRule.storeAttributes(ns);
|
renderingRule.storeAttributes(ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +524,7 @@ public class RenderingRulesStorage {
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) throws XmlPullParserException, IOException {
|
public static void main(String[] args) throws XmlPullParserException, IOException {
|
||||||
STORE_ATTTRIBUTES = true;
|
STORE_ATTRIBUTES = true;
|
||||||
// InputStream is = RenderingRulesStorage.class.getResourceAsStream("default.render.xml");
|
// InputStream is = RenderingRulesStorage.class.getResourceAsStream("default.render.xml");
|
||||||
final String loc = "/Users/victorshcherb/osmand/repos/resources/rendering_styles/";
|
final String loc = "/Users/victorshcherb/osmand/repos/resources/rendering_styles/";
|
||||||
String defaultFile = loc + "UniRS.render.xml";
|
String defaultFile = loc + "UniRS.render.xml";
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||||
public class RenderingRulesStoragePrinter {
|
public class RenderingRulesStoragePrinter {
|
||||||
|
|
||||||
public static void main(String[] args) throws XmlPullParserException, IOException {
|
public static void main(String[] args) throws XmlPullParserException, IOException {
|
||||||
RenderingRulesStorage.STORE_ATTTRIBUTES = true;
|
RenderingRulesStorage.STORE_ATTRIBUTES = true;
|
||||||
// InputStream is = RenderingRulesStorage.class.getResourceAsStream("default.render.xml");
|
// InputStream is = RenderingRulesStorage.class.getResourceAsStream("default.render.xml");
|
||||||
String defaultFile = "/Users/victorshcherb/osmand/repos/resources/rendering_styles/default.render.xml";
|
String defaultFile = "/Users/victorshcherb/osmand/repos/resources/rendering_styles/default.render.xml";
|
||||||
if(args.length > 0) {
|
if(args.length > 0) {
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class SearchPhrase {
|
||||||
|
|
||||||
|
|
||||||
public SearchPhrase generateNewPhrase(String text, SearchSettings settings) {
|
public SearchPhrase generateNewPhrase(String text, SearchSettings settings) {
|
||||||
String textToSearch = text;
|
String textToSearch = Algorithms.normalizeSearchText(text);
|
||||||
List<SearchWord> leftWords = this.words;
|
List<SearchWord> leftWords = this.words;
|
||||||
String thisTxt = getText(true);
|
String thisTxt = getText(true);
|
||||||
List<SearchWord> foundWords = new ArrayList<>();
|
List<SearchWord> foundWords = new ArrayList<>();
|
||||||
|
@ -183,6 +183,7 @@ public class SearchPhrase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static SearchPhrase emptyPhrase() {
|
public static SearchPhrase emptyPhrase() {
|
||||||
return emptyPhrase(null);
|
return emptyPhrase(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,29 @@ public class Algorithms {
|
||||||
return c == null || c.size() == 0;
|
return c == null || c.size() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static char[] CHARS_TO_NORMALIZE_KEY = new char['’'];
|
||||||
|
private static char[] CHARS_TO_NORMALIZE_VALUE = new char['\''];
|
||||||
|
|
||||||
|
public static String normalizeSearchText(String s) {
|
||||||
|
boolean norm = false;
|
||||||
|
for (int i = 0; i < s.length() && !norm; i++) {
|
||||||
|
char ch = s.charAt(i);
|
||||||
|
for (int j = 0; j < CHARS_TO_NORMALIZE_KEY.length; j++) {
|
||||||
|
if (ch == CHARS_TO_NORMALIZE_KEY[j]) {
|
||||||
|
norm = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!norm) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
for (int k = 0; k < CHARS_TO_NORMALIZE_KEY.length; k++) {
|
||||||
|
s = s.replace(CHARS_TO_NORMALIZE_KEY[k], CHARS_TO_NORMALIZE_VALUE[k]);
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isEmpty(Map<?, ?> map) {
|
public static boolean isEmpty(Map<?, ?> map) {
|
||||||
return map == null || map.size() == 0;
|
return map == null || map.size() == 0;
|
||||||
}
|
}
|
||||||
|
@ -320,10 +343,8 @@ public class Algorithms {
|
||||||
* exception. Supported formats are:
|
* exception. Supported formats are:
|
||||||
* #RRGGBB
|
* #RRGGBB
|
||||||
* #AARRGGBB
|
* #AARRGGBB
|
||||||
* 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta',
|
|
||||||
* 'yellow', 'lightgray', 'darkgray'
|
|
||||||
*/
|
*/
|
||||||
public static int parseColor(String colorString) {
|
public static int parseColor(String colorString) throws IllegalArgumentException {
|
||||||
if (colorString.charAt(0) == '#') {
|
if (colorString.charAt(0) == '#') {
|
||||||
// Use a long to avoid rollovers on #ffXXXXXX
|
// Use a long to avoid rollovers on #ffXXXXXX
|
||||||
if (colorString.length() == 4) {
|
if (colorString.length() == 4) {
|
||||||
|
|
|
@ -264,4 +264,5 @@
|
||||||
<string name="send_my_location_desc">Définir l\'intervalle minimum pour partager sa position.</string>
|
<string name="send_my_location_desc">Définir l\'intervalle minimum pour partager sa position.</string>
|
||||||
<string name="stale_location_desc">La dernière fois qu\'un contact s\'est déplacé.</string>
|
<string name="stale_location_desc">La dernière fois qu\'un contact s\'est déplacé.</string>
|
||||||
<string name="location_history_desc">Cacher les contacts qui ne se sont pas déplacés depuis un temps donné.</string>
|
<string name="location_history_desc">Cacher les contacts qui ne se sont pas déplacés depuis un temps donné.</string>
|
||||||
|
<string name="set_time_description">Définissez l\'heure à laquelle les contacts et groupes sélectionnés verront votre position en temps réel.</string>
|
||||||
</resources>
|
</resources>
|
|
@ -563,6 +563,7 @@ dependencies {
|
||||||
implementation ("com.github.HITGIF:TextFieldBoxes:1.4.5"){
|
implementation ("com.github.HITGIF:TextFieldBoxes:1.4.5"){
|
||||||
exclude group: 'com.android.support'
|
exclude group: 'com.android.support'
|
||||||
}
|
}
|
||||||
|
implementation 'com.jaredrummler:colorpicker:1.1.0'
|
||||||
|
|
||||||
huaweiImplementation files('libs/huawei-android-drm_v2.5.2.300.jar')
|
huaweiImplementation files('libs/huawei-android-drm_v2.5.2.300.jar')
|
||||||
freehuaweiImplementation files('libs/huawei-android-drm_v2.5.2.300.jar')
|
freehuaweiImplementation files('libs/huawei-android-drm_v2.5.2.300.jar')
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="@dimen/bottom_sheet_selected_item_title_height">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/basic_item_body"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:paddingStart="@dimen/content_padding"
|
||||||
|
android:paddingLeft="@dimen/content_padding"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingRight="0dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/bottom_sheet_icon_margin"
|
||||||
|
android:layout_marginRight="@dimen/bottom_sheet_icon_margin"
|
||||||
|
tools:src="@drawable/list_destination" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||||
|
tools:text="Some title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/description"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:textAppearance="@style/TextAppearance.ContextMenuSubtitle"
|
||||||
|
tools:text="Some description" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/compound_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="@dimen/bottom_sheet_content_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
|
||||||
|
android:layout_marginEnd="@dimen/content_padding_half"
|
||||||
|
android:layout_marginRight="@dimen/content_padding_half"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/additional_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/content_padding_half"
|
||||||
|
android:layout_marginBottom="@dimen/content_padding_half"
|
||||||
|
android:background="?attr/divider_color_basic" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/additional_button_icon"
|
||||||
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="@dimen/content_padding"
|
||||||
|
android:layout_marginRight="@dimen/content_padding"
|
||||||
|
tools:src="@drawable/ic_action_info_dark" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
63
OsmAnd/res/layout/custom_color_picker.xml
Normal file
63
OsmAnd/res/layout/custom_color_picker.xml
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="@dimen/content_padding"
|
||||||
|
android:paddingRight="@dimen/content_padding">
|
||||||
|
|
||||||
|
<com.jaredrummler.android.colorpicker.ColorPickerView
|
||||||
|
android:id="@+id/color_picker_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:paddingBottom="@dimen/content_padding_small"
|
||||||
|
app:cpv_alphaChannelVisible="true" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.jaredrummler.android.colorpicker.ColorPanelView
|
||||||
|
android:id="@+id/color_panel_new"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:cpv_colorShape="square" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="@dimen/content_padding"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/color_hex_text_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:boxBackgroundColor="@color/material_text_input_layout_bg"
|
||||||
|
app:hintEnabled="false"
|
||||||
|
app:prefixText="#">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/color_hex_edit_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:maxLines="4"
|
||||||
|
android:minHeight="@dimen/bottom_sheet_list_item_height"
|
||||||
|
android:paddingStart="@dimen/content_padding_small"
|
||||||
|
android:paddingLeft="@dimen/content_padding_small"
|
||||||
|
android:paddingEnd="@dimen/content_padding_small"
|
||||||
|
android:paddingRight="@dimen/content_padding_small"
|
||||||
|
android:textSize="@dimen/default_list_text_size"
|
||||||
|
tools:text="F1FF00" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -50,7 +50,7 @@
|
||||||
osmand:typeface="@string/font_roboto_medium" />
|
osmand:typeface="@string/font_roboto_medium" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/appearance_icon"
|
android:id="@+id/track_icon"
|
||||||
android:layout_width="@dimen/standard_icon_size"
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
android:layout_height="@dimen/standard_icon_size"
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
|
@ -94,7 +94,8 @@
|
||||||
android:id="@+id/map_controls_container"
|
android:id="@+id/map_controls_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom">
|
android:layout_gravity="bottom"
|
||||||
|
tools:visibility="invisible">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/map_ruler"
|
layout="@layout/map_ruler"
|
||||||
|
@ -104,8 +105,7 @@
|
||||||
android:layout_marginStart="@dimen/fab_margin_right"
|
android:layout_marginStart="@dimen/fab_margin_right"
|
||||||
android:layout_marginLeft="@dimen/fab_margin_right"
|
android:layout_marginLeft="@dimen/fab_margin_right"
|
||||||
android:layout_marginEnd="@dimen/fab_margin_right"
|
android:layout_marginEnd="@dimen/fab_margin_right"
|
||||||
android:layout_marginRight="@dimen/fab_margin_right"
|
android:layout_marginRight="@dimen/fab_margin_right" />
|
||||||
tools:visibility="invisible" />
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/map_hud_controls"
|
layout="@layout/map_hud_controls"
|
||||||
|
@ -115,8 +115,7 @@
|
||||||
android:layout_marginStart="@dimen/fab_margin_right"
|
android:layout_marginStart="@dimen/fab_margin_right"
|
||||||
android:layout_marginLeft="@dimen/fab_margin_right"
|
android:layout_marginLeft="@dimen/fab_margin_right"
|
||||||
android:layout_marginEnd="@dimen/fab_margin_right"
|
android:layout_marginEnd="@dimen/fab_margin_right"
|
||||||
android:layout_marginRight="@dimen/fab_margin_right"
|
android:layout_marginRight="@dimen/fab_margin_right" />
|
||||||
tools:visibility="invisible" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.FlowLayout
|
<com.google.android.material.internal.FlowLayout
|
||||||
android:id="@+id/select_color"
|
android:id="@+id/select_color"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -168,7 +168,8 @@
|
||||||
<string name="quick_action_osmbugs_hide">Peida OSM Notes</string>
|
<string name="quick_action_osmbugs_hide">Peida OSM Notes</string>
|
||||||
<string name="thank_you_for_feedback">Täname sind tagasiside eest</string>
|
<string name="thank_you_for_feedback">Täname sind tagasiside eest</string>
|
||||||
<string name="poi_cannot_be_found">Punkti või teed ei leitud.</string>
|
<string name="poi_cannot_be_found">Punkti või teed ei leitud.</string>
|
||||||
<string name="search_no_results_feedback">Otsingutulemused puuduvad\? Anna tagasisidet</string>
|
<string name="search_no_results_feedback">Otsingutulemused puuduvad\?
|
||||||
|
\nJaga tagasisidet</string>
|
||||||
<string name="increase_search_radius_to">Laienda otsingu raadiust kuni %1$s</string>
|
<string name="increase_search_radius_to">Laienda otsingu raadiust kuni %1$s</string>
|
||||||
<string name="send_search_query">Saada otsingu päring?</string>
|
<string name="send_search_query">Saada otsingu päring?</string>
|
||||||
<string name="shared_string_world">Maailm</string>
|
<string name="shared_string_world">Maailm</string>
|
||||||
|
@ -420,7 +421,7 @@
|
||||||
<string name="shared_string_two">Kaks</string>
|
<string name="shared_string_two">Kaks</string>
|
||||||
<string name="shared_string_one">Üks</string>
|
<string name="shared_string_one">Üks</string>
|
||||||
<string name="distance_indication_descr">Vali, kuidas kuvada kaugus aktiivsete markeriteni.</string>
|
<string name="distance_indication_descr">Vali, kuidas kuvada kaugus aktiivsete markeriteni.</string>
|
||||||
<string name="active_markers_descr">Määra suunaviitade arv:</string>
|
<string name="active_markers_descr">Määra suunaviitade arv.</string>
|
||||||
<string name="favourites_group">Lemmikute kategooria</string>
|
<string name="favourites_group">Lemmikute kategooria</string>
|
||||||
<string name="add_group">Lisa grupp</string>
|
<string name="add_group">Lisa grupp</string>
|
||||||
<string name="empty_state_markers_active">Loo kaardimarkereid!</string>
|
<string name="empty_state_markers_active">Loo kaardimarkereid!</string>
|
||||||
|
@ -461,7 +462,7 @@
|
||||||
<string name="will_open_tomorrow_at">Avaneb homme kell</string>
|
<string name="will_open_tomorrow_at">Avaneb homme kell</string>
|
||||||
<string name="show_closed_notes">Kuva suletud teated</string>
|
<string name="show_closed_notes">Kuva suletud teated</string>
|
||||||
<string name="switch_osm_notes_visibility_desc">Kuva/peida OSM teated kaardil.</string>
|
<string name="switch_osm_notes_visibility_desc">Kuva/peida OSM teated kaardil.</string>
|
||||||
<string name="osc_file_desc">OSC - sobib OpenStreetMap-i viimiseks.</string>
|
<string name="osc_file_desc">OSC - sobib andmete laadimiseks OpenStreetMap\'i andmebaasi</string>
|
||||||
<string name="osc_file">OSC fail</string>
|
<string name="osc_file">OSC fail</string>
|
||||||
<string name="choose_file_type">Vali faililiik</string>
|
<string name="choose_file_type">Vali faililiik</string>
|
||||||
<string name="all_data">Kõik andmed</string>
|
<string name="all_data">Kõik andmed</string>
|
||||||
|
@ -604,7 +605,7 @@
|
||||||
<string name="exit_at">Välju</string>
|
<string name="exit_at">Välju</string>
|
||||||
<string name="sit_on_the_stop">Sisene peatuses</string>
|
<string name="sit_on_the_stop">Sisene peatuses</string>
|
||||||
<string name="quick_action_show_hide_gpx_tracks">Kuva/peida GPX rajad</string>
|
<string name="quick_action_show_hide_gpx_tracks">Kuva/peida GPX rajad</string>
|
||||||
<string name="quick_action_show_hide_gpx_tracks_descr">Lüliti valitud GPX radade kaardil kuvamisekks või peitmiseks.</string>
|
<string name="quick_action_show_hide_gpx_tracks_descr">Nupp valitud GPX radade kaardil kuvamiseks või peitmiseks.</string>
|
||||||
<string name="quick_action_gpx_tracks_hide">Peida GPX rajad</string>
|
<string name="quick_action_gpx_tracks_hide">Peida GPX rajad</string>
|
||||||
<string name="quick_action_gpx_tracks_show">Kuva GPX rajad</string>
|
<string name="quick_action_gpx_tracks_show">Kuva GPX rajad</string>
|
||||||
<string name="add_destination_query">Palun määra esmalt sihtkoht</string>
|
<string name="add_destination_query">Palun määra esmalt sihtkoht</string>
|
||||||
|
@ -658,7 +659,7 @@
|
||||||
<string name="rendering_attr_highway_class_cycleway_name">Jalgrattatee</string>
|
<string name="rendering_attr_highway_class_cycleway_name">Jalgrattatee</string>
|
||||||
<string name="rendering_attr_undefined_name">Määratlemata</string>
|
<string name="rendering_attr_undefined_name">Määratlemata</string>
|
||||||
<string name="public_transport_warning_descr_blog">OsmAnd teekonna arvutamise kohta loe lähemalt meie blogist.</string>
|
<string name="public_transport_warning_descr_blog">OsmAnd teekonna arvutamise kohta loe lähemalt meie blogist.</string>
|
||||||
<string name="public_transport_warning_title">Ühistranspordiga navigeerimine on praegu beeta testimisel, arvesta vigade ja ebatäpsusega.</string>
|
<string name="public_transport_warning_title">Ühistranspordiga liikumine on praegu beetatestimisel, arvesta vigade ja ebatäpsusega.</string>
|
||||||
<string name="add_intermediate">Lisa vahepunkt</string>
|
<string name="add_intermediate">Lisa vahepunkt</string>
|
||||||
<string name="shared_string_walk">Kõndimine</string>
|
<string name="shared_string_walk">Kõndimine</string>
|
||||||
<string name="save_poi_value_exceed_length">Lühenda \"%s\" sildi pikkust vähemale kui 255 tähemärgile.</string>
|
<string name="save_poi_value_exceed_length">Lühenda \"%s\" sildi pikkust vähemale kui 255 tähemärgile.</string>
|
||||||
|
@ -771,7 +772,7 @@
|
||||||
<string name="default_speed_setting_title">Vaikimisi kiirus</string>
|
<string name="default_speed_setting_title">Vaikimisi kiirus</string>
|
||||||
<string name="default_speed_setting_descr">Muuda vaikimisi kiiruse seadeid</string>
|
<string name="default_speed_setting_descr">Muuda vaikimisi kiiruse seadeid</string>
|
||||||
<string name="minmax_speed_dialog_title">Määra vähim/suurim kiirus</string>
|
<string name="minmax_speed_dialog_title">Määra vähim/suurim kiirus</string>
|
||||||
<string name="default_speed_dialog_msg">Kasutusel kohale jõudmise aja hindamiseks tundmatute teede korral ja kiiruse piiramiseks kõikidel teedel (võib muuta teekonda)</string>
|
<string name="default_speed_dialog_msg">Hindab saamumisaega tundmatute teede korral ja kiirusepiiranguid kõikidel teedel (võib muuta teekonda)</string>
|
||||||
<string name="new_profile">Uus profiil</string>
|
<string name="new_profile">Uus profiil</string>
|
||||||
<string name="shared_string_crash">Kokkujooksmine</string>
|
<string name="shared_string_crash">Kokkujooksmine</string>
|
||||||
<string name="last_launch_crashed">OsmAnd jooksis viimati kasutades kokku. Palun aita meil veateadet jagades OsmAnd rakendust parandada.</string>
|
<string name="last_launch_crashed">OsmAnd jooksis viimati kasutades kokku. Palun aita meil veateadet jagades OsmAnd rakendust parandada.</string>
|
||||||
|
@ -925,7 +926,7 @@
|
||||||
<string name="paste_Osmand_data_folder_path">Kleebi OsmAnd andmekausta asukoht</string>
|
<string name="paste_Osmand_data_folder_path">Kleebi OsmAnd andmekausta asukoht</string>
|
||||||
<string name="change_osmand_data_folder_question">Muuta OsmAnd andmekausta\?</string>
|
<string name="change_osmand_data_folder_question">Muuta OsmAnd andmekausta\?</string>
|
||||||
<string name="move_maps_to_new_destination">Liiguta uude asukohta</string>
|
<string name="move_maps_to_new_destination">Liiguta uude asukohta</string>
|
||||||
<string name="internal_app_storage_description">Sisemine salvestusruum, kasutaja ja teiste rakenduste eest peidetud, ainult OsmAnd juurdepääsetav</string>
|
<string name="internal_app_storage_description">Sisemine salvestusruum, kasutaja ja teiste rakenduste eest peidetud, juurdepääsetav ainult OsmAnd\'ile.</string>
|
||||||
<string name="change_data_storage_folder">Muuda andmete salvestamise kausta</string>
|
<string name="change_data_storage_folder">Muuda andmete salvestamise kausta</string>
|
||||||
<string name="rendering_attr_piste_type_snow_park_name">Maastikupark</string>
|
<string name="rendering_attr_piste_type_snow_park_name">Maastikupark</string>
|
||||||
<string name="rendering_attr_piste_type_sleigh_name">Saan</string>
|
<string name="rendering_attr_piste_type_sleigh_name">Saan</string>
|
||||||
|
@ -971,9 +972,9 @@
|
||||||
<string name="routing_attr_prefer_unpaved_description">Eelista katteta teid.</string>
|
<string name="routing_attr_prefer_unpaved_description">Eelista katteta teid.</string>
|
||||||
<string name="update_all_maps">Uuenda kõiki kaarte</string>
|
<string name="update_all_maps">Uuenda kõiki kaarte</string>
|
||||||
<string name="update_all_maps_q">Oled kindel, et soovid kõiki (%1$d) kaarte uuendada\?</string>
|
<string name="update_all_maps_q">Oled kindel, et soovid kõiki (%1$d) kaarte uuendada\?</string>
|
||||||
<string name="release_3_5">• Uuendatud rakenduse ja profiili seaded: seaded on nüüd järjestatud tüübi järgi. Igat profiili saab kohandada eraldi.
|
<string name="release_3_5">• Uuendatud rakenduse ja profiili seadeid, mis on nüüd järjestatud tüübi järgi. Igat profiili saab kohandada eraldi.
|
||||||
\n
|
\n
|
||||||
\n • Uus kaartide alla laadimise dialoog, mis soovitab sirvimise ajal kaarte alla laadimiseks
|
\n • Uus kaartide allalaadimise dialoog, mis soovitab sirvimise ajal kaarte allalaadimiseks
|
||||||
\n
|
\n
|
||||||
\n • Öise teema parandused
|
\n • Öise teema parandused
|
||||||
\n
|
\n
|
||||||
|
@ -1001,15 +1002,15 @@
|
||||||
<string name="quick_action_hillshade_show">Kuva künkavarjutus</string>
|
<string name="quick_action_hillshade_show">Kuva künkavarjutus</string>
|
||||||
<string name="quick_action_hillshade_hide">Peida künkavarjutus</string>
|
<string name="quick_action_hillshade_hide">Peida künkavarjutus</string>
|
||||||
<string name="quick_action_show_hide_hillshade">Kuva/peida künkavarjutus</string>
|
<string name="quick_action_show_hide_hillshade">Kuva/peida künkavarjutus</string>
|
||||||
<string name="tts_initialization_error">Kõnesünteesi mootorit ei saa käivitada</string>
|
<string name="tts_initialization_error">Kõnesünteesi mootorit ei saa käivitada.</string>
|
||||||
<string name="export_profile">Ekspordi profiil</string>
|
<string name="export_profile">Ekspordi profiil</string>
|
||||||
<string name="exported_osmand_profile">OsmAnd profiil: %1$s</string>
|
<string name="exported_osmand_profile">OsmAnd profiil: %1$s</string>
|
||||||
<string name="overwrite_profile_q">Profiil \'%1$s\' on juba olemas. Kirjutada üle\?</string>
|
<string name="overwrite_profile_q">„%1$s“ on juba olemas. Kas kirjutame üle\?</string>
|
||||||
<string name="export_profile_failed">Profiili ei saanud eksportida.</string>
|
<string name="export_profile_failed">Profiili ei saanud eksportida.</string>
|
||||||
<string name="profile_import">Profiili import</string>
|
<string name="profile_import">Impordi profiil</string>
|
||||||
<string name="profile_import_descr">Profiili importimiseks vali selle fail seadmes ja ava see OsmAndiga.</string>
|
<string name="profile_import_descr">Profiili importimiseks ava profiilifail OsmAndiga.</string>
|
||||||
<string name="file_import_error">%1$s importimise viga: %2$s</string>
|
<string name="file_import_error">%1$s importimise viga: %2$s</string>
|
||||||
<string name="file_imported_successfully">%1$s edukalt imporditud.</string>
|
<string name="file_imported_successfully">%1$s on imporditud.</string>
|
||||||
<string name="rendering_value_white_name">Valge</string>
|
<string name="rendering_value_white_name">Valge</string>
|
||||||
<string name="swap_two_places">Vaheta %1$s ja %2$s</string>
|
<string name="swap_two_places">Vaheta %1$s ja %2$s</string>
|
||||||
<string name="route_start_point">Lähtepunkt</string>
|
<string name="route_start_point">Lähtepunkt</string>
|
||||||
|
@ -1023,9 +1024,9 @@
|
||||||
<string name="dialogs_and_notifications_descr">Halda OsmAnd kasutamise ajal kuvatavaid hüpikaknaid, dialooge ja teateid.</string>
|
<string name="dialogs_and_notifications_descr">Halda OsmAnd kasutamise ajal kuvatavaid hüpikaknaid, dialooge ja teateid.</string>
|
||||||
<string name="rendering_value_walkingRoutesOSMCNodes_name">Sõlmede võrgud</string>
|
<string name="rendering_value_walkingRoutesOSMCNodes_name">Sõlmede võrgud</string>
|
||||||
<string name="suggested_maps">Soovitatud kaardid</string>
|
<string name="suggested_maps">Soovitatud kaardid</string>
|
||||||
<string name="suggested_maps_descr">Need kaardid on laienduse kasutamisel nõutud</string>
|
<string name="suggested_maps_descr">Need kaardid on laienduse kasutamisel nõutud.</string>
|
||||||
<string name="added_profiles">Lisatud profiilid</string>
|
<string name="added_profiles">Lisatud profiilid</string>
|
||||||
<string name="added_profiles_descr">Laiendus lisab uue OsmAnd profiili</string>
|
<string name="added_profiles_descr">Laienduse poolt lisatud OsmAnd profiilid</string>
|
||||||
<string name="shared_string_turn_off">Lülita välja</string>
|
<string name="shared_string_turn_off">Lülita välja</string>
|
||||||
<string name="new_plugin_added">Uus laiendus lisatud</string>
|
<string name="new_plugin_added">Uus laiendus lisatud</string>
|
||||||
<string name="join_segments">Liida lõigud</string>
|
<string name="join_segments">Liida lõigud</string>
|
||||||
|
@ -1038,9 +1039,9 @@
|
||||||
<string name="shared_string_downloading_formatted">Allalaadimine %s</string>
|
<string name="shared_string_downloading_formatted">Allalaadimine %s</string>
|
||||||
<string name="rendering_value_thick_name">Jäme</string>
|
<string name="rendering_value_thick_name">Jäme</string>
|
||||||
<string name="desert_render_descr">Kõrbete ja muude hõredalt asustatud piirkondade jaoks. Kuvab üksikasjad vaateskaalal.</string>
|
<string name="desert_render_descr">Kõrbete ja muude hõredalt asustatud piirkondade jaoks. Kuvab üksikasjad vaateskaalal.</string>
|
||||||
<string name="select_navigation_icon">Vali navigeerimise ikoon</string>
|
<string name="select_navigation_icon">Liikumisel kuvatav asukohaikoon</string>
|
||||||
<string name="select_map_icon">Vali kaardi ikoon</string>
|
<string name="select_map_icon">Peatumisel kuvatav asukohaikoon</string>
|
||||||
<string name="delete_profiles_descr">Peale nupu Rakenda vajutamist on kustutatud profiilid jäädavalt kadunud.</string>
|
<string name="delete_profiles_descr">Rakenda-nupu vajutamisel on eemaldatakse kustutatud profiilid jäädavalt.</string>
|
||||||
<string name="master_profile">Ülemprofiil</string>
|
<string name="master_profile">Ülemprofiil</string>
|
||||||
<string name="select_color">Vali värv</string>
|
<string name="select_color">Vali värv</string>
|
||||||
<string name="edit_profiles_descr">OsmAnd vaikimisi profiile ei saa kustutada, aga saate need eelmisel ekraanil keelata või lõppu nihutada.</string>
|
<string name="edit_profiles_descr">OsmAnd vaikimisi profiile ei saa kustutada, aga saate need eelmisel ekraanil keelata või lõppu nihutada.</string>
|
||||||
|
@ -1216,13 +1217,13 @@
|
||||||
<string name="plugin_ski_name">Suusakaardi vaade</string>
|
<string name="plugin_ski_name">Suusakaardi vaade</string>
|
||||||
<string name="osmand_parking_plugin_name">Parkimiskoht</string>
|
<string name="osmand_parking_plugin_name">Parkimiskoht</string>
|
||||||
<string name="osmand_distance_planning_plugin_name">Kauguse kalkulaator & planeerimistöövahend</string>
|
<string name="osmand_distance_planning_plugin_name">Kauguse kalkulaator & planeerimistöövahend</string>
|
||||||
<string name="osm_settings">OpenStreetMap muutmine</string>
|
<string name="osm_settings">OpenStreetMap\'i muutmine</string>
|
||||||
<string name="rename_failed">Ümber nimetamine ebaõnnestus.</string>
|
<string name="rename_failed">Ümber nimetamine ebaõnnestus.</string>
|
||||||
<string name="days_behind">päeva maas</string>
|
<string name="days_behind">päeva maas</string>
|
||||||
<string name="watch">Vaata</string>
|
<string name="watch">Vaata</string>
|
||||||
<string name="rendering_attr_pisteGrooming_name">Nõlva hooldus</string>
|
<string name="rendering_attr_pisteGrooming_name">Nõlva hooldus</string>
|
||||||
<string name="world_ski_missing">Suusakaartide kuvamiseks on vajalik laadida alla spetsiaalne võrguühenduseta kaart</string>
|
<string name="world_ski_missing">Suusakaartide kuvamiseks on vajalik laadida alla spetsiaalne võrguühenduseta kaart.</string>
|
||||||
<string name="nautical_maps_missing">Merekaartide kuvamiseks on vajalik laadida alla spetsiaalne võrguühenduseta kaart</string>
|
<string name="nautical_maps_missing">Merekaartide kuvamiseks on vajalik laadida alla spetsiaalne võrguühenduseta kaart.</string>
|
||||||
<string name="remove_the_tag">EEMALDA SILT</string>
|
<string name="remove_the_tag">EEMALDA SILT</string>
|
||||||
<string name="version_settings_descr">Lae alla öösiti avaldatud versioone.</string>
|
<string name="version_settings_descr">Lae alla öösiti avaldatud versioone.</string>
|
||||||
<string name="version_settings">Avaldatud versioonid</string>
|
<string name="version_settings">Avaldatud versioonid</string>
|
||||||
|
@ -1957,7 +1958,8 @@
|
||||||
<string name="user_password">Sinu OSM salasõna</string>
|
<string name="user_password">Sinu OSM salasõna</string>
|
||||||
<string name="osmand_service">Taustarežiim</string>
|
<string name="osmand_service">Taustarežiim</string>
|
||||||
<string name="osmand_service_descr">OsmAnd töötab taustal, ekraan välja lülitatud.</string>
|
<string name="osmand_service_descr">OsmAnd töötab taustal, ekraan välja lülitatud.</string>
|
||||||
<string name="download_files_question_space">Lae alla {0} fail(i)\? {1} MB (kokku {2} MB-st) võetakse kasutusse.</string>
|
<string name="download_files_question_space">Kas laeme alla {0} fail(i)\?
|
||||||
|
\n{1} MB (kokku {2} MB-st) võetakse kasutusse.</string>
|
||||||
<string name="use_transparent_map_theme">Läbipaistev teema</string>
|
<string name="use_transparent_map_theme">Läbipaistev teema</string>
|
||||||
<string name="choose_auto_follow_route">Kaardivaade automaatselt keskele</string>
|
<string name="choose_auto_follow_route">Kaardivaade automaatselt keskele</string>
|
||||||
<string name="choose_auto_follow_route_descr">Aeg kuni kaardivaade sünkroniseerub praeguse asukohaga.</string>
|
<string name="choose_auto_follow_route_descr">Aeg kuni kaardivaade sünkroniseerub praeguse asukohaga.</string>
|
||||||
|
@ -2182,7 +2184,7 @@
|
||||||
<string name="use_online_routing">Kasuta veebipõhist navigeerimist</string>
|
<string name="use_online_routing">Kasuta veebipõhist navigeerimist</string>
|
||||||
<string name="update_tile">Uuenda kaart</string>
|
<string name="update_tile">Uuenda kaart</string>
|
||||||
<string name="choose_building">Vali hoone</string>
|
<string name="choose_building">Vali hoone</string>
|
||||||
<string name="map_tile_source_descr">Vali veebipõhiste või puhverdatud kaardipaanide allikas</string>
|
<string name="map_tile_source_descr">Vali veebipõhiste või puhverdatud kaardipaanide allikas.</string>
|
||||||
<string name="incremental_search_building">Otsi hoonet kasvavalt</string>
|
<string name="incremental_search_building">Otsi hoonet kasvavalt</string>
|
||||||
<string name="search_address_building">Hoone</string>
|
<string name="search_address_building">Hoone</string>
|
||||||
<string name="search_address_building_option">Hoone</string>
|
<string name="search_address_building_option">Hoone</string>
|
||||||
|
@ -2350,8 +2352,11 @@
|
||||||
<string name="map_marker_2nd">Teine kaardimarker</string>
|
<string name="map_marker_2nd">Teine kaardimarker</string>
|
||||||
<string name="shared_string_toolbar">Tööriistariba</string>
|
<string name="shared_string_toolbar">Tööriistariba</string>
|
||||||
<string name="shared_string_widgets">Vidinad</string>
|
<string name="shared_string_widgets">Vidinad</string>
|
||||||
<string name="download_files_error_not_enough_space">Pole piisavalt ruumi! {3} MB on vajalik ajutiselt, {1} MB püsivalt. (Ainult {2} MB saadaval.)</string>
|
<string name="download_files_error_not_enough_space">Pole piisavalt ruumi!
|
||||||
<string name="download_files_question_space_with_temp">Laadida alla {0} fail(i)\? {3} MB kasutatakse ajutiselt, {1} MB püsivalt. (Kokku {2} MB-st.)</string>
|
\n{3} MB on vajalik ajutiselt ning {1} MB püsivalt.
|
||||||
|
\n(Ainult {2} MB saadaval.)</string>
|
||||||
|
<string name="download_files_question_space_with_temp">Kas laeme alla {0} fail(i)\?
|
||||||
|
\n{3} MB kasutatakse ajutiselt, {1} MB püsivalt. (Kokku {2} MB-st.)</string>
|
||||||
<string name="upload_osm_note">Lae üles OSM märge</string>
|
<string name="upload_osm_note">Lae üles OSM märge</string>
|
||||||
<string name="upload_anonymously">Lae üles anonüümselt</string>
|
<string name="upload_anonymously">Lae üles anonüümselt</string>
|
||||||
<string name="select_map_marker">Vali kaardimarker</string>
|
<string name="select_map_marker">Vali kaardimarker</string>
|
||||||
|
@ -2378,7 +2383,9 @@
|
||||||
<string name="osm_live_region_desc">Osa sinu annetusest saadetakse OSM kasutajatele, kes teevad kaardimuudatusi selles piirkonnas.</string>
|
<string name="osm_live_region_desc">Osa sinu annetusest saadetakse OSM kasutajatele, kes teevad kaardimuudatusi selles piirkonnas.</string>
|
||||||
<string name="osm_live_subscription_settings">Tellimuse seaded</string>
|
<string name="osm_live_subscription_settings">Tellimuse seaded</string>
|
||||||
<string name="osm_live_ask_for_purchase">Palun osta esmalt OsmAnd Live tellimus</string>
|
<string name="osm_live_ask_for_purchase">Palun osta esmalt OsmAnd Live tellimus</string>
|
||||||
<string name="osm_live_header">See liitumine võimaldab kogu maailma kaartide värskendusi iga tund. Osa sissetulekust läheb tagasi OSM kogukonnale ja makstakse välja iga OSM kaastöö eest. Kui sulle meeldib OsmAnd ja OSM ning soovite neid toetada ja olla nende poolt toetatud, ongi see suurepärane viis nii teha.</string>
|
<string name="osm_live_header">See liitumine võimaldab kogu maailma kaartide värskendusi kord tunnis.
|
||||||
|
\nOsa sissetulekust läheb tagasi OSM kogukonnale ja makstakse välja iga OSM kaastöö eest.
|
||||||
|
\nKui sulle meeldib OsmAnd ja OSM ning soovite neid toetada ja olla nende poolt toetatud, ongi see suurepärane viis nii teha.</string>
|
||||||
<string name="shared_string_topbar">Ülemine riba</string>
|
<string name="shared_string_topbar">Ülemine riba</string>
|
||||||
<string name="storage_directory_readonly_desc">Lülitatud ümber sisemälule, sest valitud andmekandjal puudub kirjutusõigus. Palun vali kirjutusõigusega salvestuskaust.</string>
|
<string name="storage_directory_readonly_desc">Lülitatud ümber sisemälule, sest valitud andmekandjal puudub kirjutusõigus. Palun vali kirjutusõigusega salvestuskaust.</string>
|
||||||
<string name="storage_directory_shared">Jagatud mälu</string>
|
<string name="storage_directory_shared">Jagatud mälu</string>
|
||||||
|
@ -2584,7 +2591,7 @@
|
||||||
<string name="animate_my_location_desc">Lülita sisse animeeritud oma asukohas kaardi panoraamimine navigeerimise ajal.</string>
|
<string name="animate_my_location_desc">Lülita sisse animeeritud oma asukohas kaardi panoraamimine navigeerimise ajal.</string>
|
||||||
<string name="srtm_menu_download_descr">Lae alla \'Kõrgusjoonte\' kaart selles piirkonnas kasutamiseks.</string>
|
<string name="srtm_menu_download_descr">Lae alla \'Kõrgusjoonte\' kaart selles piirkonnas kasutamiseks.</string>
|
||||||
<string name="srtm_purchase_header">Osta ja paigalda \'Kõrgusjoonte\' lisa astmestatud vertikaalsete alade kuvamiseks.</string>
|
<string name="srtm_purchase_header">Osta ja paigalda \'Kõrgusjoonte\' lisa astmestatud vertikaalsete alade kuvamiseks.</string>
|
||||||
<string name="quick_action_showhide_osmbugs_descr">Lülita OSM märkmete kaardil kuvamine sisse või välja.</string>
|
<string name="quick_action_showhide_osmbugs_descr">Nupp, mis lülitab OSM märkmete kaardil kuvamise sisse või välja.</string>
|
||||||
<string name="private_access_routing_req">Sinu sihtkoht asub eramaal. Luba kasutada erateid sellel teekonnal\?</string>
|
<string name="private_access_routing_req">Sinu sihtkoht asub eramaal. Luba kasutada erateid sellel teekonnal\?</string>
|
||||||
<string name="mapillary_widget_descr">Võimaldab kiireid Mapillary kaastöid.</string>
|
<string name="mapillary_widget_descr">Võimaldab kiireid Mapillary kaastöid.</string>
|
||||||
<string name="mapillary_descr">Veebis tänavataseme fotod kõigile. Avasta kohti, tee kaastööd, jäädvusta maailma.</string>
|
<string name="mapillary_descr">Veebis tänavataseme fotod kõigile. Avasta kohti, tee kaastööd, jäädvusta maailma.</string>
|
||||||
|
@ -2622,13 +2629,13 @@
|
||||||
<string name="empty_state_markers_active_desc">Pikk või lühike \'Kohad\' vajutus, seejärel vajuta markeri lipu nuppu.</string>
|
<string name="empty_state_markers_active_desc">Pikk või lühike \'Kohad\' vajutus, seejärel vajuta markeri lipu nuppu.</string>
|
||||||
<string name="empty_state_markers_groups_desc">Impordi lemmikute grupid või teekonnapunktid markeritena.</string>
|
<string name="empty_state_markers_groups_desc">Impordi lemmikute grupid või teekonnapunktid markeritena.</string>
|
||||||
<string name="empty_state_markers_history_desc">Läbituks märgitud markerid ilmuvad siia ekraanile.</string>
|
<string name="empty_state_markers_history_desc">Läbituks märgitud markerid ilmuvad siia ekraanile.</string>
|
||||||
<string name="empty_state_osm_edits_descr">Loo või muuda huvipunkte, ava või kommenteeri OSM märkmeid ja panusta GPX failide osas.</string>
|
<string name="empty_state_osm_edits_descr">Loo või muuda huvipunkte, ava või kommenteeri OSM märkmeid ja lisa salvestatud GPX faile.</string>
|
||||||
<string name="one_tap_active_descr">Puuduta markerit kaardil selle liigutamiseks aktiivsete markerite algusesse ilma kontekstimenüüd avamata.</string>
|
<string name="one_tap_active_descr">Puuduta markerit kaardil selle liigutamiseks aktiivsete markerite algusesse ilma kontekstimenüüd avamata.</string>
|
||||||
<string name="empty_state_av_notes_desc">Lisa heli, video või fotomärge igale punktile kaardil, kasutades vidinat või kontekstimenüüd.</string>
|
<string name="empty_state_av_notes_desc">Lisa heli, video või fotomärge igale punktile kaardil, kasutades vidinat või kontekstimenüüd.</string>
|
||||||
<string name="osm_recipient_stat">Muudatusi %1$s, kokku %2$s mBTC</string>
|
<string name="osm_recipient_stat">Muudatusi %1$s, kokku %2$s mBTC</string>
|
||||||
<string name="lang_lo">Lao</string>
|
<string name="lang_lo">Lao</string>
|
||||||
<string name="gpx_file_desc">GPX - sobib ekspordiks JOSM või teistesse OSM redaktoritesse.</string>
|
<string name="gpx_file_desc">GPX - sobib ekspordiks JOSM või teistesse OSM redaktoritesse.</string>
|
||||||
<string name="osm_edits_export_desc">Vali ekspordi liik: OSM märkmed, huvipunktid või mõlemad.</string>
|
<string name="osm_edits_export_desc">Ekspordi kas OSM märkmetena, huvipunktidena või mõlemana.</string>
|
||||||
<string name="purchase_dialog_travel_description">Võrguühenduseta reisijuhi funktsioonide saamiseks osta üks järgmistest:</string>
|
<string name="purchase_dialog_travel_description">Võrguühenduseta reisijuhi funktsioonide saamiseks osta üks järgmistest:</string>
|
||||||
<string name="welcome_to_open_beta_description">Reisijuhid põhinevad praegu Wikivoyage\'il. Testige beetaversiooni ajal kõiki funktsioone tasuta. Pärast seda on reisijuhid kättesaadavad piiranguteta OsmAnd tellijatele ja OsmAnd+ omanikele.</string>
|
<string name="welcome_to_open_beta_description">Reisijuhid põhinevad praegu Wikivoyage\'il. Testige beetaversiooni ajal kõiki funktsioone tasuta. Pärast seda on reisijuhid kättesaadavad piiranguteta OsmAnd tellijatele ja OsmAnd+ omanikele.</string>
|
||||||
<string name="start_editing_card_description">Saate ja peaksite redigeerima kõiki artikleid Wikivoyage\'is. Jagage teadmisi, kogemusi, annet ja oma tähelepanu.</string>
|
<string name="start_editing_card_description">Saate ja peaksite redigeerima kõiki artikleid Wikivoyage\'is. Jagage teadmisi, kogemusi, annet ja oma tähelepanu.</string>
|
||||||
|
@ -2693,7 +2700,7 @@
|
||||||
\nGlobaalsed andmed (vahemikus 70 ° põhja ja 70 ° lõuna) põhinevad mõõtmistel, mille on teinud SRTM (süstiku radari topograafiamissioon) ja ASTER (täiustatud kosmose termilise kiirguse ja peegelduse radiomeeter), NASA maavaatlussatelliitide süsteemi lipulaeva Terra pardal olev pildistamisinstrument. ASTER on NASA, Jaapani majandus-, kaubandus- ja tööstusministeeriumi (METI) ja Jaapani kosmosesüsteemide (J-kosmosesüsteemid) koostöö.</string>
|
\nGlobaalsed andmed (vahemikus 70 ° põhja ja 70 ° lõuna) põhinevad mõõtmistel, mille on teinud SRTM (süstiku radari topograafiamissioon) ja ASTER (täiustatud kosmose termilise kiirguse ja peegelduse radiomeeter), NASA maavaatlussatelliitide süsteemi lipulaeva Terra pardal olev pildistamisinstrument. ASTER on NASA, Jaapani majandus-, kaubandus- ja tööstusministeeriumi (METI) ja Jaapani kosmosesüsteemide (J-kosmosesüsteemid) koostöö.</string>
|
||||||
<string name="plugin_touringview_descr">Selle vaate aktiveerimine muudab OsmAndi kaardistiili \'Reisivaateks\'. See on reisijatele ja kutselistele autojuhtidele mõeldud eriline kõrglahutusega vaade.
|
<string name="plugin_touringview_descr">Selle vaate aktiveerimine muudab OsmAndi kaardistiili \'Reisivaateks\'. See on reisijatele ja kutselistele autojuhtidele mõeldud eriline kõrglahutusega vaade.
|
||||||
\n
|
\n
|
||||||
\nSee vaade pakub igal kaardi suurendamisel maksimaalse hulga kaardiandmetes saada olevaid reisiandmeid (eriti teed, rajad, rajad ja orientatsioonimärgid).
|
\nSee vaade pakub igal kaardi suurendamisel maksimaalse hulga kaardiandmetes saada olevaid reisiandmeid (eriti teed, rajad ja orientatsioonimärgid).
|
||||||
\n
|
\n
|
||||||
\nSamuti kujutab see värvikoodide abil üheselt mõistetavalt igat tüüpi teid, mis on kasulik nt. suurte sõidukite juhtimisel.
|
\nSamuti kujutab see värvikoodide abil üheselt mõistetavalt igat tüüpi teid, mis on kasulik nt. suurte sõidukite juhtimisel.
|
||||||
\n
|
\n
|
||||||
|
@ -2743,8 +2750,8 @@
|
||||||
<string name="download_using_mobile_internet">WiFi ühendus puudub. Kas kasutada allalaadimiseks praegust internetiühendust\?</string>
|
<string name="download_using_mobile_internet">WiFi ühendus puudub. Kas kasutada allalaadimiseks praegust internetiühendust\?</string>
|
||||||
<string name="osmand_background_plugin_description">Kuvab taustajälgimise ja navigeerimise sisselülitamise sätteid GPS-seadet perioodiliselt äratades (välja lülitatud ekraaniga).</string>
|
<string name="osmand_background_plugin_description">Kuvab taustajälgimise ja navigeerimise sisselülitamise sätteid GPS-seadet perioodiliselt äratades (välja lülitatud ekraaniga).</string>
|
||||||
<string name="clear_dest_confirm">Oled kindel, et soovid sihtkoha (ja vahepealsed sihtkohad) tühjendada\?</string>
|
<string name="clear_dest_confirm">Oled kindel, et soovid sihtkoha (ja vahepealsed sihtkohad) tühjendada\?</string>
|
||||||
<string name="dropbox_plugin_description">Dropboxi lisa võimaldab sul sünkroonida lugusid ja heli- või videomärkmeid oma Dropboxi kontoga.</string>
|
<string name="dropbox_plugin_description">Sünkrooni salvestatud radasid ja heli- või videomärkmeid oma Dropboxi kontole.</string>
|
||||||
<string name="srtm_paid_version_msg">Edasise arengu toetamiseks palun kaalu \'Kõrgusjooned\' lisa ostmist.</string>
|
<string name="srtm_paid_version_msg">Edasise arendustöö toetamiseks palun kaalu Kõrgusjoonte lisa ostmist.</string>
|
||||||
<string name="recording_playing">Esitatakse määratud salvestuse heli.
|
<string name="recording_playing">Esitatakse määratud salvestuse heli.
|
||||||
\n%1$s</string>
|
\n%1$s</string>
|
||||||
<string name="audionotes_location_not_defined">Puuduta \'Kasuta asukohta…\' asukohta märkuse lisamiseks.</string>
|
<string name="audionotes_location_not_defined">Puuduta \'Kasuta asukohta…\' asukohta märkuse lisamiseks.</string>
|
||||||
|
@ -2757,7 +2764,8 @@
|
||||||
<string name="auto_zoom_map_descr">Kiirusele vastav suurendustase (kuni kaart on hetkeasukohaga sünkroonitud).</string>
|
<string name="auto_zoom_map_descr">Kiirusele vastav suurendustase (kuni kaart on hetkeasukohaga sünkroonitud).</string>
|
||||||
<string name="osmand_short_description_80_chars">Globaalne mobiilikaartide vaatamine ja navigeerimine OSM võrguühenduseta ja veebikaartide jaoks</string>
|
<string name="osmand_short_description_80_chars">Globaalne mobiilikaartide vaatamine ja navigeerimine OSM võrguühenduseta ja veebikaartide jaoks</string>
|
||||||
<string name="osmand_plus_short_description_80_chars">Globaalne mobiilikaardi vaatamine ja navigeerimine võrguühenduseta ja veebipõhistes OSM-kaartides</string>
|
<string name="osmand_plus_short_description_80_chars">Globaalne mobiilikaardi vaatamine ja navigeerimine võrguühenduseta ja veebipõhistes OSM-kaartides</string>
|
||||||
<string name="native_app_allocated_memory_descr">Kogu rakendusele eraldatud mälumaht %1$s MB (Dalvik %2$s MB, muu %3$s MB). Proportsionaalne mälumaht %4$s MB (Androidi limiit %5$s MB, Dalvik %6$s MB).</string>
|
<string name="native_app_allocated_memory_descr">Kogu rakendusele eraldatud mälumaht on %1$s MB (Dalvik %2$s MB, muu %3$s MB).
|
||||||
|
\nProportsionaalne mälumaht on %4$s MB (Androidi mahupiir %5$s MB, Dalvik %6$s MB).</string>
|
||||||
<string name="osmand_parking_warning_text">Sinu kalendrisse on lisatud teavitus auto kättesaamise kohta ja seda saab seal muuta või eemaldada.</string>
|
<string name="osmand_parking_warning_text">Sinu kalendrisse on lisatud teavitus auto kättesaamise kohta ja seda saab seal muuta või eemaldada.</string>
|
||||||
<string name="rendering_attr_noPolygons_description">Muuda kõik kaardil olevad maapealsed objektid läbipaistvaks.</string>
|
<string name="rendering_attr_noPolygons_description">Muuda kõik kaardil olevad maapealsed objektid läbipaistvaks.</string>
|
||||||
<string name="rendering_attr_appMode_description">Optimeeri kaarti</string>
|
<string name="rendering_attr_appMode_description">Optimeeri kaarti</string>
|
||||||
|
@ -3346,8 +3354,8 @@
|
||||||
<string name="new_route_calculated_dist_dbg">Teekond: vahemaa %s, marsruuteri aeg %s
|
<string name="new_route_calculated_dist_dbg">Teekond: vahemaa %s, marsruuteri aeg %s
|
||||||
\nArvutamine: %.1f sek, %d teed, %d paani)</string>
|
\nArvutamine: %.1f sek, %d teed, %d paani)</string>
|
||||||
<string name="reset_confirmation_descr">Vajutades nupul %1$s kaovad kõik muudatused.</string>
|
<string name="reset_confirmation_descr">Vajutades nupul %1$s kaovad kõik muudatused.</string>
|
||||||
<string name="reset_all_profile_settings_descr">Kõik profiiliseaded lähtestatakse paigaldusjärgsesse olekusse.</string>
|
<string name="reset_all_profile_settings_descr">Lähtesta kõik profiiliseaded paigaldusjärgsesse olekusse.</string>
|
||||||
<string name="reset_all_profile_settings">Taasta kõikide profiiliseadete vaikeväärtused\?</string>
|
<string name="reset_all_profile_settings">Kas asendame kõik profiiliseaded vaikeväärtustega\?</string>
|
||||||
<string name="ltr_or_rtl_combine_via_colon">%1$s: %2$s</string>
|
<string name="ltr_or_rtl_combine_via_colon">%1$s: %2$s</string>
|
||||||
<string name="ltr_or_rtl_combine_via_space">%1$s %2$s</string>
|
<string name="ltr_or_rtl_combine_via_space">%1$s %2$s</string>
|
||||||
<string name="button_rate">Hinda</string>
|
<string name="button_rate">Hinda</string>
|
||||||
|
@ -3370,11 +3378,11 @@
|
||||||
<string name="route_recalculation">Teekonna ümberarvutamine</string>
|
<string name="route_recalculation">Teekonna ümberarvutamine</string>
|
||||||
<string name="accessibility_announce">Teata</string>
|
<string name="accessibility_announce">Teata</string>
|
||||||
<string name="login_and_pass">Kasutajanimi ja salasõna</string>
|
<string name="login_and_pass">Kasutajanimi ja salasõna</string>
|
||||||
<string name="plugin_global_prefs_info">Selle lisa seaded kehtivad kogu rakenduses ja rakenduvad kõikidele profiilidele.</string>
|
<string name="plugin_global_prefs_info">Need seaded rakenduvad kõikidele profiilidele.</string>
|
||||||
<string name="osm_editing">OpenStreetMap muutmine</string>
|
<string name="osm_editing">OSM\'i andmete muutmine</string>
|
||||||
<string name="osm_edits_view_descr">Kõiki üleslaadimata muudatusi või osm vigu saad vaadata menüüs %1$s. Üleslaaditud punkte OsmAnd ei kuva.</string>
|
<string name="osm_edits_view_descr">Kõiki üleslaadimata muudatusi või OSM vigu saad vaadata menüüs %1$s. Üleslaaditud punkte OsmAnd ei kuva.</string>
|
||||||
<string name="app_mode_osm">OSM</string>
|
<string name="app_mode_osm">OSM</string>
|
||||||
<string name="select_nav_icon_descr">Ikooni näed ainult navigeerimise või liikumise ajal.</string>
|
<string name="select_nav_icon_descr">Ikooni kuvatakse vaid navigeerimise või liikumise ajal.</string>
|
||||||
<string name="select_map_icon_descr">Kaardiikoon kuvatakse ainult kaardil ja muutub navigeerimise ajal navigeerimise ikooniks.</string>
|
<string name="select_map_icon_descr">Kaardiikoon kuvatakse ainult kaardil ja muutub navigeerimise ajal navigeerimise ikooniks.</string>
|
||||||
<string name="logcat_buffer_descr">Kontrolli ja jaga rakenduse detailseid logisid</string>
|
<string name="logcat_buffer_descr">Kontrolli ja jaga rakenduse detailseid logisid</string>
|
||||||
<string name="search_offline_geo_error">Geokavatsuse väärtusest \'%s\' ei saanud aru.</string>
|
<string name="search_offline_geo_error">Geokavatsuse väärtusest \'%s\' ei saanud aru.</string>
|
||||||
|
@ -3384,7 +3392,7 @@
|
||||||
<string name="monitoring_min_speed_descr_recommendation">Soovitus: proovige kõigepealt kasutada liikumisandurit minimaalse nihkefiltri (B) kaudu, kuna see võib anda paremaid tulemusi ja te kaotate vähem andmeid. Kui teie rajad jäävad madalatel kiirustel lärmakaks, proovige siin nullist erinevat väärtust. Pange tähele, et mõned mõõtmised ei pruugi kiiruse väärtust üldse anda (mõned võrgupõhised meetodid), sellisel juhul ei salvestaks te midagi.</string>
|
<string name="monitoring_min_speed_descr_recommendation">Soovitus: proovige kõigepealt kasutada liikumisandurit minimaalse nihkefiltri (B) kaudu, kuna see võib anda paremaid tulemusi ja te kaotate vähem andmeid. Kui teie rajad jäävad madalatel kiirustel lärmakaks, proovige siin nullist erinevat väärtust. Pange tähele, et mõned mõõtmised ei pruugi kiiruse väärtust üldse anda (mõned võrgupõhised meetodid), sellisel juhul ei salvestaks te midagi.</string>
|
||||||
<string name="monitoring_min_speed_descr_remark">Märkus: kiirus > 0 kontroll: enamik GPS-kiibikomplekte teatab kiiruse väärtuse ainult siis, kui algoritm määrab teie liikumise, ja mitte ükski, kui te pole. Seega kasutab filtri sätte > 0 kasutamine teatud mõttes GPS-kiibistiku liikumistuvastust. Kuid isegi kui seda siin salvestuse ajal ei filtreerita, kasutame seda funktsiooni oma GPX analüüsis korrigeeritud vahemaa määramiseks, st sellel väljal kuvatav väärtus on liikumisel salvestatud vahemaa.</string>
|
<string name="monitoring_min_speed_descr_remark">Märkus: kiirus > 0 kontroll: enamik GPS-kiibikomplekte teatab kiiruse väärtuse ainult siis, kui algoritm määrab teie liikumise, ja mitte ükski, kui te pole. Seega kasutab filtri sätte > 0 kasutamine teatud mõttes GPS-kiibistiku liikumistuvastust. Kuid isegi kui seda siin salvestuse ajal ei filtreerita, kasutame seda funktsiooni oma GPX analüüsis korrigeeritud vahemaa määramiseks, st sellel väljal kuvatav väärtus on liikumisel salvestatud vahemaa.</string>
|
||||||
<string name="monitoring_min_accuracy_descr">See registreerib ainult minimaalse täpsusnäiduga mõõdetud punktid (meetrites / jalgades, nagu Androidi teatas teie kiibistiku kohta). Täpsus tähendab korduvate mõõtmiste hajumist ega ole otseselt seotud täpsusega, mis määratleb, kui lähedal on teie mõõtmised teie tegelikule asukohale.</string>
|
<string name="monitoring_min_accuracy_descr">See registreerib ainult minimaalse täpsusnäiduga mõõdetud punktid (meetrites / jalgades, nagu Androidi teatas teie kiibistiku kohta). Täpsus tähendab korduvate mõõtmiste hajumist ega ole otseselt seotud täpsusega, mis määratleb, kui lähedal on teie mõõtmised teie tegelikule asukohale.</string>
|
||||||
<string name="monitoring_min_accuracy_descr_side_effect">Kõrvaltoime: täpsusega filtreerimise tulemusel võivad punktid olla nt nt. sildade all, puude all, kõrgete hoonete vahel või teatud ilmastikutingimuste korral.</string>
|
<string name="monitoring_min_accuracy_descr_side_effect">Kõrvaltoime: täpsusega filtreerimise tulemusel võivad punktid olla näiteks sildade all, puude all, kõrgete hoonete vahel või teatud ilmastikutingimuste korral.</string>
|
||||||
<string name="monitoring_min_accuracy_descr_recommendation">Soovitus: raske on ennustada, mida salvestatakse ja mida mitte, võib-olla oleks parem see filter välja lülitada.</string>
|
<string name="monitoring_min_accuracy_descr_recommendation">Soovitus: raske on ennustada, mida salvestatakse ja mida mitte, võib-olla oleks parem see filter välja lülitada.</string>
|
||||||
<string name="monitoring_min_accuracy_descr_remark">Märkus: kui GPS oleks välja lülitatud vahetult enne salvestust, võib esimese mõõdetud punkti täpsus olla vähenenud, nii et meie koodis võiksime enne punkti salvestamist oodata umbes sekund (või salvestada 3 järjestikuse punkti parimad andmed jne.), kuid seda pole veel rakendatud.</string>
|
<string name="monitoring_min_accuracy_descr_remark">Märkus: kui GPS oleks välja lülitatud vahetult enne salvestust, võib esimese mõõdetud punkti täpsus olla vähenenud, nii et meie koodis võiksime enne punkti salvestamist oodata umbes sekund (või salvestada 3 järjestikuse punkti parimad andmed jne.), kuid seda pole veel rakendatud.</string>
|
||||||
<string name="monitoring_min_distance_descr">See filter väldib dubleerivate punktide registreerimist seal, kus tegelikku liikumist võis olla liiga vähe, muudab radade hilisema ruumilise väljanägemise, mida hiljem ei töödelda.</string>
|
<string name="monitoring_min_distance_descr">See filter väldib dubleerivate punktide registreerimist seal, kus tegelikku liikumist võis olla liiga vähe, muudab radade hilisema ruumilise väljanägemise, mida hiljem ei töödelda.</string>
|
||||||
|
@ -3404,7 +3412,7 @@
|
||||||
<string name="multimedia_photo_play_sound">Kaamera katiku heli</string>
|
<string name="multimedia_photo_play_sound">Kaamera katiku heli</string>
|
||||||
<string name="osm_authorization_success">Autoriseerimine õnnestus</string>
|
<string name="osm_authorization_success">Autoriseerimine õnnestus</string>
|
||||||
<string name="open_settings">Ava seaded</string>
|
<string name="open_settings">Ava seaded</string>
|
||||||
<string name="no_recalculation_setting">Keela ümberarvutus</string>
|
<string name="no_recalculation_setting">Ära kasuta ümberarvutust</string>
|
||||||
<string name="please_provide_profile_name_message">Määra profiili nimi</string>
|
<string name="please_provide_profile_name_message">Määra profiili nimi</string>
|
||||||
<string name="select_data_to_import">Vali imporditavad andmed.</string>
|
<string name="select_data_to_import">Vali imporditavad andmed.</string>
|
||||||
<string name="import_duplicates_title">Mõned kirjed on juba olemas</string>
|
<string name="import_duplicates_title">Mõned kirjed on juba olemas</string>
|
||||||
|
@ -3430,7 +3438,7 @@
|
||||||
<string name="profile_type_custom_string">Kohandatud profiil</string>
|
<string name="profile_type_custom_string">Kohandatud profiil</string>
|
||||||
<string name="shared_string_terrain">Maastik</string>
|
<string name="shared_string_terrain">Maastik</string>
|
||||||
<string name="hillshade_description">Kõrgusreljeefi kaart tumedate varjunditega nõlvade, tippude ja tasandike kirjeldamiseks.</string>
|
<string name="hillshade_description">Kõrgusreljeefi kaart tumedate varjunditega nõlvade, tippude ja tasandike kirjeldamiseks.</string>
|
||||||
<string name="slope_description">Nõlv märgib maastikku värvidega.</string>
|
<string name="slope_description">Raja nõlva kallet visualiseeritakse värvidega.</string>
|
||||||
<string name="terrain_slider_description">Määra vähima ja suurima suurenduse kaardikihi kuvamisel.</string>
|
<string name="terrain_slider_description">Määra vähima ja suurima suurenduse kaardikihi kuvamisel.</string>
|
||||||
<string name="hillshade_download_description">Kõrgusreljeefi kuvamiseks on vaja täiendavaid kaarte.</string>
|
<string name="hillshade_download_description">Kõrgusreljeefi kuvamiseks on vaja täiendavaid kaarte.</string>
|
||||||
<string name="slope_download_description">Nõlvade kuvamiseks on vaja täiendavaid kaarte.</string>
|
<string name="slope_download_description">Nõlvade kuvamiseks on vaja täiendavaid kaarte.</string>
|
||||||
|
@ -3438,12 +3446,12 @@
|
||||||
<string name="shared_string_transparency">Läbipaistvus</string>
|
<string name="shared_string_transparency">Läbipaistvus</string>
|
||||||
<string name="shared_string_zoom_levels">Suurendus</string>
|
<string name="shared_string_zoom_levels">Suurendus</string>
|
||||||
<string name="shared_string_legend">Tingmärgid</string>
|
<string name="shared_string_legend">Tingmärgid</string>
|
||||||
<string name="terrain_empty_state_text">Luba kõrgusreljeefi või nõlvakaardi kuvamiseks. Nendest kaarditüüpidest saab rohkem lugeda meie kodulehel</string>
|
<string name="terrain_empty_state_text">Luba kõrgusreljeefi või nõlvakaardi kuvamiseks. Neist kaarditüüpidest saad rohkem lugeda meie veebisaidis.</string>
|
||||||
<string name="shared_string_hillshade">Kõrgusreljeef</string>
|
<string name="shared_string_hillshade">Kõrgusreljeef</string>
|
||||||
<string name="import_complete_description">Kõik andmed %1$s-st imporditud, rakenduse vajaliku osaga töötamiseks võib kasutada nuppe allpool.</string>
|
<string name="import_complete_description">Kõik andmed %1$s-st on imporditud, rakenduse vajaliku osaga töötamiseks võid kasutada nuppe allpool.</string>
|
||||||
<string name="shared_string_import_complete">Imporditud</string>
|
<string name="shared_string_import_complete">Imporditud</string>
|
||||||
<string name="items_added">Kirjed lisatud</string>
|
<string name="items_added">Kirjed lisatud</string>
|
||||||
<string name="checking_for_duplicate_description">OsmAnd kontrollib %1$s rakenduses korduvate kirjete osas.
|
<string name="checking_for_duplicate_description">OsmAnd kontrollib %1$s rakenduses korduvaid kirjeid.
|
||||||
\n
|
\n
|
||||||
\nSelleks võib kuluda aega.</string>
|
\nSelleks võib kuluda aega.</string>
|
||||||
<string name="shared_string_importing">Importimine</string>
|
<string name="shared_string_importing">Importimine</string>
|
||||||
|
@ -3458,7 +3466,7 @@
|
||||||
<string name="recalculate_route_distance_promo">Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest.</string>
|
<string name="recalculate_route_distance_promo">Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest.</string>
|
||||||
<string name="n_items_of_z">%1$s %2$s-st</string>
|
<string name="n_items_of_z">%1$s %2$s-st</string>
|
||||||
<string name="download_slope_maps">Nõlvad</string>
|
<string name="download_slope_maps">Nõlvad</string>
|
||||||
<string name="quick_action_show_hide_terrain">Kuva/peida maastik</string>
|
<string name="quick_action_show_hide_terrain">Kuva või peida maastik</string>
|
||||||
<string name="quick_action_terrain_hide">Peida maastik</string>
|
<string name="quick_action_terrain_hide">Peida maastik</string>
|
||||||
<string name="quick_action_terrain_show">Kuva maastik</string>
|
<string name="quick_action_terrain_show">Kuva maastik</string>
|
||||||
<string name="quick_action_terrain_descr">Nupp maastikukihi kuvamiseks või peitmiseks kaardil.</string>
|
<string name="quick_action_terrain_descr">Nupp maastikukihi kuvamiseks või peitmiseks kaardil.</string>
|
||||||
|
@ -3470,14 +3478,14 @@
|
||||||
<string name="shared_string_octagon">Kaheksanurk</string>
|
<string name="shared_string_octagon">Kaheksanurk</string>
|
||||||
<string name="shared_string_square">Ruut</string>
|
<string name="shared_string_square">Ruut</string>
|
||||||
<string name="shared_string_min">Min</string>
|
<string name="shared_string_min">Min</string>
|
||||||
<string name="replace_point_descr">Asenda sellega mõni teine punkt</string>
|
<string name="replace_point_descr">Asenda sellega mõni teine punkt.</string>
|
||||||
<string name="app_mode_ski_touring">Suusasõit</string>
|
<string name="app_mode_ski_touring">Suusasõit</string>
|
||||||
<string name="app_mode_ski_snowmobile">Mootorsaan</string>
|
<string name="app_mode_ski_snowmobile">Mootorsaan</string>
|
||||||
<string name="custom_osmand_plugin">Kohandatud OsmAnd pistik</string>
|
<string name="custom_osmand_plugin">Kohandatud OsmAnd pistik</string>
|
||||||
<string name="changes_applied_to_profile">Profiil %1$s muudetud.</string>
|
<string name="changes_applied_to_profile">Profiil %1$s on muudetud.</string>
|
||||||
<string name="settings_item_read_error">Ei saanud lugeda %1$s.</string>
|
<string name="settings_item_read_error">Ei saanud lugeda %1$s\'st.</string>
|
||||||
<string name="settings_item_write_error">Ei saanud kirjutada %1$s.</string>
|
<string name="settings_item_write_error">Ei saanud kirjutada %1$s\'sse.</string>
|
||||||
<string name="settings_item_import_error">Ei saanud importida %1$s.</string>
|
<string name="settings_item_import_error">Ei saanud importida %1$s\'st.</string>
|
||||||
<string name="some_articles_may_not_available_in_lang">Kõik Vikipeedia artiklid ei pruugi olla saadaval sinu valitud keeles.</string>
|
<string name="some_articles_may_not_available_in_lang">Kõik Vikipeedia artiklid ei pruugi olla saadaval sinu valitud keeles.</string>
|
||||||
<string name="lang_zhyue">Kantoni</string>
|
<string name="lang_zhyue">Kantoni</string>
|
||||||
<string name="lang_zhminnan">Lõunamini</string>
|
<string name="lang_zhminnan">Lõunamini</string>
|
||||||
|
@ -3525,4 +3533,85 @@
|
||||||
<string name="shared_string_language">Keel</string>
|
<string name="shared_string_language">Keel</string>
|
||||||
<string name="shared_string_all_languages">Kõik keeled</string>
|
<string name="shared_string_all_languages">Kõik keeled</string>
|
||||||
<string name="index_name_antarctica">Antarktis</string>
|
<string name="index_name_antarctica">Antarktis</string>
|
||||||
|
<string name="pseudo_mercator_projection">Pseudo-Mercatori projektsioon</string>
|
||||||
|
<string name="one_image_per_tile">Üks pildifail paani kohta</string>
|
||||||
|
<string name="sqlite_db_file">SQLiteDB fail</string>
|
||||||
|
<string name="online_map_name_helper_text">Sisesta veebikaardi allika nimi.</string>
|
||||||
|
<string name="online_map_url_helper_text">Sisesta või kopeeri võrguallika aadress.</string>
|
||||||
|
<string name="edit_online_source">Muuda võrguallikat</string>
|
||||||
|
<string name="expire_time">Aegumise ajavahemik</string>
|
||||||
|
<string name="mercator_projection">Mercatori projektsioon</string>
|
||||||
|
<string name="storage_format">Salvestusvorming</string>
|
||||||
|
<string name="map_source_zoom_levels">Määra võrgukaardi kuvamiseks või laadimiseks vähim ja suurim suumitase.</string>
|
||||||
|
<string name="route_recalculation_dist_title">Minimaalne kaugus marsruudi ümberarvutamiseks</string>
|
||||||
|
<string name="ltr_or_rtl_triple_combine_via_dash">%1$s — %2$s — %3$s</string>
|
||||||
|
<string name="shared_string_menu">Menüü</string>
|
||||||
|
<string name="turn_screen_on_proximity_sensor">Lähedusandur</string>
|
||||||
|
<string name="keep_screen_on">Hoia ekraan sisselülitatuna</string>
|
||||||
|
<string name="keep_screen_off">Hoia ekraan väljalülitatuna</string>
|
||||||
|
<string name="wiki_menu_download_descr">Vikipedia huvipunktide kuvamiseks on vaja täiendavaid kaarte.</string>
|
||||||
|
<string name="select_wikipedia_article_langs">Valige kaardil olevad Vikipeedia artiklite keeled. Artikli lugemise ajal kasuta ükskõik millist saadaolevat keelt.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_slash_with_space">%1$s / %2$s</string>
|
||||||
|
<string name="search_poi_types">Otsi huvipunktide tüüpe</string>
|
||||||
|
<string name="quick_action_transport_hide">Peida ühistranspordi teave</string>
|
||||||
|
<string name="quick_action_transport_show">Näita ühistranspordi teavet</string>
|
||||||
|
<string name="quick_action_show_hide_transport">Kuva või peida ühistransport</string>
|
||||||
|
<string name="quick_action_transport_descr">Nupp, mis kuvab või peidab ühistranspordiandmed kaardil.</string>
|
||||||
|
<string name="create_edit_poi">Lisa või muuda huvipunkti</string>
|
||||||
|
<string name="shared_string_night_map">Öine kaart</string>
|
||||||
|
<string name="add_online_source">Võrguallika lisamine</string>
|
||||||
|
<string name="clear_tiles_warning">Nende muudatuste rakendamine tühjendab selle paaniallika vahemällu talletatud andmed</string>
|
||||||
|
<string name="osm_edit_closed_note">Suletud OSM märkus</string>
|
||||||
|
<string name="vessel_height_warning_link">Määra laeva kõrgus</string>
|
||||||
|
<string name="vessel_height_warning">Madalate sildade vältimiseks saad kirjeldada laeva kõrguse. Palun arvesta, et liikuva silla puhul me kasutame seda kõrgust ka siis, kui sild on avatud.</string>
|
||||||
|
<string name="vessel_height_limit_description">Madalate sildade vältimiseks kirjelda laeva kõrgus. Palun arvesta, et liikuva silla puhul me kasutame seda kõrgust ka siis, kui sild on avatud.</string>
|
||||||
|
<string name="vessel_width_limit_description">Lühikeste sildade vältimiseks kirjelda laeva laius</string>
|
||||||
|
<string name="quick_action_showhide_mapillary_title">Näita või peida Mapillary andmed</string>
|
||||||
|
<string name="quick_action_mapillary_hide">Peida Mapillary andmed</string>
|
||||||
|
<string name="quick_action_mapillary_show">Näita Mapillary andmeid</string>
|
||||||
|
<string name="quick_action_showhide_mapillary_descr">Nupp, mis näitab või peidab kaardil Mapillary kihti.</string>
|
||||||
|
<string name="shared_string_uninstall_and_restart">Eemalda ja taaskäivita</string>
|
||||||
|
<string name="app_mode_inline_skates">Rulluisud</string>
|
||||||
|
<string name="quick_action_remove_next_destination">Kustuta järgmine sihtpunkt</string>
|
||||||
|
<string name="use_volume_buttons_as_zoom_descr">Sisselülitades saad seadme helitugevuse nuppudega kontrollida kaardi suumi taset.</string>
|
||||||
|
<string name="use_volume_buttons_as_zoom">Helitugevuse nupud toimivad suumina</string>
|
||||||
|
<string name="please_provide_point_name_error">Palun sisestage punkti nimi</string>
|
||||||
|
<string name="search_download_wikipedia_maps">Lae alla Vikipeedia kaardid</string>
|
||||||
|
<string name="plugin_wikipedia_description">Hangi huviväärsuste kohta teavet Vikipeediast. See on sinu võrguühenduseta reisiraamat - luba lihtsalt Vikipeedia lisaprogramm ja loe artikleid enda ümber asuvate objektide kohta.</string>
|
||||||
|
<string name="add_hidden_group_info">Kuna valitud grupp on peidetud, siis lisatud punkt ei ole kaardil nähtav. Vajadusel leiad ta „%s“ alt.</string>
|
||||||
|
<string name="app_mode_go_cart">Kartauto</string>
|
||||||
|
<string name="parking_positions">Parkimiskohad</string>
|
||||||
|
<string name="add_edit_favorite">Lisa lemmik või muuda seda</string>
|
||||||
|
<string name="app_mode_wheelchair">Ratastool</string>
|
||||||
|
<string name="app_mode_enduro_motorcycle">Enduro mootorratas</string>
|
||||||
|
<string name="app_mode_motor_scooter">Motoroller</string>
|
||||||
|
<string name="gpx_split_interval_descr">Vali välp, mille alusel kuvatakse rajal aja- või vahemaamärgid.</string>
|
||||||
|
<string name="gpx_split_interval_none_descr">Vali soovitud jagamise viis - kas aja või vahemaa alusel.</string>
|
||||||
|
<string name="track_coloring_solid">Ühtlane</string>
|
||||||
|
<string name="turn_screen_on_navigation_instructions_descr">Iga navigeerimisjuhis lülitab ekraani tööle.</string>
|
||||||
|
<string name="turn_screen_on_navigation_instructions">Navigeerimisjuhised</string>
|
||||||
|
<string name="turn_screen_on_power_button_descr">Seadme toitenupu vajutamisel lülitatakse ekraan tööle ning OsmAnd\'i näidatakse lukustuskuval.</string>
|
||||||
|
<string name="turn_screen_on_power_button">Toitenupp</string>
|
||||||
|
<string name="shared_string_uninstall">Eemalda</string>
|
||||||
|
<string name="extra_maps_menu_group">Täiendavad kaardid</string>
|
||||||
|
<string name="tiles_storage_descr">Vali kuidas sa soovid allalaetud paane salvestada.</string>
|
||||||
|
<string name="mapillary_item">OsmAnd ja Mapillary</string>
|
||||||
|
<string name="quick_action_item">Kiirtegevus</string>
|
||||||
|
<string name="radius_ruler_item">Raadiuse joonlaud</string>
|
||||||
|
<string name="routing_attr_length_description">Täpsusta marsruutidel lubatud sõiduki pikkus.</string>
|
||||||
|
<string name="routing_attr_length_name">Pikkuse piirang</string>
|
||||||
|
<string name="shared_string_bearing">Kurss</string>
|
||||||
|
<string name="item_deleted">%1$s on kustutatud</string>
|
||||||
|
<string name="speed_cameras_restart_descr">Selleks, et eemaldada kõik kiiruskaamerate andmed on vajalik seadme taaskäivitamine.</string>
|
||||||
|
<string name="speed_cameras_removed_descr">Siin seadmes puudub teave liikluskaamerate kohta.</string>
|
||||||
|
<string name="shared_string_add_profile">Lisa profiil</string>
|
||||||
|
<string name="change_application_profile">Muuda rakenduse profiili</string>
|
||||||
|
<string name="profiles_for_action_not_found">Ühtegi sellist profiili ei leidunud.</string>
|
||||||
|
<string name="index_item_world_basemap_detailed">Maailma detailne üldkaart</string>
|
||||||
|
<string name="unsupported_type_error">Faili tüüp ei ole toetatud</string>
|
||||||
|
<string name="width_limit_description">Kuna mõnedel marsruutidel võidakse kohaldada sõidukite laiuspiiranguid, siis palun märkige oma sõiduki laius.</string>
|
||||||
|
<string name="height_limit_description">Kuna mõnedel marsruutidel võidakse kohaldada sõidukite kõrguspiiranguid, siis palun märkige oma sõiduki kõrgus.</string>
|
||||||
|
<string name="lenght_limit_description">Kuna mõnedel marsruutidel võidakse kohaldada piiranguid pikkade sõidukite suhtes, siis palun märkige oma sõiduki pikkus.</string>
|
||||||
|
<string name="weight_limit_description">Kuna mõnedel marsruutidel võidakse kohaldada sõidukite kaalupiiranguid, siis palun märkige oma sõiduki kaal.</string>
|
||||||
|
<string name="gpx_parse_error">OsmAnd GPX faili vorming pole korrektne. Täpsemaks uurimiseks palun suhtle meie tugimeeskonnaga.</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3786,4 +3786,5 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="quick_action_showhide_mapillary_title">Erakutsi/ezkutatu Mapillary</string>
|
<string name="quick_action_showhide_mapillary_title">Erakutsi/ezkutatu Mapillary</string>
|
||||||
<string name="quick_action_mapillary_hide">Ezkutatu Mapillary</string>
|
<string name="quick_action_mapillary_hide">Ezkutatu Mapillary</string>
|
||||||
<string name="quick_action_mapillary_show">Erakutsi Mapillary</string>
|
<string name="quick_action_mapillary_show">Erakutsi Mapillary</string>
|
||||||
|
<string name="shared_string_done">Egina</string>
|
||||||
</resources>
|
</resources>
|
|
@ -198,7 +198,7 @@
|
||||||
<string name="poi_craft_key_cutter">Service de reproduction de clefs</string>
|
<string name="poi_craft_key_cutter">Service de reproduction de clefs</string>
|
||||||
<string name="poi_kindergarten">Jardin d\'enfants</string>
|
<string name="poi_kindergarten">Jardin d\'enfants</string>
|
||||||
<string name="poi_kiosk">Kiosque</string>
|
<string name="poi_kiosk">Kiosque</string>
|
||||||
<string name="poi_korfbal">Korfbal</string>
|
<string name="poi_korfbal">Korfball</string>
|
||||||
<string name="poi_landfill">Décharge</string>
|
<string name="poi_landfill">Décharge</string>
|
||||||
<string name="poi_landmark">Point de repère</string>
|
<string name="poi_landmark">Point de repère</string>
|
||||||
<string name="poi_laundry">Laverie</string>
|
<string name="poi_laundry">Laverie</string>
|
||||||
|
@ -2069,7 +2069,7 @@
|
||||||
<string name="poi_wiki_lang_mn">Wiki mongole</string>
|
<string name="poi_wiki_lang_mn">Wiki mongole</string>
|
||||||
<string name="poi_wheelchair_accessibility">Accessibilité aux fauteuils roulants</string>
|
<string name="poi_wheelchair_accessibility">Accessibilité aux fauteuils roulants</string>
|
||||||
<string name="poi_bicycle_parking_informal">Informel</string>
|
<string name="poi_bicycle_parking_informal">Informel</string>
|
||||||
<string name="poi_water_characteristic_mud">Caractéristique de l\'eau : boueux</string>
|
<string name="poi_water_characteristic_mud">Boue</string>
|
||||||
<string name="poi_scrub">Broussailles</string>
|
<string name="poi_scrub">Broussailles</string>
|
||||||
<string name="poi_logging">Coupe de bois</string>
|
<string name="poi_logging">Coupe de bois</string>
|
||||||
<string name="poi_passing_place">Zone de croisement</string>
|
<string name="poi_passing_place">Zone de croisement</string>
|
||||||
|
|
|
@ -2792,4 +2792,7 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.</string>
|
||||||
<string name="plan_route_create_new_route">Sukurti naują maršrutą</string>
|
<string name="plan_route_create_new_route">Sukurti naują maršrutą</string>
|
||||||
<string name="plan_route_select_track_file_for_open">Pasirinkite trasos failą kurį norite atidaryti</string>
|
<string name="plan_route_select_track_file_for_open">Pasirinkite trasos failą kurį norite atidaryti</string>
|
||||||
<string name="shared_string_done">Padaryta</string>
|
<string name="shared_string_done">Padaryta</string>
|
||||||
|
<string name="add_hidden_group_info">Pridėtas taškas nebus matomas žemėlapyje, nes pasirinkta grupė yra paslėpta, ją galite rasti \"%s\".</string>
|
||||||
|
<string name="gpx_split_interval_descr">Pasirinkite intervalą nuo kurio taškas su atstumu ar laiku bus pavaizduojamas ekrane ant trasos.</string>
|
||||||
|
<string name="gpx_split_interval_none_descr">Pasirinkite norima dalinimo variantą: pagal laiką arba pagal atstumą.</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1329,7 +1329,7 @@
|
||||||
<string name="traffic_warning_border_control">Kontrola graniczna</string>
|
<string name="traffic_warning_border_control">Kontrola graniczna</string>
|
||||||
<string name="traffic_warning_payment">Punkt poboru opłat</string>
|
<string name="traffic_warning_payment">Punkt poboru opłat</string>
|
||||||
<string name="traffic_warning_stop">Znak Stop</string>
|
<string name="traffic_warning_stop">Znak Stop</string>
|
||||||
<string name="traffic_warning_calming">Uspokojenie ruchu</string>
|
<string name="traffic_warning_calming">Próg zwalniający</string>
|
||||||
<string name="traffic_warning_speed_camera">Fotoradar</string>
|
<string name="traffic_warning_speed_camera">Fotoradar</string>
|
||||||
<string name="traffic_warning">Ostrzeżenia drogowe</string>
|
<string name="traffic_warning">Ostrzeżenia drogowe</string>
|
||||||
<string name="local_index_description">Kliknij istniejący element, aby zobaczyć szczegóły, naciśnij i przytrzymaj, aby wyłączyć lub usunąć. Aktualne dane na urządzeniu (%1$s wolne):</string>
|
<string name="local_index_description">Kliknij istniejący element, aby zobaczyć szczegóły, naciśnij i przytrzymaj, aby wyłączyć lub usunąć. Aktualne dane na urządzeniu (%1$s wolne):</string>
|
||||||
|
@ -3833,7 +3833,7 @@
|
||||||
<string name="gpx_split_interval_none_descr">Wybierz żądaną opcję podziału: według czasu lub odległości.</string>
|
<string name="gpx_split_interval_none_descr">Wybierz żądaną opcję podziału: według czasu lub odległości.</string>
|
||||||
<string name="track_coloring_solid">Stałe</string>
|
<string name="track_coloring_solid">Stałe</string>
|
||||||
<string name="gpx_parse_error">OsmAnd GPX nie jest dobrze uformowany, prosimy o kontakt z zespołem wsparcia technicznego w celu dalszego zbadania sprawy.</string>
|
<string name="gpx_parse_error">OsmAnd GPX nie jest dobrze uformowany, prosimy o kontakt z zespołem wsparcia technicznego w celu dalszego zbadania sprawy.</string>
|
||||||
<string name="turn_screen_on_wake_time_descr">Wybierz limit czasu ekranu po przebudzeniu. (\"%1$s\" nie powoduje przekroczenia limitu czasu).</string>
|
<string name="turn_screen_on_wake_time_descr">Wybierz limit czasu ekranu po przebudzeniu. (\"%1$s\" nie powoduje przekroczenia limitu czasu)</string>
|
||||||
<string name="track_show_start_finish_icons">Pokaż ikony rozpoczęcia i zakończenia</string>
|
<string name="track_show_start_finish_icons">Pokaż ikony rozpoczęcia i zakończenia</string>
|
||||||
<string name="gpx_split_interval_descr">Wybierz przedział czasowy, w którym będą wyświetlane znaki z dystansem lub czasem na torze.</string>
|
<string name="gpx_split_interval_descr">Wybierz przedział czasowy, w którym będą wyświetlane znaki z dystansem lub czasem na torze.</string>
|
||||||
<string name="shared_string_custom">Niestandardowy</string>
|
<string name="shared_string_custom">Niestandardowy</string>
|
||||||
|
@ -3844,4 +3844,5 @@
|
||||||
<string name="plan_route_create_new_route">Utwórz nową trasę</string>
|
<string name="plan_route_create_new_route">Utwórz nową trasę</string>
|
||||||
<string name="plan_route_select_track_file_for_open">Wybierz plik ścieżki do otwarcia.</string>
|
<string name="plan_route_select_track_file_for_open">Wybierz plik ścieżki do otwarcia.</string>
|
||||||
<string name="shared_string_done">Wykonane</string>
|
<string name="shared_string_done">Wykonane</string>
|
||||||
|
<string name="turn_screen_on_power_button_disabled">Wyłączone. Wymaga \"Trzymaj ekran włączony\" w obszarze \"Limit czasu po przebudzeniu\".</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1250,7 +1250,7 @@
|
||||||
<string name="traffic_warning_border_control">Posto alfandegário</string>
|
<string name="traffic_warning_border_control">Posto alfandegário</string>
|
||||||
<string name="traffic_warning_payment">Portagem</string>
|
<string name="traffic_warning_payment">Portagem</string>
|
||||||
<string name="traffic_warning_stop">Sinal de stop</string>
|
<string name="traffic_warning_stop">Sinal de stop</string>
|
||||||
<string name="traffic_warning_calming">Acalmia de tráfego</string>
|
<string name="traffic_warning_calming">Choque de velocidade</string>
|
||||||
<string name="traffic_warning_speed_camera">Radar de velocidade</string>
|
<string name="traffic_warning_speed_camera">Radar de velocidade</string>
|
||||||
<string name="traffic_warning">Aviso de tráfego</string>
|
<string name="traffic_warning">Aviso de tráfego</string>
|
||||||
<string name="speak_favorites">Favoritos pertos</string>
|
<string name="speak_favorites">Favoritos pertos</string>
|
||||||
|
|
|
@ -520,12 +520,12 @@ public class GpxSelectionHelper {
|
||||||
}
|
}
|
||||||
GPXFile gpx = GPXUtilities.loadGPXFile(fl);
|
GPXFile gpx = GPXUtilities.loadGPXFile(fl);
|
||||||
if (obj.has(COLOR)) {
|
if (obj.has(COLOR)) {
|
||||||
int clr = Algorithms.parseColor(obj.getString(COLOR));
|
int clr = parseColor(obj.getString(COLOR));
|
||||||
gpx.setColor(clr);
|
gpx.setColor(clr);
|
||||||
}
|
}
|
||||||
for (GradientScaleType scaleType : GradientScaleType.values()) {
|
for (GradientScaleType scaleType : GradientScaleType.values()) {
|
||||||
if (obj.has(scaleType.getColorTypeName())) {
|
if (obj.has(scaleType.getColorTypeName())) {
|
||||||
int clr = Algorithms.parseColor(obj.getString(scaleType.getColorTypeName()));
|
int clr = parseColor(obj.getString(scaleType.getColorTypeName()));
|
||||||
gpx.setGradientScaleColor(scaleType.getColorTypeName(), clr);
|
gpx.setGradientScaleColor(scaleType.getColorTypeName(), clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -567,6 +567,14 @@ public class GpxSelectionHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int parseColor(String color) {
|
||||||
|
try {
|
||||||
|
return Algorithms.isEmpty(color) ? 0 : Algorithms.parseColor(color);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void saveCurrentSelections() {
|
private void saveCurrentSelections() {
|
||||||
JSONArray ar = new JSONArray();
|
JSONArray ar = new JSONArray();
|
||||||
for (SelectedGpxFile s : selectedGPXFiles) {
|
for (SelectedGpxFile s : selectedGPXFiles) {
|
||||||
|
|
|
@ -206,7 +206,7 @@ public class AdvancedEditPoiFragment extends BaseOsmAndFragment
|
||||||
continue;
|
continue;
|
||||||
addTagView(tag.getKey(), tag.getValue());
|
addTagView(tag.getKey(), tag.getValue());
|
||||||
}
|
}
|
||||||
if (editPoiData.hasEmptyValue()) {
|
if (editPoiData.hasEmptyValue() && linearLayout.findViewById(R.id.valueEditText) != null) {
|
||||||
linearLayout.findViewById(R.id.valueEditText).requestFocus();
|
linearLayout.findViewById(R.id.valueEditText).requestFocus();
|
||||||
}
|
}
|
||||||
editPoiData.setIsInEdit(false);
|
editPoiData.setIsInEdit(false);
|
||||||
|
|
|
@ -214,13 +214,14 @@ public class EditPoiData {
|
||||||
}
|
}
|
||||||
retrieveType();
|
retrieveType();
|
||||||
PoiType pt = getPoiTypeDefined();
|
PoiType pt = getPoiTypeDefined();
|
||||||
if (pt != null) {
|
String editOsmTag = pt != null ? pt.getEditOsmTag() : null;
|
||||||
removeTypeTagWithPrefix(!tagValues.containsKey(REMOVE_TAG_PREFIX + pt.getEditOsmTag()));
|
if (editOsmTag != null) {
|
||||||
|
removeTypeTagWithPrefix(!tagValues.containsKey(REMOVE_TAG_PREFIX + editOsmTag));
|
||||||
currentPoiType = pt;
|
currentPoiType = pt;
|
||||||
String tagVal = pt.getEditOsmValue() != null ? pt.getEditOsmValue() : "";
|
String tagVal = pt.getEditOsmValue() != null ? pt.getEditOsmValue() : "";
|
||||||
tagValues.put(pt.getEditOsmTag(), tagVal);
|
tagValues.put(editOsmTag, tagVal);
|
||||||
if (userChanges) {
|
if (userChanges) {
|
||||||
changedTags.add(pt.getEditOsmTag());
|
changedTags.add(editOsmTag);
|
||||||
}
|
}
|
||||||
category = pt.getCategory();
|
category = pt.getCategory();
|
||||||
} else if (currentPoiType != null) {
|
} else if (currentPoiType != null) {
|
||||||
|
|
|
@ -765,8 +765,14 @@ public class ResourceManager {
|
||||||
toAddPoiTypes.put(poiCategory, new TreeMap<String, PoiType>());
|
toAddPoiTypes.put(poiCategory, new TreeMap<String, PoiType>());
|
||||||
}
|
}
|
||||||
Map<String, PoiType> poiTypes = toAddPoiTypes.get(poiCategory);
|
Map<String, PoiType> poiTypes = toAddPoiTypes.get(poiCategory);
|
||||||
|
if (poiTypes != null) {
|
||||||
for (String s : entry.getValue()) {
|
for (String s : entry.getValue()) {
|
||||||
poiTypes.put(s, new PoiType(MapPoiTypes.getDefault(), poiCategory, null, s));
|
PoiType pt = new PoiType(MapPoiTypes.getDefault(), poiCategory, null, s);
|
||||||
|
pt.setOsmTag("");
|
||||||
|
pt.setOsmValue("");
|
||||||
|
pt.setNotEditableOsm(true);
|
||||||
|
poiTypes.put(s, pt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,12 @@ package net.osmand.plus.routepreparationmenu;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -19,6 +22,7 @@ import net.osmand.AndroidUtils;
|
||||||
import net.osmand.CallbackWithObject;
|
import net.osmand.CallbackWithObject;
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.StateChangedListener;
|
import net.osmand.StateChangedListener;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.OsmAndLocationSimulation;
|
import net.osmand.plus.OsmAndLocationSimulation;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -168,15 +172,26 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
|
|
||||||
private BaseBottomSheetItem createMuteSoundItem(final LocalRoutingParameter optionsItem) {
|
private BaseBottomSheetItem createMuteSoundItem(final LocalRoutingParameter optionsItem) {
|
||||||
boolean active = !routingHelper.getVoiceRouter().isMuteForMode(applicationMode);
|
boolean active = !routingHelper.getVoiceRouter().isMuteForMode(applicationMode);
|
||||||
final BottomSheetItemWithCompoundButton[] muteSoundItem = new BottomSheetItemWithCompoundButton[1];
|
int selectedModeColor = ContextCompat.getColor(app, selectedModeColorId);
|
||||||
muteSoundItem[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
final View itemView = UiUtilities.getInflater(app, nightMode).inflate(
|
||||||
.setCompoundButtonColorId(selectedModeColorId)
|
R.layout.bottom_sheet_item_with_descr_switch_and_additional_button_56dp, null, false);
|
||||||
.setChecked(active)
|
final ImageView icon = itemView.findViewById(R.id.icon);
|
||||||
.setDescription(getString(R.string.voice_announcements))
|
TextView tvTitle = itemView.findViewById(R.id.title);
|
||||||
.setIcon(getContentIcon(active ? optionsItem.getActiveIconId() : optionsItem.getDisabledIconId()))
|
TextView tvDescription = itemView.findViewById(R.id.description);
|
||||||
.setTitle(getString(R.string.shared_string_sound))
|
View basicItem = itemView.findViewById(R.id.basic_item_body);
|
||||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_and_switch_56dp)
|
final CompoundButton cb = itemView.findViewById(R.id.compound_button);
|
||||||
.setOnClickListener(new View.OnClickListener() {
|
View voicePromptsBtn = itemView.findViewById(R.id.additional_button);
|
||||||
|
ImageView voicePromptsBtnImage = itemView.findViewById(R.id.additional_button_icon);
|
||||||
|
|
||||||
|
tvTitle.setText(getString(R.string.shared_string_sound));
|
||||||
|
tvDescription.setText(getString(R.string.voice_announcements));
|
||||||
|
icon.setImageDrawable(getContentIcon(active ?
|
||||||
|
optionsItem.getActiveIconId() : optionsItem.getDisabledIconId()));
|
||||||
|
cb.setChecked(active);
|
||||||
|
cb.setFocusable(false);
|
||||||
|
UiUtilities.setupCompoundButton(nightMode, selectedModeColor, cb);
|
||||||
|
|
||||||
|
basicItem.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
routingOptionsHelper.addNewRouteMenuParameter(applicationMode, optionsItem);
|
routingOptionsHelper.addNewRouteMenuParameter(applicationMode, optionsItem);
|
||||||
|
@ -186,14 +201,33 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
||||||
OsmAndDialogs.showVoiceProviderDialog(mapActivity, applicationMode, false);
|
OsmAndDialogs.showVoiceProviderDialog(mapActivity, applicationMode, false);
|
||||||
} else {
|
} else {
|
||||||
muteSoundItem[0].setChecked(!active);
|
cb.setChecked(!active);
|
||||||
muteSoundItem[0].setIcon(getContentIcon(!active ? optionsItem.getActiveIconId() : optionsItem.getDisabledIconId()));
|
icon.setImageDrawable(getContentIcon(!active ? optionsItem.getActiveIconId() : optionsItem.getDisabledIconId()));
|
||||||
}
|
}
|
||||||
updateMenu();
|
updateMenu();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
Drawable drawable = app.getUIUtilities().getIcon(R.drawable.ic_action_settings,
|
||||||
|
nightMode ? R.color.route_info_control_icon_color_dark : R.color.route_info_control_icon_color_light);
|
||||||
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
|
Drawable activeDrawable = app.getUIUtilities().getIcon(R.drawable.ic_action_settings, selectedModeColorId);
|
||||||
|
drawable = AndroidUtils.createPressedStateListDrawable(drawable, activeDrawable);
|
||||||
|
}
|
||||||
|
voicePromptsBtnImage.setImageDrawable(drawable);
|
||||||
|
|
||||||
|
voicePromptsBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
BaseSettingsFragment.showInstance(
|
||||||
|
mapActivity, BaseSettingsFragment.SettingsScreenType.VOICE_ANNOUNCES);
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return new BaseBottomSheetItem.Builder()
|
||||||
|
.setCustomView(itemView)
|
||||||
.create();
|
.create();
|
||||||
return muteSoundItem[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBottomSheetItem createTimeConditionalRoutingItem(final LocalRoutingParameter optionsItem) {
|
private BaseBottomSheetItem createTimeConditionalRoutingItem(final LocalRoutingParameter optionsItem) {
|
||||||
|
|
|
@ -2194,6 +2194,10 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Long> LAST_UPDATES_CARD_REFRESH = new LongPreference("last_updates_card_refresh", 0).makeGlobal();
|
public final OsmandPreference<Long> LAST_UPDATES_CARD_REFRESH = new LongPreference("last_updates_card_refresh", 0).makeGlobal();
|
||||||
|
|
||||||
public final CommonPreference<Integer> CURRENT_TRACK_COLOR = new IntPreference("current_track_color", 0).makeGlobal().cache();
|
public final CommonPreference<Integer> CURRENT_TRACK_COLOR = new IntPreference("current_track_color", 0).makeGlobal().cache();
|
||||||
|
public final CommonPreference<String> CURRENT_TRACK_WIDTH = new StringPreference("current_track_width", "").makeGlobal().cache();
|
||||||
|
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_ARROWS = new BooleanPreference("current_track_show_arrows", false).makeGlobal().cache();
|
||||||
|
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_START_FINISH = new BooleanPreference("current_track_show_start_finish", true).makeGlobal().cache();
|
||||||
|
public final ListStringPreference CUSTOM_TRACK_COLORS = (ListStringPreference) new ListStringPreference("custom_track_colors", null, ",").makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final CommonPreference<Integer> SAVE_TRACK_INTERVAL = new IntPreference("save_track_interval", 5000).makeProfile();
|
public final CommonPreference<Integer> SAVE_TRACK_INTERVAL = new IntPreference("save_track_interval", 5000).makeProfile();
|
||||||
|
|
181
OsmAnd/src/net/osmand/plus/track/CustomColorBottomSheet.java
Normal file
181
OsmAnd/src/net/osmand/plus/track/CustomColorBottomSheet.java
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
package net.osmand.plus.track;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorInt;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.jaredrummler.android.colorpicker.ColorPanelView;
|
||||||
|
import com.jaredrummler.android.colorpicker.ColorPickerView;
|
||||||
|
import com.jaredrummler.android.colorpicker.ColorPickerView.OnColorChangedListener;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||||
|
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||||
|
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
|
||||||
|
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
|
public class CustomColorBottomSheet extends MenuBottomSheetDialogFragment implements OnColorChangedListener {
|
||||||
|
|
||||||
|
private static final String TAG = CustomColorBottomSheet.class.getSimpleName();
|
||||||
|
|
||||||
|
private static final Log log = PlatformUtil.getLog(CustomColorBottomSheet.class);
|
||||||
|
|
||||||
|
private static final String NEW_SELECTED_COLOR = "new_selected_color";
|
||||||
|
private static final String PREV_SELECTED_COLOR = "prev_selected_color";
|
||||||
|
|
||||||
|
private ColorPickerView colorPicker;
|
||||||
|
private ColorPanelView newColorPanel;
|
||||||
|
|
||||||
|
private EditText hexEditText;
|
||||||
|
private boolean fromEditText;
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
|
private int prevColor;
|
||||||
|
@ColorInt
|
||||||
|
private int newColor;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createMenuItems(Bundle savedInstanceState) {
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
newColor = savedInstanceState.getInt(NEW_SELECTED_COLOR);
|
||||||
|
prevColor = savedInstanceState.getInt(PREV_SELECTED_COLOR);
|
||||||
|
} else {
|
||||||
|
Bundle args = getArguments();
|
||||||
|
if (args != null) {
|
||||||
|
prevColor = args.getInt(PREV_SELECTED_COLOR);
|
||||||
|
newColor = prevColor != -1 ? prevColor : Color.RED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
items.add(new TitleItem(getString(R.string.select_color)));
|
||||||
|
|
||||||
|
BaseBottomSheetItem item = new SimpleBottomSheetItem.Builder()
|
||||||
|
.setCustomView(createPickerView())
|
||||||
|
.create();
|
||||||
|
items.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
|
outState.putInt(NEW_SELECTED_COLOR, newColor);
|
||||||
|
outState.putInt(PREV_SELECTED_COLOR, prevColor);
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private View createPickerView() {
|
||||||
|
LayoutInflater themedInflater = UiUtilities.getMaterialInflater(getActivity(), nightMode);
|
||||||
|
View colorView = themedInflater.inflate(R.layout.custom_color_picker, null);
|
||||||
|
colorPicker = colorView.findViewById(R.id.color_picker_view);
|
||||||
|
newColorPanel = colorView.findViewById(R.id.color_panel_new);
|
||||||
|
hexEditText = colorView.findViewById(R.id.color_hex_edit_text);
|
||||||
|
|
||||||
|
setHex(newColor);
|
||||||
|
newColorPanel.setColor(newColor);
|
||||||
|
colorPicker.setColor(newColor, true);
|
||||||
|
colorPicker.setOnColorChangedListener(this);
|
||||||
|
hexEditText.addTextChangedListener(new TextWatcher() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
if (hexEditText.isFocused()) {
|
||||||
|
int color = colorPicker.getColor();
|
||||||
|
try {
|
||||||
|
color = Algorithms.parseColor("#" + s.toString());
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
hexEditText.setError(getString(R.string.wrong_input));
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
if (color != colorPicker.getColor()) {
|
||||||
|
fromEditText = true;
|
||||||
|
colorPicker.setColor(color, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return colorView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onColorChanged(int newColor) {
|
||||||
|
this.newColor = newColor;
|
||||||
|
if (newColorPanel != null) {
|
||||||
|
newColorPanel.setColor(newColor);
|
||||||
|
}
|
||||||
|
if (!fromEditText && hexEditText != null) {
|
||||||
|
setHex(newColor);
|
||||||
|
Activity activity = getActivity();
|
||||||
|
if (activity != null && hexEditText.hasFocus()) {
|
||||||
|
AndroidUtils.hideSoftKeyboard(activity, hexEditText);
|
||||||
|
hexEditText.clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fromEditText = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setHex(int color) {
|
||||||
|
hexEditText.setText(String.format("%08X", color));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getRightBottomButtonTextId() {
|
||||||
|
return R.string.shared_string_apply;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRightBottomButtonClick() {
|
||||||
|
Fragment target = getTargetFragment();
|
||||||
|
if (target instanceof ColorPickerListener) {
|
||||||
|
((ColorPickerListener) target).onColorSelected(prevColor, newColor);
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void showInstance(@NonNull FragmentManager fragmentManager, Fragment target, int prevColor) {
|
||||||
|
try {
|
||||||
|
if (!fragmentManager.isStateSaved() && fragmentManager.findFragmentByTag(CustomColorBottomSheet.TAG) == null) {
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putInt(PREV_SELECTED_COLOR, prevColor);
|
||||||
|
|
||||||
|
CustomColorBottomSheet customColorBottomSheet = new CustomColorBottomSheet();
|
||||||
|
customColorBottomSheet.setArguments(args);
|
||||||
|
customColorBottomSheet.setTargetFragment(target, 0);
|
||||||
|
customColorBottomSheet.show(fragmentManager, CustomColorBottomSheet.TAG);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ColorPickerListener {
|
||||||
|
|
||||||
|
void onColorSelected(@ColorInt int prevColor, @ColorInt int newColor);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,6 @@ import com.google.android.material.slider.Slider;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
|
|
||||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -30,6 +29,7 @@ import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -310,17 +310,11 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public List<GpxDisplayGroup> getDisplayGroups() {
|
public List<GpxDisplayGroup> getDisplayGroups() {
|
||||||
List<GpxDisplayGroup> groups = new ArrayList<>();
|
|
||||||
Fragment target = getTargetFragment();
|
Fragment target = getTargetFragment();
|
||||||
if (target instanceof TrackAppearanceFragment) {
|
if (target instanceof TrackAppearanceFragment) {
|
||||||
List<GpxDisplayGroup> result = ((TrackAppearanceFragment) target).getGpxDisplayGroups();
|
return ((TrackAppearanceFragment) target).getDisplaySegmentGroups();
|
||||||
for (GpxDisplayGroup group : result) {
|
|
||||||
if (GpxDisplayItemType.TRACK_SEGMENT == group.getType()) {
|
|
||||||
groups.add(group);
|
|
||||||
}
|
}
|
||||||
}
|
return Collections.emptyList();
|
||||||
}
|
|
||||||
return groups;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showInstance(@NonNull FragmentManager fragmentManager, TrackDrawInfo trackDrawInfo, Fragment target) {
|
public static void showInstance(@NonNull FragmentManager fragmentManager, TrackDrawInfo trackDrawInfo, Fragment target) {
|
||||||
|
|
|
@ -9,9 +9,11 @@ import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ScrollView;
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -26,6 +28,7 @@ import net.osmand.data.QuadRect;
|
||||||
import net.osmand.data.RotatedTileBox;
|
import net.osmand.data.RotatedTileBox;
|
||||||
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
||||||
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
|
||||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
@ -38,6 +41,7 @@ import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
||||||
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
|
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
|
import net.osmand.plus.track.CustomColorBottomSheet.ColorPickerListener;
|
||||||
import net.osmand.plus.track.SplitTrackAsyncTask.SplitTrackListener;
|
import net.osmand.plus.track.SplitTrackAsyncTask.SplitTrackListener;
|
||||||
import net.osmand.render.RenderingRulesStorage;
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
@ -54,9 +58,9 @@ import static net.osmand.plus.dialogs.ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR;
|
||||||
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_BOLD;
|
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_BOLD;
|
||||||
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_MEDIUM;
|
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_MEDIUM;
|
||||||
|
|
||||||
public class TrackAppearanceFragment extends ContextMenuScrollFragment implements CardListener {
|
public class TrackAppearanceFragment extends ContextMenuScrollFragment implements CardListener, ColorPickerListener {
|
||||||
|
|
||||||
public static final String TAG = TrackAppearanceFragment.class.getSimpleName();
|
public static final String TAG = TrackAppearanceFragment.class.getName();
|
||||||
|
|
||||||
private static final Log log = PlatformUtil.getLog(TrackAppearanceFragment.class);
|
private static final Log log = PlatformUtil.getLog(TrackAppearanceFragment.class);
|
||||||
|
|
||||||
|
@ -73,8 +77,9 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
|
|
||||||
private TrackWidthCard trackWidthCard;
|
private TrackWidthCard trackWidthCard;
|
||||||
private SplitIntervalCard splitIntervalCard;
|
private SplitIntervalCard splitIntervalCard;
|
||||||
|
private TrackColoringCard trackColoringCard;
|
||||||
|
|
||||||
private ImageView appearanceIcon;
|
private ImageView trackIcon;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMainLayoutId() {
|
public int getMainLayoutId() {
|
||||||
|
@ -131,6 +136,10 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
}
|
}
|
||||||
if (currentRecording) {
|
if (currentRecording) {
|
||||||
trackDrawInfo = new TrackDrawInfo(true);
|
trackDrawInfo = new TrackDrawInfo(true);
|
||||||
|
trackDrawInfo.setColor(app.getSettings().CURRENT_TRACK_COLOR.get());
|
||||||
|
trackDrawInfo.setWidth(app.getSettings().CURRENT_TRACK_WIDTH.get());
|
||||||
|
trackDrawInfo.setShowArrows(app.getSettings().CURRENT_TRACK_SHOW_ARROWS.get());
|
||||||
|
trackDrawInfo.setShowStartFinish(app.getSettings().CURRENT_TRACK_SHOW_START_FINISH.get());
|
||||||
selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
|
selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
|
||||||
} else {
|
} else {
|
||||||
gpxDataItem = app.getGpxDbHelper().getItem(new File(gpxFilePath));
|
gpxDataItem = app.getGpxDbHelper().getItem(new File(gpxFilePath));
|
||||||
|
@ -163,13 +172,14 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
appearanceIcon = view.findViewById(R.id.appearance_icon);
|
trackIcon = view.findViewById(R.id.track_icon);
|
||||||
|
|
||||||
if (isPortrait()) {
|
if (isPortrait()) {
|
||||||
updateCardsLayout();
|
updateCardsLayout();
|
||||||
}
|
}
|
||||||
updateCards();
|
setupCards();
|
||||||
updateButtons(view);
|
setupButtons(view);
|
||||||
|
setupScrollShadow();
|
||||||
updateAppearanceIcon();
|
updateAppearanceIcon();
|
||||||
if (!isPortrait()) {
|
if (!isPortrait()) {
|
||||||
int widthNoShadow = getLandscapeNoShadowWidth();
|
int widthNoShadow = getLandscapeNoShadowWidth();
|
||||||
|
@ -316,6 +326,11 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onColorSelected(int prevColor, int newColor) {
|
||||||
|
trackColoringCard.onColorSelected(prevColor, newColor);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int applyPosY(int currentY, boolean needCloseMenu, boolean needMapAdjust, int previousMenuState, int newMenuState, int dZoom, boolean animated) {
|
protected int applyPosY(int currentY, boolean needCloseMenu, boolean needMapAdjust, int previousMenuState, int newMenuState, int dZoom, boolean animated) {
|
||||||
int y = super.applyPosY(currentY, needCloseMenu, needMapAdjust, previousMenuState, newMenuState, dZoom, animated);
|
int y = super.applyPosY(currentY, needCloseMenu, needMapAdjust, previousMenuState, newMenuState, dZoom, animated);
|
||||||
|
@ -327,7 +342,7 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
|
|
||||||
private void updateAppearanceIcon() {
|
private void updateAppearanceIcon() {
|
||||||
Drawable icon = getTrackIcon(app, trackDrawInfo.getWidth(), trackDrawInfo.isShowArrows(), trackDrawInfo.getColor());
|
Drawable icon = getTrackIcon(app, trackDrawInfo.getWidth(), trackDrawInfo.isShowArrows(), trackDrawInfo.getColor());
|
||||||
appearanceIcon.setImageDrawable(icon);
|
trackIcon.setImageDrawable(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void adjustMapPosition(int y) {
|
private void adjustMapPosition(int y) {
|
||||||
|
@ -387,7 +402,7 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtons(View view) {
|
private void setupButtons(View view) {
|
||||||
View buttonsContainer = view.findViewById(R.id.buttons_container);
|
View buttonsContainer = view.findViewById(R.id.buttons_container);
|
||||||
buttonsContainer.setBackgroundColor(AndroidUtils.getColorFromAttr(view.getContext(), R.attr.route_info_bg));
|
buttonsContainer.setBackgroundColor(AndroidUtils.getColorFromAttr(view.getContext(), R.attr.route_info_bg));
|
||||||
View saveButton = view.findViewById(R.id.right_bottom_button);
|
View saveButton = view.findViewById(R.id.right_bottom_button);
|
||||||
|
@ -418,6 +433,26 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
AndroidUiHelper.updateVisibility(view.findViewById(R.id.buttons_divider), true);
|
AndroidUiHelper.updateVisibility(view.findViewById(R.id.buttons_divider), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupScrollShadow() {
|
||||||
|
int shadowIconId = isNightMode() ? R.drawable.bg_contextmenu_shadow : R.drawable.bg_contextmenu_shadow;
|
||||||
|
final Drawable shadowIcon = app.getUIUtilities().getIcon(shadowIconId);
|
||||||
|
|
||||||
|
final ScrollView scrollView = getBottomScrollView();
|
||||||
|
final FrameLayout bottomContainer = getBottomContainer();
|
||||||
|
scrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollChanged() {
|
||||||
|
int scrollY = scrollView.getScrollY();
|
||||||
|
if (scrollY <= 0 && bottomContainer.getForeground() != null) {
|
||||||
|
bottomContainer.setForeground(null);
|
||||||
|
} else if (scrollY > 0 && bottomContainer.getForeground() == null) {
|
||||||
|
bottomContainer.setForeground(shadowIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void saveTrackInfo() {
|
private void saveTrackInfo() {
|
||||||
GPXFile gpxFile = selectedGpxFile.getGpxFile();
|
GPXFile gpxFile = selectedGpxFile.getGpxFile();
|
||||||
|
|
||||||
|
@ -440,6 +475,9 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
|
|
||||||
if (gpxFile.showCurrentTrack) {
|
if (gpxFile.showCurrentTrack) {
|
||||||
app.getSettings().CURRENT_TRACK_COLOR.set(trackDrawInfo.getColor());
|
app.getSettings().CURRENT_TRACK_COLOR.set(trackDrawInfo.getColor());
|
||||||
|
app.getSettings().CURRENT_TRACK_WIDTH.set(trackDrawInfo.getWidth());
|
||||||
|
app.getSettings().CURRENT_TRACK_SHOW_ARROWS.set(trackDrawInfo.isShowArrows());
|
||||||
|
app.getSettings().CURRENT_TRACK_SHOW_START_FINISH.set(trackDrawInfo.isShowStartFinish());
|
||||||
} else {
|
} else {
|
||||||
if (gpxDataItem != null) {
|
if (gpxDataItem != null) {
|
||||||
gpxDataItem = new GpxDataItem(new File(gpxFile.path), gpxFile);
|
gpxDataItem = new GpxDataItem(new File(gpxFile.path), gpxFile);
|
||||||
|
@ -508,13 +546,13 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateCards() {
|
private void setupCards() {
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
ViewGroup cardsContainer = getCardsContainer();
|
ViewGroup cardsContainer = getCardsContainer();
|
||||||
cardsContainer.removeAllViews();
|
cardsContainer.removeAllViews();
|
||||||
|
|
||||||
if (!selectedGpxFile.isShowCurrentTrack()) {
|
if (!selectedGpxFile.isShowCurrentTrack() && !Algorithms.isEmpty(getDisplaySegmentGroups())) {
|
||||||
splitIntervalCard = new SplitIntervalCard(mapActivity, trackDrawInfo);
|
splitIntervalCard = new SplitIntervalCard(mapActivity, trackDrawInfo);
|
||||||
splitIntervalCard.setListener(this);
|
splitIntervalCard.setListener(this);
|
||||||
cardsContainer.addView(splitIntervalCard.build(mapActivity));
|
cardsContainer.addView(splitIntervalCard.build(mapActivity));
|
||||||
|
@ -524,7 +562,7 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
directionArrowsCard.setListener(this);
|
directionArrowsCard.setListener(this);
|
||||||
cardsContainer.addView(directionArrowsCard.build(mapActivity));
|
cardsContainer.addView(directionArrowsCard.build(mapActivity));
|
||||||
|
|
||||||
TrackColoringCard trackColoringCard = new TrackColoringCard(mapActivity, trackDrawInfo);
|
trackColoringCard = new TrackColoringCard(mapActivity, trackDrawInfo, this);
|
||||||
trackColoringCard.setListener(this);
|
trackColoringCard.setListener(this);
|
||||||
cardsContainer.addView(trackColoringCard.build(mapActivity));
|
cardsContainer.addView(trackColoringCard.build(mapActivity));
|
||||||
|
|
||||||
|
@ -549,6 +587,17 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
|
||||||
return displayGroups;
|
return displayGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public List<GpxDisplayGroup> getDisplaySegmentGroups() {
|
||||||
|
List<GpxDisplayGroup> groups = new ArrayList<>();
|
||||||
|
for (GpxDisplayGroup group : getGpxDisplayGroups()) {
|
||||||
|
if (GpxDisplayItemType.TRACK_SEGMENT == group.getType()) {
|
||||||
|
groups.add(group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
public void dismissImmediate() {
|
public void dismissImmediate() {
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package net.osmand.plus.track;
|
package net.osmand.plus.track;
|
||||||
|
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.GradientDrawable;
|
import android.graphics.drawable.GradientDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
|
@ -14,10 +15,14 @@ import androidx.annotation.DrawableRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.internal.FlowLayout;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
@ -25,16 +30,22 @@ import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
|
||||||
import net.osmand.plus.dialogs.GpxAppearanceAdapter.GpxAppearanceAdapterType;
|
import net.osmand.plus.dialogs.GpxAppearanceAdapter.GpxAppearanceAdapterType;
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
||||||
import net.osmand.plus.widgets.FlowLayout;
|
import net.osmand.plus.track.CustomColorBottomSheet.ColorPickerListener;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.getAppearanceItems;
|
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.getAppearanceItems;
|
||||||
|
|
||||||
public class TrackColoringCard extends BaseCard {
|
public class TrackColoringCard extends BaseCard implements ColorPickerListener {
|
||||||
|
|
||||||
|
public static final int INVALID_VALUE = -1;
|
||||||
|
|
||||||
private final static String SOLID_COLOR = "solid_color";
|
private final static String SOLID_COLOR = "solid_color";
|
||||||
|
private static final Log log = PlatformUtil.getLog(TrackColoringCard.class);
|
||||||
|
|
||||||
private TrackDrawInfo trackDrawInfo;
|
private TrackDrawInfo trackDrawInfo;
|
||||||
|
|
||||||
|
@ -42,10 +53,15 @@ public class TrackColoringCard extends BaseCard {
|
||||||
private TrackAppearanceItem selectedAppearanceItem;
|
private TrackAppearanceItem selectedAppearanceItem;
|
||||||
private List<TrackAppearanceItem> appearanceItems;
|
private List<TrackAppearanceItem> appearanceItems;
|
||||||
|
|
||||||
public TrackColoringCard(MapActivity mapActivity, TrackDrawInfo trackDrawInfo) {
|
private List<Integer> customColors;
|
||||||
|
private Fragment target;
|
||||||
|
|
||||||
|
public TrackColoringCard(MapActivity mapActivity, TrackDrawInfo trackDrawInfo, Fragment target) {
|
||||||
super(mapActivity);
|
super(mapActivity);
|
||||||
|
this.target = target;
|
||||||
this.trackDrawInfo = trackDrawInfo;
|
this.trackDrawInfo = trackDrawInfo;
|
||||||
appearanceItems = getGradientAppearanceItems();
|
appearanceItems = getGradientAppearanceItems();
|
||||||
|
customColors = getCustomColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -67,6 +83,25 @@ public class TrackColoringCard extends BaseCard {
|
||||||
AndroidUiHelper.updateVisibility(view.findViewById(R.id.top_divider), isShowDivider());
|
AndroidUiHelper.updateVisibility(view.findViewById(R.id.top_divider), isShowDivider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Integer> getCustomColors() {
|
||||||
|
List<Integer> colors = new ArrayList<>();
|
||||||
|
List<String> colorNames = app.getSettings().CUSTOM_TRACK_COLORS.getStringsList();
|
||||||
|
if (colorNames != null) {
|
||||||
|
for (String colorHex : colorNames) {
|
||||||
|
try {
|
||||||
|
if (!Algorithms.isEmpty(colorHex)) {
|
||||||
|
int color = Algorithms.parseColor(colorHex);
|
||||||
|
colors.add(color);
|
||||||
|
}
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return colors;
|
||||||
|
}
|
||||||
|
|
||||||
private List<TrackAppearanceItem> getGradientAppearanceItems() {
|
private List<TrackAppearanceItem> getGradientAppearanceItems() {
|
||||||
List<TrackAppearanceItem> items = new ArrayList<>();
|
List<TrackAppearanceItem> items = new ArrayList<>();
|
||||||
items.add(new TrackAppearanceItem(SOLID_COLOR, app.getString(R.string.track_coloring_solid), R.drawable.ic_action_circle));
|
items.add(new TrackAppearanceItem(SOLID_COLOR, app.getString(R.string.track_coloring_solid), R.drawable.ic_action_circle));
|
||||||
|
@ -80,6 +115,16 @@ public class TrackColoringCard extends BaseCard {
|
||||||
|
|
||||||
private void createColorSelector() {
|
private void createColorSelector() {
|
||||||
FlowLayout selectColor = view.findViewById(R.id.select_color);
|
FlowLayout selectColor = view.findViewById(R.id.select_color);
|
||||||
|
selectColor.removeAllViews();
|
||||||
|
|
||||||
|
for (int color : customColors) {
|
||||||
|
selectColor.addView(createColorItemView(color, selectColor, true));
|
||||||
|
}
|
||||||
|
if (customColors.size() < 6) {
|
||||||
|
selectColor.addView(createAddCustomColorItemView(selectColor));
|
||||||
|
}
|
||||||
|
selectColor.addView(createDividerView(selectColor));
|
||||||
|
|
||||||
List<Integer> colors = new ArrayList<>();
|
List<Integer> colors = new ArrayList<>();
|
||||||
for (AppearanceListItem appearanceListItem : getAppearanceItems(app, GpxAppearanceAdapterType.TRACK_COLOR)) {
|
for (AppearanceListItem appearanceListItem : getAppearanceItems(app, GpxAppearanceAdapterType.TRACK_COLOR)) {
|
||||||
if (!colors.contains(appearanceListItem.getColor())) {
|
if (!colors.contains(appearanceListItem.getColor())) {
|
||||||
|
@ -87,20 +132,13 @@ public class TrackColoringCard extends BaseCard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int color : colors) {
|
for (int color : colors) {
|
||||||
selectColor.addView(createColorItemView(color, selectColor), new FlowLayout.LayoutParams(0, 0));
|
selectColor.addView(createColorItemView(color, selectColor, false));
|
||||||
}
|
}
|
||||||
updateColorSelector(trackDrawInfo.getColor(), selectColor);
|
updateColorSelector(trackDrawInfo.getColor(), selectColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private View createColorItemView(@ColorInt final int color, final FlowLayout rootView) {
|
private View createColorItemView(@ColorInt final int color, final FlowLayout rootView, boolean customColor) {
|
||||||
FrameLayout colorItemView = (FrameLayout) UiUtilities.getInflater(rootView.getContext(), nightMode)
|
View colorItemView = createCircleView(rootView);
|
||||||
.inflate(R.layout.point_editor_button, rootView, false);
|
|
||||||
ImageView outline = colorItemView.findViewById(R.id.outline);
|
|
||||||
outline.setImageDrawable(
|
|
||||||
UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.bg_point_circle_contour),
|
|
||||||
ContextCompat.getColor(app,
|
|
||||||
nightMode ? R.color.stroked_buttons_and_links_outline_dark
|
|
||||||
: R.color.stroked_buttons_and_links_outline_light)));
|
|
||||||
ImageView backgroundCircle = colorItemView.findViewById(R.id.background);
|
ImageView backgroundCircle = colorItemView.findViewById(R.id.background);
|
||||||
backgroundCircle.setImageDrawable(UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.bg_point_circle), color));
|
backgroundCircle.setImageDrawable(UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.bg_point_circle), color));
|
||||||
backgroundCircle.setOnClickListener(new View.OnClickListener() {
|
backgroundCircle.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -116,10 +154,68 @@ public class TrackColoringCard extends BaseCard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (customColor) {
|
||||||
|
backgroundCircle.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View v) {
|
||||||
|
MapActivity mapActivity = getMapActivity();
|
||||||
|
if (mapActivity != null) {
|
||||||
|
CustomColorBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), target, color);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
colorItemView.setTag(color);
|
colorItemView.setTag(color);
|
||||||
return colorItemView;
|
return colorItemView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private View createAddCustomColorItemView(FlowLayout rootView) {
|
||||||
|
View colorItemView = createCircleView(rootView);
|
||||||
|
ImageView backgroundCircle = colorItemView.findViewById(R.id.background);
|
||||||
|
|
||||||
|
int bgColorId = nightMode ? R.color.activity_background_color_dark : R.color.activity_background_color_light;
|
||||||
|
Drawable backgroundIcon = app.getUIUtilities().getIcon(R.drawable.bg_point_circle, bgColorId);
|
||||||
|
|
||||||
|
ImageView icon = colorItemView.findViewById(R.id.icon);
|
||||||
|
icon.setVisibility(View.VISIBLE);
|
||||||
|
int activeColorResId = nightMode ? R.color.icon_color_active_dark : R.color.icon_color_active_light;
|
||||||
|
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_add, activeColorResId));
|
||||||
|
|
||||||
|
backgroundCircle.setImageDrawable(backgroundIcon);
|
||||||
|
backgroundCircle.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
MapActivity mapActivity = getMapActivity();
|
||||||
|
if (mapActivity != null) {
|
||||||
|
CustomColorBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), target, TrackColoringCard.INVALID_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return colorItemView;
|
||||||
|
}
|
||||||
|
|
||||||
|
private View createDividerView(FlowLayout rootView) {
|
||||||
|
LayoutInflater themedInflater = UiUtilities.getInflater(view.getContext(), nightMode);
|
||||||
|
View divider = themedInflater.inflate(R.layout.simple_divider_item, rootView, false);
|
||||||
|
|
||||||
|
LinearLayout dividerContainer = new LinearLayout(view.getContext());
|
||||||
|
dividerContainer.addView(divider);
|
||||||
|
dividerContainer.setPadding(0, AndroidUtils.dpToPx(app, 1), 0, AndroidUtils.dpToPx(app, 5));
|
||||||
|
|
||||||
|
return dividerContainer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private View createCircleView(ViewGroup rootView) {
|
||||||
|
LayoutInflater themedInflater = UiUtilities.getInflater(view.getContext(), nightMode);
|
||||||
|
View circleView = themedInflater.inflate(R.layout.point_editor_button, rootView, false);
|
||||||
|
ImageView outline = circleView.findViewById(R.id.outline);
|
||||||
|
int colorId = nightMode ? R.color.stroked_buttons_and_links_outline_dark : R.color.stroked_buttons_and_links_outline_light;
|
||||||
|
Drawable contourIcon = app.getUIUtilities().getIcon(R.drawable.bg_point_circle_contour, colorId);
|
||||||
|
outline.setImageDrawable(contourIcon);
|
||||||
|
return circleView;
|
||||||
|
}
|
||||||
|
|
||||||
private void updateColorSelector(int color, View rootView) {
|
private void updateColorSelector(int color, View rootView) {
|
||||||
View oldColor = rootView.findViewWithTag(trackDrawInfo.getColor());
|
View oldColor = rootView.findViewWithTag(trackDrawInfo.getColor());
|
||||||
if (oldColor != null) {
|
if (oldColor != null) {
|
||||||
|
@ -175,6 +271,29 @@ public class TrackColoringCard extends BaseCard {
|
||||||
updateColorSelector();
|
updateColorSelector();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onColorSelected(int prevColor, int newColor) {
|
||||||
|
if (prevColor == INVALID_VALUE && customColors.size() < 6) {
|
||||||
|
customColors.add(newColor);
|
||||||
|
} else if (!Algorithms.isEmpty(customColors)) {
|
||||||
|
int index = customColors.indexOf(prevColor);
|
||||||
|
if (index != INVALID_VALUE) {
|
||||||
|
customColors.set(index, newColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
saveCustomColors();
|
||||||
|
updateContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveCustomColors() {
|
||||||
|
List<String> colorNames = new ArrayList<>();
|
||||||
|
for (Integer color : customColors) {
|
||||||
|
String colorHex = Algorithms.colorToString(color);
|
||||||
|
colorNames.add(colorHex);
|
||||||
|
}
|
||||||
|
app.getSettings().CUSTOM_TRACK_COLORS.setStringsList(colorNames);
|
||||||
|
}
|
||||||
|
|
||||||
private class TrackColoringAdapter extends RecyclerView.Adapter<TrackAppearanceViewHolder> {
|
private class TrackColoringAdapter extends RecyclerView.Adapter<TrackAppearanceViewHolder> {
|
||||||
|
|
||||||
private List<TrackAppearanceItem> items;
|
private List<TrackAppearanceItem> items;
|
||||||
|
|
|
@ -109,6 +109,10 @@ public class TrackDrawInfo {
|
||||||
this.showArrows = showArrows;
|
this.showArrows = showArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setShowStartFinish(boolean showStartFinish) {
|
||||||
|
this.showStartFinish = showStartFinish;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isShowStartFinish() {
|
public boolean isShowStartFinish() {
|
||||||
return showStartFinish;
|
return showStartFinish;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,9 +89,10 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
private Paint paint;
|
private Paint paint;
|
||||||
private Paint shadowPaint;
|
private Paint shadowPaint;
|
||||||
private Paint paintIcon;
|
private Paint paintIcon;
|
||||||
|
|
||||||
private int cachedHash;
|
private int cachedHash;
|
||||||
|
@ColorInt
|
||||||
private int cachedColor;
|
private int cachedColor;
|
||||||
private int currentTrackColor;
|
|
||||||
private float defaultTrackWidth;
|
private float defaultTrackWidth;
|
||||||
private Map<String, Float> cachedTrackWidth = new HashMap<>();
|
private Map<String, Float> cachedTrackWidth = new HashMap<>();
|
||||||
|
|
||||||
|
@ -129,8 +130,13 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
@ColorInt
|
@ColorInt
|
||||||
private int grayColor;
|
private int grayColor;
|
||||||
|
|
||||||
private CommonPreference<String> currentTrackColorPref;
|
private CommonPreference<String> defaultTrackColorPref;
|
||||||
|
private CommonPreference<String> defaultTrackWidthPref;
|
||||||
|
|
||||||
|
private CommonPreference<Integer> currentTrackColorPref;
|
||||||
private CommonPreference<String> currentTrackWidthPref;
|
private CommonPreference<String> currentTrackWidthPref;
|
||||||
|
private CommonPreference<Boolean> currentTrackShowArrowsPref;
|
||||||
|
private CommonPreference<Boolean> currentTrackShowStartFinishPref;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initLayer(OsmandMapTileView view) {
|
public void initLayer(OsmandMapTileView view) {
|
||||||
|
@ -138,8 +144,14 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
selectedGpxHelper = view.getApplication().getSelectedGpxHelper();
|
selectedGpxHelper = view.getApplication().getSelectedGpxHelper();
|
||||||
mapMarkersHelper = view.getApplication().getMapMarkersHelper();
|
mapMarkersHelper = view.getApplication().getMapMarkersHelper();
|
||||||
osmandRenderer = view.getApplication().getResourceManager().getRenderer().getRenderer();
|
osmandRenderer = view.getApplication().getResourceManager().getRenderer().getRenderer();
|
||||||
currentTrackColorPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR);
|
|
||||||
currentTrackWidthPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR);
|
currentTrackColorPref = view.getSettings().CURRENT_TRACK_COLOR;
|
||||||
|
currentTrackWidthPref = view.getSettings().CURRENT_TRACK_WIDTH;
|
||||||
|
currentTrackShowArrowsPref = view.getSettings().CURRENT_TRACK_SHOW_ARROWS;
|
||||||
|
currentTrackShowStartFinishPref = view.getSettings().CURRENT_TRACK_SHOW_START_FINISH;
|
||||||
|
defaultTrackColorPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_COLOR_ATTR).cache();
|
||||||
|
defaultTrackWidthPref = view.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR).cache();
|
||||||
|
|
||||||
initUI();
|
initUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +240,6 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||||
List<SelectedGpxFile> selectedGPXFiles = selectedGpxHelper.getSelectedGPXFiles();
|
List<SelectedGpxFile> selectedGPXFiles = selectedGpxHelper.getSelectedGPXFiles();
|
||||||
cache.clear();
|
cache.clear();
|
||||||
currentTrackColor = view.getSettings().CURRENT_TRACK_COLOR.get();
|
|
||||||
if (!selectedGPXFiles.isEmpty()) {
|
if (!selectedGPXFiles.isEmpty()) {
|
||||||
drawSelectedFilesSegments(canvas, tileBox, selectedGPXFiles, settings);
|
drawSelectedFilesSegments(canvas, tileBox, selectedGPXFiles, settings);
|
||||||
canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
||||||
|
@ -249,7 +260,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer();
|
RenderingRulesStorage rrs = view.getApplication().getRendererRegistry().getCurrentSelectedRenderer();
|
||||||
boolean nightMode = drawSettings != null && drawSettings.isNightMode();
|
boolean nightMode = drawSettings != null && drawSettings.isNightMode();
|
||||||
int hash = calculateHash(rrs, cachedTrackWidth, routePoints, nightMode, tileBox.getMapDensity(), tileBox.getZoom(),
|
int hash = calculateHash(rrs, cachedTrackWidth, routePoints, nightMode, tileBox.getMapDensity(), tileBox.getZoom(),
|
||||||
currentTrackColorPref.get(), currentTrackWidthPref.get());
|
defaultTrackColorPref.get(), defaultTrackWidthPref.get());
|
||||||
if (hash != cachedHash) {
|
if (hash != cachedHash) {
|
||||||
cachedHash = hash;
|
cachedHash = hash;
|
||||||
cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track);
|
cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track);
|
||||||
|
@ -257,16 +268,16 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
if (rrs != null) {
|
if (rrs != null) {
|
||||||
RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs);
|
RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs);
|
||||||
req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, nightMode);
|
req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, nightMode);
|
||||||
if (currentTrackColorPref != null && currentTrackColorPref.isSet()) {
|
if (defaultTrackColorPref != null && defaultTrackColorPref.isSet()) {
|
||||||
RenderingRuleProperty ctColor = rrs.PROPS.get(CURRENT_TRACK_COLOR_ATTR);
|
RenderingRuleProperty ctColor = rrs.PROPS.get(CURRENT_TRACK_COLOR_ATTR);
|
||||||
if (ctColor != null) {
|
if (ctColor != null) {
|
||||||
req.setStringFilter(ctColor, currentTrackColorPref.get());
|
req.setStringFilter(ctColor, defaultTrackColorPref.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (currentTrackWidthPref != null && currentTrackWidthPref.isSet()) {
|
if (defaultTrackWidthPref != null && defaultTrackWidthPref.isSet()) {
|
||||||
RenderingRuleProperty ctWidth = rrs.PROPS.get(CURRENT_TRACK_WIDTH_ATTR);
|
RenderingRuleProperty ctWidth = rrs.PROPS.get(CURRENT_TRACK_WIDTH_ATTR);
|
||||||
if (ctWidth != null) {
|
if (ctWidth != null) {
|
||||||
req.setStringFilter(ctWidth, currentTrackWidthPref.get());
|
req.setStringFilter(ctWidth, defaultTrackWidthPref.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String additional = "";
|
String additional = "";
|
||||||
|
@ -305,10 +316,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paint.setColor(color == 0 ? cachedColor : color);
|
paint.setColor(color == 0 ? cachedColor : color);
|
||||||
Float strikeWidth = cachedTrackWidth.get(width);
|
paint.setStrokeWidth(getTrackWidth(width, defaultTrackWidth));
|
||||||
if (strikeWidth != null) {
|
|
||||||
paint.setStrokeWidth(strikeWidth);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void acquireTrackWidth(String widthKey, RenderingRulesStorage rrs, RenderingRuleSearchRequest req, RenderingContext rc) {
|
private void acquireTrackWidth(String widthKey, RenderingRulesStorage rrs, RenderingRuleSearchRequest req, RenderingContext rc) {
|
||||||
|
@ -342,17 +350,10 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
if (tileBox.getZoom() >= START_ZOOM) {
|
if (tileBox.getZoom() >= START_ZOOM) {
|
||||||
// request to load
|
// request to load
|
||||||
OsmandApplication app = view.getApplication();
|
OsmandApplication app = view.getApplication();
|
||||||
for (SelectedGpxFile g : selectedGPXFiles) {
|
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
||||||
List<GpxDisplayGroup> groups = g.getDisplayGroups(app);
|
List<GpxDisplayGroup> groups = selectedGpxFile.getDisplayGroups(app);
|
||||||
if (groups != null && !groups.isEmpty()) {
|
if (!Algorithms.isEmpty(groups)) {
|
||||||
int color = g.getGpxFile().getColor(0);
|
int color = getTrackColor(selectedGpxFile.getGpxFile(), cachedColor);
|
||||||
if (color == 0) {
|
|
||||||
color = g.getModifiableGpxFile().getColor(0);
|
|
||||||
}
|
|
||||||
if (color == 0) {
|
|
||||||
color = cachedColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
paintInnerRect.setColor(color);
|
paintInnerRect.setColor(color);
|
||||||
paintInnerRect.setAlpha(179);
|
paintInnerRect.setAlpha(179);
|
||||||
|
|
||||||
|
@ -373,15 +374,15 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
int r = (int) (12 * tileBox.getDensity());
|
int r = (int) (12 * tileBox.getDensity());
|
||||||
paintTextIcon.setTextSize(r);
|
paintTextIcon.setTextSize(r);
|
||||||
int dr = r * 3 / 2;
|
int dr = r * 3 / 2;
|
||||||
int px = -1;
|
float px = -1;
|
||||||
int py = -1;
|
float py = -1;
|
||||||
for (int k = 0; k < items.size(); k++) {
|
for (int k = 0; k < items.size(); k++) {
|
||||||
GpxDisplayItem i = items.get(k);
|
GpxDisplayItem i = items.get(k);
|
||||||
WptPt o = i.locationEnd;
|
WptPt point = i.locationEnd;
|
||||||
if (o != null && o.lat >= latLonBounds.bottom && o.lat <= latLonBounds.top && o.lon >= latLonBounds.left
|
if (point != null && point.lat >= latLonBounds.bottom && point.lat <= latLonBounds.top
|
||||||
&& o.lon <= latLonBounds.right) {
|
&& point.lon >= latLonBounds.left && point.lon <= latLonBounds.right) {
|
||||||
int x = (int) tileBox.getPixXFromLatLon(o.lat, o.lon);
|
float x = tileBox.getPixXFromLatLon(point.lat, point.lon);
|
||||||
int y = (int) tileBox.getPixYFromLatLon(o.lat, o.lon);
|
float y = tileBox.getPixYFromLatLon(point.lat, point.lon);
|
||||||
if (px != -1 || py != -1) {
|
if (px != -1 || py != -1) {
|
||||||
if (Math.abs(x - px) <= dr && Math.abs(y - py) <= dr) {
|
if (Math.abs(x - px) <= dr && Math.abs(y - py) <= dr) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -389,25 +390,26 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
}
|
}
|
||||||
px = x;
|
px = x;
|
||||||
py = y;
|
py = y;
|
||||||
String nm = i.splitName;
|
String name = i.splitName;
|
||||||
if (nm != null) {
|
if (name != null) {
|
||||||
int ind = nm.indexOf(' ');
|
int ind = name.indexOf(' ');
|
||||||
if (ind > 0) {
|
if (ind > 0) {
|
||||||
nm = nm.substring(0, ind);
|
name = name.substring(0, ind);
|
||||||
}
|
}
|
||||||
Rect bounds = new Rect();
|
Rect bounds = new Rect();
|
||||||
paintTextIcon.getTextBounds(nm, 0, nm.length(), bounds);
|
paintTextIcon.getTextBounds(name, 0, name.length(), bounds);
|
||||||
int nmWidth = bounds.width();
|
|
||||||
int nmHeight = bounds.height();
|
float nameHalfWidth = bounds.width() / 2f;
|
||||||
RectF rect = new RectF(x - nmWidth / 2 - 2 * (float) Math.ceil(tileBox.getDensity()),
|
float nameHalfHeight = bounds.height() / 2f;
|
||||||
y + nmHeight / 2 + 3 * (float) Math.ceil(tileBox.getDensity()),
|
float density = (float) Math.ceil(tileBox.getDensity());
|
||||||
x + nmWidth / 2 + 3 * (float) Math.ceil(tileBox.getDensity()),
|
RectF rect = new RectF(x - nameHalfWidth - 2 * density,
|
||||||
y - nmHeight / 2 - 2 * (float) Math.ceil(tileBox.getDensity()));
|
y + nameHalfHeight + 3 * density,
|
||||||
|
x + nameHalfWidth + 3 * density,
|
||||||
|
y - nameHalfHeight - 2 * density);
|
||||||
|
|
||||||
canvas.drawRoundRect(rect, 0, 0, paintInnerRect);
|
canvas.drawRoundRect(rect, 0, 0, paintInnerRect);
|
||||||
canvas.drawRoundRect(rect, 0, 0, paintOuterRect);
|
canvas.drawRoundRect(rect, 0, 0, paintOuterRect);
|
||||||
// canvas.drawRect(rect, paintInnerRect);
|
canvas.drawText(name, x, y + nameHalfHeight, paintTextIcon);
|
||||||
// canvas.drawRect(rect, paintOuterRect);
|
|
||||||
canvas.drawText(nm, x, y + nmHeight / 2, paintTextIcon);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,25 +418,12 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
private void drawDirectionArrows(Canvas canvas, RotatedTileBox tileBox, List<SelectedGpxFile> selectedGPXFiles) {
|
private void drawDirectionArrows(Canvas canvas, RotatedTileBox tileBox, List<SelectedGpxFile> selectedGPXFiles) {
|
||||||
if (!tileBox.isZoomAnimated()) {
|
if (!tileBox.isZoomAnimated()) {
|
||||||
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
||||||
boolean showArrows = selectedGpxFile.getGpxFile().isShowArrows();
|
boolean showArrows = isShowArrowsForTrack(selectedGpxFile.getGpxFile());
|
||||||
if (hasTrackDrawInfoForSelectedGpx(selectedGpxFile)) {
|
|
||||||
showArrows = trackDrawInfo.isShowArrows();
|
|
||||||
}
|
|
||||||
if (showArrows) {
|
if (showArrows) {
|
||||||
QuadRect correctedQuadRect = getCorrectedQuadRect(tileBox.getLatLonBounds());
|
QuadRect correctedQuadRect = getCorrectedQuadRect(tileBox.getLatLonBounds());
|
||||||
String width = selectedGpxFile.getGpxFile().getWidth(currentTrackWidthPref.get());
|
String width = getTrackWidthName(selectedGpxFile.getGpxFile(), "");
|
||||||
int color = selectedGpxFile.getGpxFile().getColor(cachedColor);
|
float trackWidth = getTrackWidth(width, defaultTrackWidth);
|
||||||
if (selectedGpxFile.isShowCurrentTrack()) {
|
int color = getTrackColor(selectedGpxFile.getGpxFile(), cachedColor);
|
||||||
color = currentTrackColor;
|
|
||||||
}
|
|
||||||
if (hasTrackDrawInfoForSelectedGpx(selectedGpxFile)) {
|
|
||||||
color = trackDrawInfo.getColor();
|
|
||||||
width = trackDrawInfo.getWidth();
|
|
||||||
}
|
|
||||||
Float trackWidth = cachedTrackWidth.get(width);
|
|
||||||
if (trackWidth == null) {
|
|
||||||
trackWidth = defaultTrackWidth;
|
|
||||||
}
|
|
||||||
int contrastColor = UiUtilities.getContrastColor(view.getApplication(), color, false);
|
int contrastColor = UiUtilities.getContrastColor(view.getApplication(), color, false);
|
||||||
GeometryWayStyle arrowsWayStyle = new GeometryArrowsWayStyle(wayContext, arrowBitmap, contrastColor, color, trackWidth);
|
GeometryWayStyle arrowsWayStyle = new GeometryArrowsWayStyle(wayContext, arrowBitmap, contrastColor, color, trackWidth);
|
||||||
for (TrkSegment segment : selectedGpxFile.getPointsToDisplay()) {
|
for (TrkSegment segment : selectedGpxFile.getPointsToDisplay()) {
|
||||||
|
@ -587,10 +576,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
private void drawSelectedFilesStartEndPoints(Canvas canvas, RotatedTileBox tileBox, List<SelectedGpxFile> selectedGPXFiles) {
|
private void drawSelectedFilesStartEndPoints(Canvas canvas, RotatedTileBox tileBox, List<SelectedGpxFile> selectedGPXFiles) {
|
||||||
if (tileBox.getZoom() >= START_ZOOM) {
|
if (tileBox.getZoom() >= START_ZOOM) {
|
||||||
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
||||||
boolean showStartFinish = selectedGpxFile.getGpxFile().isShowStartFinish();
|
boolean showStartFinish = isShowStartFinishForTrack(selectedGpxFile.getGpxFile());
|
||||||
if (hasTrackDrawInfoForSelectedGpx(selectedGpxFile)) {
|
|
||||||
showStartFinish = trackDrawInfo.isShowStartFinish();
|
|
||||||
}
|
|
||||||
if (showStartFinish) {
|
if (showStartFinish) {
|
||||||
List<TrkSegment> segments = selectedGpxFile.getPointsToDisplay();
|
List<TrkSegment> segments = selectedGpxFile.getPointsToDisplay();
|
||||||
for (TrkSegment segment : segments) {
|
for (TrkSegment segment : segments) {
|
||||||
|
@ -605,11 +591,6 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasTrackDrawInfoForSelectedGpx(SelectedGpxFile selectedGpxFile) {
|
|
||||||
return trackDrawInfo != null && (trackDrawInfo.isCurrentRecording() && selectedGpxFile.isShowCurrentTrack()
|
|
||||||
|| selectedGpxFile.getGpxFile().path.equals(trackDrawInfo.getFilePath()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void drawStartEndPoints(Canvas canvas, RotatedTileBox tileBox, WptPt start, WptPt end) {
|
private void drawStartEndPoints(Canvas canvas, RotatedTileBox tileBox, WptPt start, WptPt end) {
|
||||||
int startX = (int) tileBox.getPixXFromLatLon(start.lat, start.lon);
|
int startX = (int) tileBox.getPixXFromLatLon(start.lat, start.lon);
|
||||||
int startY = (int) tileBox.getPixYFromLatLon(start.lat, start.lon);
|
int startY = (int) tileBox.getPixYFromLatLon(start.lat, start.lon);
|
||||||
|
@ -717,13 +698,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
private void drawXAxisPoints(Canvas canvas, RotatedTileBox tileBox) {
|
private void drawXAxisPoints(Canvas canvas, RotatedTileBox tileBox) {
|
||||||
int color = trackChartPoints.getSegmentColor();
|
int color = trackChartPoints.getSegmentColor();
|
||||||
if (color == 0) {
|
if (color == 0) {
|
||||||
color = trackChartPoints.getGpx().getColor(0);
|
color = getTrackColor(trackChartPoints.getGpx(), cachedColor);
|
||||||
if (trackChartPoints.getGpx().showCurrentTrack) {
|
|
||||||
color = currentTrackColor;
|
|
||||||
}
|
|
||||||
if (color == 0) {
|
|
||||||
color = cachedColor;
|
|
||||||
}
|
|
||||||
trackChartPoints.setSegmentColor(color);
|
trackChartPoints.setSegmentColor(color);
|
||||||
}
|
}
|
||||||
paintGridCircle.setColor(color);
|
paintGridCircle.setColor(color);
|
||||||
|
@ -782,21 +757,16 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
|
|
||||||
private void drawSelectedFilesSegments(Canvas canvas, RotatedTileBox tileBox,
|
private void drawSelectedFilesSegments(Canvas canvas, RotatedTileBox tileBox,
|
||||||
List<SelectedGpxFile> selectedGPXFiles, DrawSettings settings) {
|
List<SelectedGpxFile> selectedGPXFiles, DrawSettings settings) {
|
||||||
|
SelectedGpxFile currentTrack = null;
|
||||||
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
for (SelectedGpxFile selectedGpxFile : selectedGPXFiles) {
|
||||||
String width = selectedGpxFile.getGpxFile().getWidth(currentTrackWidthPref.get());
|
String width = getTrackWidthName(selectedGpxFile.getGpxFile(), "");
|
||||||
if (hasTrackDrawInfoForSelectedGpx(selectedGpxFile)) {
|
|
||||||
width = trackDrawInfo.getWidth();
|
|
||||||
}
|
|
||||||
if (!cachedTrackWidth.containsKey(width)) {
|
if (!cachedTrackWidth.containsKey(width)) {
|
||||||
cachedTrackWidth.put(width, null);
|
cachedTrackWidth.put(width, null);
|
||||||
}
|
}
|
||||||
}
|
if (selectedGpxFile.isShowCurrentTrack()) {
|
||||||
SelectedGpxFile currentTrack = null;
|
currentTrack = selectedGpxFile;
|
||||||
for (SelectedGpxFile g : selectedGPXFiles) {
|
|
||||||
if (g.isShowCurrentTrack()) {
|
|
||||||
currentTrack = g;
|
|
||||||
} else {
|
} else {
|
||||||
drawSelectedFileSegments(g, false, canvas, tileBox, settings);
|
drawSelectedFileSegments(selectedGpxFile, false, canvas, tileBox, settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (currentTrack != null) {
|
if (currentTrack != null) {
|
||||||
|
@ -808,18 +778,8 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
RotatedTileBox tileBox, DrawSettings settings) {
|
RotatedTileBox tileBox, DrawSettings settings) {
|
||||||
List<TrkSegment> segments = selectedGpxFile.getPointsToDisplay();
|
List<TrkSegment> segments = selectedGpxFile.getPointsToDisplay();
|
||||||
for (TrkSegment ts : segments) {
|
for (TrkSegment ts : segments) {
|
||||||
String width = selectedGpxFile.getGpxFile().getWidth(currentTrackWidthPref.get());
|
String width = getTrackWidthName(selectedGpxFile.getGpxFile(), "");
|
||||||
int color = selectedGpxFile.getGpxFile().getColor(0);
|
int color = getTrackColor(selectedGpxFile.getGpxFile(), ts.getColor(cachedColor));
|
||||||
if (currentTrack) {
|
|
||||||
color = currentTrackColor;
|
|
||||||
}
|
|
||||||
if (color == 0) {
|
|
||||||
color = ts.getColor(cachedColor);
|
|
||||||
}
|
|
||||||
if (hasTrackDrawInfoForSelectedGpx(selectedGpxFile)) {
|
|
||||||
color = trackDrawInfo.getColor();
|
|
||||||
width = trackDrawInfo.getWidth();
|
|
||||||
}
|
|
||||||
if (ts.renderer == null && !ts.points.isEmpty()) {
|
if (ts.renderer == null && !ts.points.isEmpty()) {
|
||||||
if (currentTrack) {
|
if (currentTrack) {
|
||||||
ts.renderer = new Renderable.CurrentTrack(ts.points);
|
ts.renderer = new Renderable.CurrentTrack(ts.points);
|
||||||
|
@ -834,6 +794,60 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float getTrackWidth(String width, float defaultTrackWidth) {
|
||||||
|
Float trackWidth = cachedTrackWidth.get(width);
|
||||||
|
return trackWidth != null ? trackWidth : defaultTrackWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getTrackColor(GPXFile gpxFile, int defaultColor) {
|
||||||
|
int color;
|
||||||
|
if (hasTrackDrawInfoForTrack(gpxFile)) {
|
||||||
|
color = trackDrawInfo.getColor();
|
||||||
|
} else if (gpxFile.showCurrentTrack) {
|
||||||
|
color = currentTrackColorPref.get();
|
||||||
|
} else {
|
||||||
|
color = gpxFile.getColor(defaultColor);
|
||||||
|
}
|
||||||
|
return color != 0 ? color : defaultColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getTrackWidthName(GPXFile gpxFile, String defaultWidth) {
|
||||||
|
String width;
|
||||||
|
if (hasTrackDrawInfoForTrack(gpxFile)) {
|
||||||
|
width = trackDrawInfo.getWidth();
|
||||||
|
} else if (gpxFile.showCurrentTrack) {
|
||||||
|
width = currentTrackWidthPref.get();
|
||||||
|
} else {
|
||||||
|
width = gpxFile.getWidth(defaultWidth);
|
||||||
|
}
|
||||||
|
return width != null ? width : defaultWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isShowArrowsForTrack(GPXFile gpxFile) {
|
||||||
|
if (hasTrackDrawInfoForTrack(gpxFile)) {
|
||||||
|
return trackDrawInfo.isShowArrows();
|
||||||
|
} else if (gpxFile.showCurrentTrack) {
|
||||||
|
return currentTrackShowArrowsPref.get();
|
||||||
|
} else {
|
||||||
|
return gpxFile.isShowArrows();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isShowStartFinishForTrack(GPXFile gpxFile) {
|
||||||
|
if (hasTrackDrawInfoForTrack(gpxFile)) {
|
||||||
|
return trackDrawInfo.isShowStartFinish();
|
||||||
|
} else if (gpxFile.showCurrentTrack) {
|
||||||
|
return currentTrackShowStartFinishPref.get();
|
||||||
|
} else {
|
||||||
|
return gpxFile.isShowStartFinish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasTrackDrawInfoForTrack(GPXFile gpxFile) {
|
||||||
|
return trackDrawInfo != null && (trackDrawInfo.isCurrentRecording() && gpxFile.showCurrentTrack
|
||||||
|
|| gpxFile.path.equals(trackDrawInfo.getFilePath()));
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isPointVisited(WptPt o) {
|
private boolean isPointVisited(WptPt o) {
|
||||||
boolean visit = false;
|
boolean visit = false;
|
||||||
String visited = o.getExtensionsToRead().get("VISITED_KEY");
|
String visited = o.getExtensionsToRead().get("VISITED_KEY");
|
||||||
|
|
|
@ -172,25 +172,43 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setQuickActionButtonMargin() {
|
private void setQuickActionButtonMargin() {
|
||||||
|
int defRightMargin = calculateTotalSizePx(R.dimen.map_button_size, R.dimen.map_button_spacing_land) * 2;
|
||||||
|
int defBottomMargin = calculateTotalSizePx(R.dimen.map_button_size, R.dimen.map_button_spacing) * 2;
|
||||||
FrameLayout.LayoutParams param = (FrameLayout.LayoutParams) quickActionButton.getLayoutParams();
|
FrameLayout.LayoutParams param = (FrameLayout.LayoutParams) quickActionButton.getLayoutParams();
|
||||||
if (AndroidUiHelper.isOrientationPortrait(mapActivity)) {
|
if (AndroidUiHelper.isOrientationPortrait(mapActivity)) {
|
||||||
Pair<Integer, Integer> fabMargin = settings.getPortraitFabMargin();
|
Pair<Integer, Integer> fabMargin = settings.getPortraitFabMargin();
|
||||||
if (fabMargin != null) {
|
setQuickActionButtonMargin(param, fabMargin, 0, defBottomMargin);
|
||||||
param.rightMargin = fabMargin.first;
|
|
||||||
param.bottomMargin = fabMargin.second;
|
|
||||||
} else {
|
|
||||||
param.bottomMargin = calculateTotalSizePx(R.dimen.map_button_size, R.dimen.map_button_spacing) * 2;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Pair<Integer, Integer> fabMargin = settings.getLandscapeFabMargin();
|
Pair<Integer, Integer> fabMargin = settings.getLandscapeFabMargin();
|
||||||
|
setQuickActionButtonMargin(param, fabMargin, defRightMargin, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setQuickActionButtonMargin(FrameLayout.LayoutParams params,
|
||||||
|
Pair<Integer, Integer> fabMargin,
|
||||||
|
int defRightMargin, int defBottomMargin) {
|
||||||
|
int screenHeight = AndroidUtils.getScreenHeight(mapActivity);
|
||||||
|
int screenWidth = AndroidUtils.getScreenWidth(mapActivity);
|
||||||
|
int btnHeight = quickActionButton.getHeight();
|
||||||
|
int btnWidth = quickActionButton.getWidth();
|
||||||
|
int rightMargin;
|
||||||
|
int bottomMargin;
|
||||||
if (fabMargin != null) {
|
if (fabMargin != null) {
|
||||||
param.rightMargin = fabMargin.first;
|
rightMargin = fabMargin.first;
|
||||||
param.bottomMargin = fabMargin.second;
|
bottomMargin = fabMargin.second;
|
||||||
|
if (rightMargin < 0 || rightMargin > screenWidth - btnWidth) {
|
||||||
|
rightMargin = defRightMargin;
|
||||||
|
}
|
||||||
|
if (bottomMargin < 0 || bottomMargin > screenHeight - btnHeight) {
|
||||||
|
bottomMargin = defBottomMargin;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
param.rightMargin = calculateTotalSizePx(R.dimen.map_button_size, R.dimen.map_button_spacing_land) * 2;
|
rightMargin = defRightMargin;
|
||||||
|
bottomMargin = defBottomMargin;
|
||||||
}
|
}
|
||||||
}
|
params.rightMargin = rightMargin;
|
||||||
quickActionButton.setLayoutParams(param);
|
params.bottomMargin = bottomMargin;
|
||||||
|
quickActionButton.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateTotalSizePx(@DimenRes int... dimensId) {
|
private int calculateTotalSizePx(@DimenRes int... dimensId) {
|
||||||
|
|
|
@ -977,6 +977,9 @@ public class MapInfoWidgetsFactory {
|
||||||
updateVisibility(true);
|
updateVisibility(true);
|
||||||
AndroidUiHelper.updateVisibility(addressText, false);
|
AndroidUiHelper.updateVisibility(addressText, false);
|
||||||
AndroidUiHelper.updateVisibility(addressTextShadow, false);
|
AndroidUiHelper.updateVisibility(addressTextShadow, false);
|
||||||
|
AndroidUiHelper.updateVisibility(turnIcon, false);
|
||||||
|
AndroidUiHelper.updateVisibility(shieldIcon, false);
|
||||||
|
AndroidUiHelper.updateVisibility(exitRefText, false);
|
||||||
} else if (streetName == null) {
|
} else if (streetName == null) {
|
||||||
updateVisibility(false);
|
updateVisibility(false);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue