This commit is contained in:
xmd5a 2015-01-01 14:13:38 +03:00
commit fc1338f26c
219 changed files with 7356 additions and 2478 deletions

15
.gitignore vendored
View file

@ -11,10 +11,23 @@ g_*.png
mm_*.png
mx_*.png
OsmAndCore_wrapper.jar
OsmAndCore_android.aar
OsmAndCore_*.aar
*.class
*.iml
.settings
.idea
out/
# Android Studio
/.idea
*.iml
# Gradle
.gradle
/local.properties
# MacOSX
.DS_Store
# Output files
/build

View file

@ -1,6 +1,6 @@
OsmAnd OSM Automated Navigation Directions navigation software based on OpenStreetMap.
Copyright © 20102014 OsmAnd (Amstelveen, Netherlands - KvK 55730183).
Copyright © 20102014 OsmAnd BV (Amstelveen, Netherlands - KvK 62066714).
The code in that repository is mainly covered by *GPLv3*, except some 3rd party libs and resources.
ATTENTION: please be aware that some artwork has proprietary license.

View file

@ -4,3 +4,17 @@ OsmAnd-core.jar
protobuf-src/com
OsmAnd-core-android.jar
src/net/osmand/core/jni/*
# Android Studio
/.idea
*.iml
# Gradle
.gradle
/local.properties
# MacOSX
.DS_Store
# Output
/build

15
OsmAnd-java/build.gradle Normal file
View file

@ -0,0 +1,15 @@
apply plugin: 'java'
jar {
sourceSets {
main {
java {
srcDirs = ["src"]
}
}
}
}
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
}

View file

@ -3,7 +3,7 @@
set -e
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CORE_LOC="$SCRIPT_LOC/../../core"
CORE_LOC="$SCRIPT_LOC/../../core-legacy"
if [[ "$(uname -a)" =~ Linux ]]; then
if [[ -z "$OSMAND_BUILD_CPU_CORES_NUM" ]]; then

View file

@ -1,28 +1,31 @@
package net.osmand.map;
import java.io.IOException;
public interface ITileSource {
public int getMaximumZoomSupported();
public String getName();
public int getTileSize();
public String getUrlToLoad(int x, int y, int zoom);
public byte[] getBytes(int x, int y, int zoom, String dirWithTiles) throws IOException;
public int getMinimumZoomSupported();
public String getTileFormat();
public int getBitDensity();
public boolean isEllipticYTile();
public boolean couldBeDownloadedFromInternet();
public int getExpirationTimeMillis();
public int getExpirationTimeMinutes();
}

View file

@ -2,6 +2,7 @@ package net.osmand.map;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@ -18,6 +19,7 @@ import java.util.List;
import java.util.Map;
import net.osmand.PlatformUtil;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
import org.xmlpull.v1.XmlPullParser;
@ -215,6 +217,27 @@ public class TileSourceManager {
public String getRule() {
return rule;
}
public String calculateTileId(int x, int y, int zoom) {
StringBuilder builder = new StringBuilder(getName());
builder.append('/');
builder.append(zoom).append('/').append(x).append('/').append(y).append(getTileFormat()).append(".tile"); //$NON-NLS-1$ //$NON-NLS-2$
return builder.toString();
}
@Override
public byte[] getBytes(int x, int y, int zoom, String dirWithTiles) throws IOException {
File f = new File(dirWithTiles, calculateTileId(x, y, zoom));
if (!f.exists())
return null;
ByteArrayOutputStream bous = new ByteArrayOutputStream();
FileInputStream fis = new FileInputStream(f);
Algorithms.streamCopy(fis, bous);
fis.close();
bous.close();
return bous.toByteArray();
}
}
private static Map<String, String> readMetaInfoFile(File dir) {

View file

@ -166,7 +166,7 @@ public class RenderingRuleProperty {
try {
return parseColor(value);
} catch (RuntimeException e) {
log.error("Rendering parse " + e.getMessage());
log.error("Rendering parse " + e.getMessage() + " in " + attrName);
}
return -1;
} else if(type == FLOAT_TYPE){
@ -178,7 +178,7 @@ public class RenderingRuleProperty {
}
return 0;
} catch (NumberFormatException e) {
log.error("Rendering parse " + value);
log.error("Rendering parse " + value + " in " + attrName);
}
return -1;
} else {
@ -198,7 +198,7 @@ public class RenderingRuleProperty {
}
return Float.parseFloat(value);
} catch (NumberFormatException e) {
log.error("Rendering parse " + value);
log.error("Rendering parse " + value + " in " + attrName);
}
return -1;
} else {

View file

@ -27,30 +27,38 @@ public class RenderingRuleStorageProperties {
public static final String SHADOW_RADIUS = "shadowRadius";
public static final String SHADOW_COLOR = "shadowColor";
public static final String SHADER = "shader";
public static final String CAP_5 = "cap_5";
public static final String CAP_4 = "cap_4";
public static final String CAP_3 = "cap_3";
public static final String CAP_2 = "cap_2";
public static final String CAP = "cap";
public static final String CAP_0 = "cap_0";
public static final String CAP__1 = "cap__1";
public static final String CAP__2 = "cap__2";
public static final String PATH_EFFECT_5 = "pathEffect_5";
public static final String PATH_EFFECT_4 = "pathEffect_4";
public static final String PATH_EFFECT_3 = "pathEffect_3";
public static final String PATH_EFFECT_2 = "pathEffect_2";
public static final String PATH_EFFECT = "pathEffect";
public static final String PATH_EFFECT_0 = "pathEffect_0";
public static final String PATH_EFFECT__1 = "pathEffect__1";
public static final String PATH_EFFECT__2 = "pathEffect__2";
public static final String STROKE_WIDTH_5 = "strokeWidth_5";
public static final String STROKE_WIDTH_4 = "strokeWidth_4";
public static final String STROKE_WIDTH_3 = "strokeWidth_3";
public static final String STROKE_WIDTH_2 = "strokeWidth_2";
public static final String STROKE_WIDTH = "strokeWidth";
public static final String STROKE_WIDTH_0 = "strokeWidth_0";
public static final String STROKE_WIDTH__1 = "strokeWidth__1";
public static final String STROKE_WIDTH__2 = "strokeWidth__2";
public static final String COLOR_5 = "color_5";
public static final String COLOR_4 = "color_4";
public static final String COLOR_3 = "color_3";
public static final String COLOR = "color";
public static final String COLOR_2 = "color_2";
public static final String COLOR_0 = "color_0";
public static final String COLOR__1 = "color__1";
public static final String COLOR__2 = "color__2";
public static final String TEXT_BOLD = "textBold";
public static final String TEXT_ORDER = "textOrder";
public static final String ICON_ORDER = "iconOrder";
@ -93,36 +101,49 @@ public class RenderingRuleStorageProperties {
public RenderingRuleProperty R_SHADOW_RADIUS;
public RenderingRuleProperty R_SHADOW_COLOR;
public RenderingRuleProperty R_SHADER;
public RenderingRuleProperty R_CAP_5;
public RenderingRuleProperty R_CAP_4;
public RenderingRuleProperty R_CAP_3;
public RenderingRuleProperty R_CAP_2;
public RenderingRuleProperty R_CAP;
public RenderingRuleProperty R_CAP_0;
public RenderingRuleProperty R_CAP__1;
public RenderingRuleProperty R_CAP__2;
public RenderingRuleProperty R_PATH_EFFECT_5;
public RenderingRuleProperty R_PATH_EFFECT_4;
public RenderingRuleProperty R_PATH_EFFECT_3;
public RenderingRuleProperty R_PATH_EFFECT_2;
public RenderingRuleProperty R_PATH_EFFECT;
public RenderingRuleProperty R_PATH_EFFECT_0;
public RenderingRuleProperty R_PATH_EFFECT__1;
public RenderingRuleProperty R_PATH_EFFECT__2;
public RenderingRuleProperty R_STROKE_WIDTH_5;
public RenderingRuleProperty R_STROKE_WIDTH_4;
public RenderingRuleProperty R_STROKE_WIDTH_3;
public RenderingRuleProperty R_STROKE_WIDTH_2;
public RenderingRuleProperty R_STROKE_WIDTH;
public RenderingRuleProperty R_STROKE_WIDTH_0;
public RenderingRuleProperty R_STROKE_WIDTH__1;
public RenderingRuleProperty R_STROKE_WIDTH__2;
public RenderingRuleProperty R_COLOR_5;
public RenderingRuleProperty R_COLOR_4;
public RenderingRuleProperty R_COLOR_3;
public RenderingRuleProperty R_COLOR;
public RenderingRuleProperty R_COLOR_2;
public RenderingRuleProperty R_COLOR_0;
public RenderingRuleProperty R_COLOR__1;
public RenderingRuleProperty R_COLOR__2;
public RenderingRuleProperty R_TEXT_BOLD;
public RenderingRuleProperty R_TEXT_ORDER;
public RenderingRuleProperty R_ICON_ORDER;
public RenderingRuleProperty R_TEXT_MIN_DISTANCE;
public RenderingRuleProperty R_TEXT_ON_PATH;
public RenderingRuleProperty R_ICON__1;
public RenderingRuleProperty R_ICON;
public RenderingRuleProperty R_ICON_2;
public RenderingRuleProperty R_ICON_3;
public RenderingRuleProperty R_ICON_4;
public RenderingRuleProperty R_ICON_5;
public RenderingRuleProperty R_ICON_VISIBLE_SIZE;
public RenderingRuleProperty R_LAYER;
public RenderingRuleProperty R_ORDER;
@ -211,7 +232,12 @@ public class RenderingRuleStorageProperties {
R_TEXT_ON_PATH = registerRuleInternal(RenderingRuleProperty.createOutputBooleanProperty(TEXT_ON_PATH));
// point
R_ICON__1 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty("icon__1"));
R_ICON = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(ICON));
R_ICON_2 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty("icon_2"));
R_ICON_3 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty("icon_3"));
R_ICON_4 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty("icon_4"));
R_ICON_5 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty("icon_5"));
R_SHIELD = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(SHIELD));
// polygon/way
@ -219,27 +245,37 @@ public class RenderingRuleStorageProperties {
R_COLOR_2 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR_2));
R_COLOR_3 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR_3));
R_COLOR_4 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR_4));
R_COLOR_5 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR_5));
R_COLOR_0 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR_0));
R_COLOR__1 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR__1));
R_COLOR__2 = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(COLOR__2));
R_STROKE_WIDTH = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH));
R_STROKE_WIDTH_2 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH_2));
R_STROKE_WIDTH_3 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH_3));
R_STROKE_WIDTH_4 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH_4));
R_STROKE_WIDTH_5 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH_5));
R_STROKE_WIDTH_0 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH_0));
R_STROKE_WIDTH__1 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH__1));
R_STROKE_WIDTH__2 = registerRuleInternal(RenderingRuleProperty.createOutputFloatProperty(STROKE_WIDTH__2));
R_PATH_EFFECT = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT));
R_PATH_EFFECT_2 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT_2));
R_PATH_EFFECT_3 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT_3));
R_PATH_EFFECT_4 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT_4));
R_PATH_EFFECT_5 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT_5));
R_PATH_EFFECT_0 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT_0));
R_PATH_EFFECT__1 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT__1));
R_PATH_EFFECT__2 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(PATH_EFFECT__2));
R_CAP = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP));
R_CAP_2 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP_2));
R_CAP_3 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP_3));
R_CAP_4 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP_4));
R_CAP_5 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP_5));
R_CAP_0 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP_0));
R_CAP__1 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP__1));
R_CAP__2 = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(CAP__2));
R_SHADER = registerRuleInternal(RenderingRuleProperty.createOutputStringProperty(SHADER));
R_SHADOW_COLOR = registerRuleInternal(RenderingRuleProperty.createOutputColorProperty(SHADOW_COLOR));

View file

@ -1,6 +1,8 @@
package net.osmand.util;
import java.net.URI;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -82,19 +84,30 @@ public class GeoPointParserUtil {
// google calendar
// geo:0,0?q=760 West Genesee Street Syracuse NY 13204
String qstr = "q=760 West Genesee Street Syracuse NY 13204";
url = "geo:0,0?" + qstr;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse("geo", url);
assertGeoPoint(actual, new GeoParsedPoint(qstr.replaceAll("\\s+", "+")));
// geo:0,0?z=11&q=1600+Amphitheatre+Parkway,+CA
qstr = "q=1600+Amphitheatre+Parkway,+CA";
url = "geo:0,0?z=11&" + qstr;
String qstr = "760 West Genesee Street Syracuse NY 13204";
url = "geo:0,0?q=" + qstr;
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse("geo", url);
assertGeoPoint(actual, new GeoParsedPoint(qstr));
// geo:0,0?z=11&q=1600+Amphitheatre+Parkway,+CA
qstr = "1600 Amphitheatre Parkway, CA";
url = "geo:0,0?z=11&q=" + URLEncoder.encode(qstr);
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse("geo", url);
assertGeoPoint(actual, new GeoParsedPoint(qstr));
// geo:50.451300,30.569900?z=15&q=50.451300,30.569900 (Kiev)
z = 15;
String qname = "Kiev";
double qlat = 50.4513;
double qlon = 30.5699;
url = "geo:50.451300,30.569900?z=15&q=50.451300,30.569900 (Kiev)";
System.out.println("url: " + url);
actual = GeoPointParserUtil.parse("geo", url);
assertGeoPoint(actual, new GeoParsedPoint(qlat, qlon, z, qname));
// http://download.osmand.net/go?lat=34&lon=-106&z=11
url = "http://download.osmand.net/go?lat=" + ilat + "&lon=" + ilon + "&z=" + z;
System.out.println("url: " + url);
@ -330,10 +343,10 @@ public class GeoPointParserUtil {
/**
* Parses geo and map intents:
*
*
* @param scheme
* The intent scheme
* @param data
* @param uri
* The URI object
* @return {@link GeoParsedPoint}
*/
@ -450,48 +463,79 @@ public class GeoPointParserUtil {
return null;
}
if ("geo".equals(scheme) || "osmand.geo".equals(scheme)) {
final String schemeSpecific = data.getSchemeSpecificPart();
String schemeSpecific = data.getSchemeSpecificPart();
if (schemeSpecific == null) {
return null;
}
if (schemeSpecific.startsWith("0,0?")) {
// geo:0,0?q=34.99,-106.61(Treasure Island)
// geo:0,0?z=11&q=34.99,-106.61(Treasure Island)
String query = schemeSpecific.substring("0,0?".length());
final String pattern = "(?:z=(\\d{1,2}))?&?q=([+-]?\\d+(?:\\.\\d+)?),([+-]?\\d+(?:\\.\\d+)?)[\\+]?(?:\\((.+?)\\))?";
final Matcher matcher = Pattern.compile(pattern).matcher(query);
if (matcher.matches()) {
final String z = matcher.group(1);
final String name = matcher.group(4);
final int zoom = z != null ? Integer.parseInt(z) : GeoParsedPoint.NO_ZOOM;
final double lat = Double.parseDouble(matcher.group(2));
final double lon = Double.parseDouble(matcher.group(3));
return new GeoParsedPoint(lat, lon, zoom, name);
} else {
// geo:0,0?q=1600+Amphitheatre+Parkway%2C+CA
if (query.contains("z="))
query = query.substring(query.indexOf("&") + 1);
return new GeoParsedPoint(query);
}
} else {
// geo:47.6,-122.3
// geo:47.6,-122.3?z=11 (Treasure Island)
final String pattern = "([+-]?\\d+(?:\\.\\d+)?),([+-]?\\d+(?:\\.\\d+)?)(?:(?:\\?z=(\\d{1,2}))?|(?:\\?q=.*?)?)[\\+]?(?:\\((.*?)\\))?";
final Matcher matcher = Pattern.compile(pattern).matcher(schemeSpecific);
if (matcher.matches()) {
final double lat = Double.valueOf(matcher.group(1));
final double lon = Double.valueOf(matcher.group(2));
final String name = matcher.group(4);
int zoom = matcher.group(3) != null ? Integer.parseInt(matcher.group(3)) : GeoParsedPoint.NO_ZOOM;
if (zoom != GeoParsedPoint.NO_ZOOM) {
return new GeoParsedPoint(lat, lon, zoom, name);
} else {
return new GeoParsedPoint(lat, lon, name);
}
} else {
return null;
String name = null;
final Pattern namePattern = Pattern.compile("[\\+\\s]*\\((.*)\\)[\\+\\s]*$");
final Matcher nameMatcher = namePattern.matcher(schemeSpecific);
if (nameMatcher.find()) {
name = URLDecoder.decode(nameMatcher.group(1));
if (name != null) {
schemeSpecific = schemeSpecific.substring(0, nameMatcher.start());
}
}
String positionPart;
String queryPart = "";
int queryStartIndex = schemeSpecific.indexOf('?');
if (queryStartIndex == -1) {
positionPart = schemeSpecific;
} else {
positionPart = schemeSpecific.substring(0, queryStartIndex);
if (queryStartIndex < schemeSpecific.length())
queryPart = schemeSpecific.substring(queryStartIndex + 1);
}
final Pattern positionPattern = Pattern.compile(
"([+-]?\\d+(?:\\.\\d+)?),([+-]?\\d+(?:\\.\\d+)?)");
final Matcher positionMatcher = positionPattern.matcher(positionPart);
if (!positionMatcher.find()) {
return null;
}
double lat = Double.valueOf(positionMatcher.group(1));
double lon = Double.valueOf(positionMatcher.group(2));
int zoom = GeoParsedPoint.NO_ZOOM;
String searchRequest = null;
for (String param : queryPart.split("&")) {
String paramName;
String paramValue = null;
int nameValueDelimititerIndex = param.indexOf('=');
if (nameValueDelimititerIndex == -1) {
paramName = param;
} else {
paramName = param.substring(0, nameValueDelimititerIndex);
if (nameValueDelimititerIndex < param.length())
paramValue = param.substring(nameValueDelimititerIndex + 1);
}
if ("z".equals(paramName) && paramValue != null) {
zoom = Integer.parseInt(paramValue);
} else if ("q".equals(paramName) && paramValue != null) {
searchRequest = URLDecoder.decode(paramValue);
}
}
if (searchRequest != null) {
final Matcher positionInSearchRequestMatcher =
positionPattern.matcher(searchRequest);
if (lat == 0.0 && lon == 0.0 && positionInSearchRequestMatcher.find()) {
lat = Double.valueOf(positionInSearchRequestMatcher.group(1));
lon = Double.valueOf(positionInSearchRequestMatcher.group(2));
}
}
if (lat == 0.0 && lon == 0.0 && searchRequest != null) {
return new GeoParsedPoint(searchRequest);
}
if (zoom != GeoParsedPoint.NO_ZOOM) {
return new GeoParsedPoint(lat, lon, zoom, name);
}
return new GeoParsedPoint(lat, lon, name);
}
return null;
}

19
OsmAnd/.gitignore vendored
View file

@ -17,3 +17,22 @@ assets/help/images
assets/help/screens
assets/OsmAndCore_ResourcesBundle.index
assets/OsmAndCore_ResourcesBundle/
# Android Studio
/.idea
*.iml
# Gradle
.gradle
/local.properties
# MacOSX
.DS_Store
# Output
/build
# Project-specific
/helpAssets
/voiceAssets
/resourcesSrc

View file

@ -128,6 +128,7 @@
<activity android:name="net.osmand.plus.monitoring.SettingsMonitoringActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:name="net.osmand.plus.rastermaps.SettingsRasterMapsActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:name="net.osmand.plus.routepointsnavigation.RoutePointsActivity" />
<activity android:name="net.osmand.plus.dashboard.DashAudioVideoNotesActivity" />
<activity android:name="net.osmand.plus.osmedit.SettingsOsmEditingActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:name="net.osmand.plus.development.SettingsDevelopmentActivity" android:configChanges="keyboardHidden|orientation" />
@ -165,11 +166,16 @@
<activity android:name="net.osmand.plus.activities.search.GeoIntentActivity" android:label="@string/app_name">
<intent-filter>
<data android:scheme="geo" />
<data android:scheme="osmand.geo" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data android:scheme="geo" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
<intent-filter>
<data android:scheme="http" android:host="maps.google.com" />
<data android:scheme="https" android:host="maps.google.com" />

0
OsmAnd/assets/bundled_assets.xml Executable file → Normal file
View file

View file

@ -5,4 +5,3 @@
li { text-align:justify;"}
img { max-width: 75%; width: auto; height: auto; }
p.img {text-align: center}

View file

@ -5,4 +5,3 @@
li { text-align:justify;"}
img { max-width: 75%; width: auto; height: auto; }
p.img {text-align: center}

254
OsmAnd/build.gradle Normal file
View file

@ -0,0 +1,254 @@
apply plugin: 'com.android.application'
//<target name="fix_apostrophe_issues">
//<replace token="version='1.0'" value="version=&quot;1.0&quot;" encoding="UTF-8">
//<fileset dir="res" includes="**/strings.xml" />
//</replace>
// <replace token="encoding='utf-8'" value="encoding=&quot;utf-8&quot;" encoding="UTF-8">
// <fileset dir="res" includes="**/strings.xml" />
//</replace>
//
// <replaceregexp match="([^\\])'" replace="\1\\\\'" flags="-g" byline="off" encoding="UTF-8">
// <fileset dir="res" includes="**/strings.xml" />
//</replaceregexp>
// </target>
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
signingConfigs {
development {
storeFile file("../keystores/debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
publishing {
storeFile file("osmand_key")
storePassword System.getenv("PWD")
keyAlias "androiddebugkey"
keyPassword System.getenv("PWD")
}
}
defaultConfig {
minSdkVersion 9
targetSdkVersion 21
versionCode System.getenv("APK_NUMBER_VERSION") ?: versionCode
versionName System.getenv("APK_VERSION") ?: versionName
}
lintOptions {
lintConfig file("lint.xml")
abortOnError false
warningsAsErrors false
}
// This is from OsmAndCore_android.aar - for some reason it's not inherited
aaptOptions {
// Don't compress any embedded resources
noCompress "qz"
}
dexOptions {
jumboMode = true
}
sourceSets {
main {
manifest.srcFile "AndroidManifest.xml"
jni.srcDirs = []
jniLibs.srcDirs = ["libs"]
aidl.srcDirs = ["src"]
java.srcDirs = [
"src",
fileTree(dir: "../OsmAnd-java/src", exclude: "**/PlatformUtil.java"),
"resourcesSrc"
]
resources.srcDirs = [
"src",
"../OsmAnd-java/src",
"resourcesSrc"
]
renderscript.srcDirs = ["src"]
res.srcDirs = [
"res",
"../../resources/rendering_styles/style-icons/"
]
assets.srcDirs = [
"assets",
"voiceAssets",
"helpAssets"
]
}
}
flavorDimensions "version", "distribution", "abi"
productFlavors {
// ABI
x86 {
flavorDimension "abi"
ndk {
abiFilter "x86"
}
}
mips {
flavorDimension "abi"
ndk {
abiFilter "mips"
}
}
armv7 {
flavorDimension "abi"
ndk {
abiFilter "armeabi-v7a"
}
}
armv5 {
flavorDimension "abi"
ndk {
abiFilter "armeabi"
}
}
fat {
flavorDimension "abi"
}
// Version
free {
flavorDimension "version"
applicationId "net.osmand"
}
paid {
flavorDimension "version"
applicationId "net.osmand.plus"
}
/*
sherpafy {
flavorDimension "version"
applicationId "net.osmand.sherpafy"
}
*/
// Distribution
googleplay {
flavorDimension "distribution"
}
/*
amazon {
flavorDimension "distribution"
}
*/
}
buildTypes {
debug {
signingConfig signingConfigs.development
}
nativeDebug {
signingConfig signingConfigs.development
}
release {
signingConfig signingConfigs.publishing
}
}
}
task collectVoiceAssets(type: Sync) {
from "../../resources"
into "voiceAssets"
include "specialphrases/**"
include "voice/**/*.p"
}
task collectRoutingResources(type: Sync) {
from "../../resources/routing"
into "resourcesSrc/net/osmand/router"
include "*.xml"
}
task collectRenderingStyles(type: Sync) {
from "../../resources/rendering_styles"
into "resourcesSrc/net/osmand/render"
include "*.xml"
}
task collectRegionsInfo(type: Copy) {
from "../../resources/countries-info"
into "resourcesSrc/net/osmand/map"
include "regions.ocbf"
}
task collectHelpContents(type: Sync) {
from "../../help"
into "helpAssets/help"
include "*.html"
include "images/**/*.png"
}
task collectMiscResources(type: Copy) {
from("../../../resources/obf_creation") {
include "rendering_types.xml"
}
from("../../../resources/poi") {
include "poi_types.xml"
}
into "resourcesSrc/net/osmand/osm"
}
task collectExternalResources << {}
collectExternalResources.dependsOn collectVoiceAssets,
collectRoutingResources,
collectRenderingStyles,
collectRegionsInfo,
collectHelpContents,
collectMiscResources
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn << collectExternalResources
}
// Legacy core build
import org.apache.tools.ant.taskdefs.condition.Os
task buildOsmAndCore(type: Exec) {
description "Build Legacy OsmAndCore"
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine "bash", file("./old-ndk-build.sh").getAbsolutePath()
} else {
commandLine "cmd", "/c", "echo", "Not supported"
}
}
task cleanupDuplicatesInCore(type: Delete) {
dependsOn buildOsmAndCore
delete "libs/armeabi/libgnustl_shared.so"
delete "libs/armeabi-v7a/libgnustl_shared.so"
delete "libs/mips/libgnustl_shared.so"
delete "libs/x86/libgnustl_shared.so"
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn << [buildOsmAndCore, cleanupDuplicatesInCore]
}
repositories {
ivy {
name = "OsmAndBinariesIvy"
url = "http://builder.osmand.net:81"
layout "pattern" , {
artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
}
}
}
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"], exclude: ["QtAndroid-bundled.jar", "QtAndroidAccessibility-bundled.jar"])
compile "com.actionbarsherlock:actionbarsherlock:4.4.0@aar"
compile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
debugCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
nativeDebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
releaseCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
}

View file

@ -18,12 +18,20 @@
<target name="download_resources">
<get src="http://builder.osmand.net:81/binaries/android/OsmAndCore_wrapper.jar"
dest="libs/OsmAndCore_wrapper.jar" usetimestamp="true"/>
<get src="http://builder.osmand.net:81/binaries/android/OsmAndCore_android.aar"
dest="OsmAndCore_android.aar" usetimestamp="true"/>
dest="libs/OsmAndCore_wrapper.jar" usetimestamp="true"/>
<get src="http://builder.osmand.net:81/ivy/net.osmand/OsmAndCore_android/0.1-SNAPSHOT/OsmAndCore_android-0.1-SNAPSHOT.aar"
dest="OsmAndCore_android.aar" usetimestamp="true"/>
<get src="http://builder.osmand.net:81/ivy/net.osmand/OsmAndCore_androidNativeRelease/0.1-SNAPSHOT/OsmAndCore_androidNativeRelease-0.1-SNAPSHOT.aar"
dest="OsmAndCore_androidNativeRelease.aar" usetimestamp="true"/>
</target>
<target name="use_qt_core" depends="download_resources">
<unzip src="OsmAndCore_androidNativeRelease.aar" dest="libs">
<patternset>
<include name="jni/armeabi-v7a/*"/>
</patternset>
<cutdirsmapper dirs="1"/>
</unzip>
<unzip src="OsmAndCore_android.aar" dest="libs">
<patternset>
<include name="jni/armeabi-v7a/*"/>
@ -33,6 +41,13 @@
<unzip src="OsmAndCore_android.aar" dest=".">
<patternset>
<include name="assets/**/*"/>
<exclude name="assets/OsmAndCore_ResourcesBundle/map/fonts/**/*"/>
</patternset>
</unzip>
<unzip src="OsmAndCore_android.aar" dest=".">
<patternset>
<include name="assets/**/map/fonts/OpenSans/*"/>
<include name="assets/**/map/fonts/NotoSans/*"/>
</patternset>
</unzip>
</target>

View file

@ -6,7 +6,7 @@ $(info OsmAnd root: $(ROOT_PATH))
ifdef BUILD_ONLY_OLD_LIB
OSMAND_MAKEFILES := \
$(all-subdir-makefiles) \
$(call all-makefiles-under,$(ROOT_PATH)/core/targets/android)
$(call all-makefiles-under,$(ROOT_PATH)/core-legacy/targets/android)
else
# } LEGACY
OSMAND_MAKEFILES := \
@ -17,30 +17,5 @@ endif
# } LEGACY
$(info OsmAnd makefiles: $(OSMAND_MAKEFILES))
# Protect from previous builds
ifneq ($(TARGET_ARCH_ABI),armeabi-v7a)
OSMAND_BUILDING_NEON_LIBRARY := false
endif
# OSMAND_FORCE_NEON_SUPPORT is used to force only NEON support on ARMv7a
ifeq ($(OSMAND_FORCE_NEON_SUPPORT),true)
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
OSMAND_BUILDING_NEON_LIBRARY := true
endif
endif
# By default, include makefiles only once
include $(OSMAND_MAKEFILES)
# If we're not asked not to support NEON and not asked to support only NEON ARMv7a, then
# make additional build
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
ifneq ($(OSMAND_SKIP_NEON_SUPPORT),true)
ifneq ($(OSMAND_FORCE_NEON_SUPPORT),true)
OSMAND_BUILDING_NEON_LIBRARY := true
include $(OSMAND_MAKEFILES)
endif
endif
endif

View file

@ -16,22 +16,9 @@ ifneq ($(filter mips,$(OSMAND_ARCHITECTURES_SET)),)
endif
ifneq ($(filter arm,$(OSMAND_ARCHITECTURES_SET)),)
APP_ABI += armeabi armeabi-v7a
OSMAND_SKIP_NEON_SUPPORT := false
OSMAND_FORCE_NEON_SUPPORT := false
else
ifneq ($(filter armv7,$(OSMAND_ARCHITECTURES_SET)),)
APP_ABI += armeabi-v7a
ifeq ($(filter armv7-neon,$(OSMAND_ARCHITECTURES_SET)),)
OSMAND_SKIP_NEON_SUPPORT := true
endif
OSMAND_FORCE_NEON_SUPPORT := false
endif
ifneq ($(filter armv7-neon,$(OSMAND_ARCHITECTURES_SET)),)
APP_ABI += armeabi-v7a
OSMAND_SKIP_NEON_SUPPORT := false
ifeq ($(filter armv7,$(OSMAND_ARCHITECTURES_SET)),)
OSMAND_FORCE_NEON_SUPPORT := true
endif
endif
endif

View file

@ -1,22 +0,0 @@
# CPU Features library should not be built for NEON
ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cpufeatures_proxy
ifneq ($(OSMAND_USE_PREBUILT),true)
LOCAL_SRC_FILES := \
cpuCheck.cpp
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY)
else
LOCAL_SRC_FILES := \
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(PREBUILT_SHARED_LIBRARY)
endif
$(call import-module,android/cpufeatures)
endif

View file

@ -1,18 +0,0 @@
#include <jni.h>
#include <cpu-features.h>
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jint JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_getCpuCount( JNIEnv* ienv, jobject obj) {
return android_getCpuCount();
}
JNIEXPORT jboolean JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_cpuHasNeonSupport( JNIEnv* ienv, jobject obj) {
return (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) == ANDROID_CPU_ARM_FEATURE_NEON) ? JNI_TRUE : JNI_FALSE;
}
#ifdef __cplusplus
}
#endif

Binary file not shown.

View file

@ -21,5 +21,5 @@ if [ -z "$OSMAND_X86_ONLY" ] && [ -z "$OSMAND_ARM_ONLY" ] && [ -z "$OSMAND_ARMv5
echo "BUILD_ALL set to true"
fi
export BUILD_ONLY_OLD_LIB=1
"$SCRIPT_LOC/../../core/externals/configure.sh"
"$SCRIPT_LOC/../../core-legacy/externals/configure.sh"
(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

0
OsmAnd/res/drawable-hdpi/map_layers_black.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

0
OsmAnd/res/drawable-large/map_layers_black.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

0
OsmAnd/res/drawable-large/widget_layer.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

0
OsmAnd/res/drawable-xhdpi/map_layers_black.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -3,7 +3,6 @@
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:background="@drawable/bg_cardui"
android:orientation="vertical" >

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/dashboard_background" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/dashPadding" >
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout android:id="@+id/content"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashMapFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashFavoritesFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashAudioVideoNotesFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashSearchFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashDownloadMapsFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashUpdatesFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="net.osmand.plus.dashboard.DashPluginsFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/credentials"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
android:padding="@dimen/dashPadding"
android:baselineAligned="false">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="0.5" >
<TextView
android:id="@+id/About"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|bottom"
android:text="@string/about_settings"
android:textSize="@dimen/dashAboutTextSize" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/main_scroll"
android:background="@color/dashboard_background" >
</ScrollView>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_notes"
android:background="@drawable/bg_cardui"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout android:id="@+id/header_layout"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="@dimen/dashHeaderHeight">
<TextView android:id="@+id/notes_text"
android:text="@string/map_widget_av_notes"
style="@style/DashboardSubHeader"/>
<Button android:id="@+id/show_all"
android:text="@string/show_all"
style="@style/DashboardGeneralButton"/>
</LinearLayout>
<LinearLayout android:id="@+id/notes"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

View file

@ -7,7 +7,7 @@
android:layout_height="wrap_content">
<TextView android:id="@+id/message"
android:layout_height="wrap_content"
android:padding="12dp"
android:padding="@dimen/dashFavIconMargin"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:textColor="@color/dashboard_black"
@ -17,7 +17,7 @@
android:layout_height="1dp"/>
<LinearLayout android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="40dp">
android:layout_height="@dimen/dashHeaderHeight">
<Button android:id="@+id/local_downloads"
android:layout_width="0dp"
android:layout_weight="1"

View file

@ -5,19 +5,30 @@
android:background="@drawable/bg_cardui"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/error_header"
android:layout_height="wrap_content"
android:padding="12dp"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:textColor="@color/dashboard_black"
android:layout_gravity="center_horizontal"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView android:src="@drawable/ic_crashlog"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:layout_marginRight="@dimen/dashFavIconMargin"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/error_header"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginBottom="@dimen/subHeaderPadding"
android:layout_marginTop="@dimen/subHeaderPadding"
android:textColor="@color/dashboard_black"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
<View android:layout_width="match_parent"
android:background="@color/dashboard_divider"
android:layout_height="1dp"/>
<LinearLayout android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="40dp">
android:layout_height="@dimen/dashHeaderHeight">
<Button android:id="@+id/error_btn"
android:layout_width="0dp"
android:layout_weight="1"

View file

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="@drawable/dashboard_button"
android:layout_height="50dp">
<View android:layout_width="match_parent"
android:background="@color/dashboard_divider"
android:layout_height="1dp"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:id="@+id/icon"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_width="28dp"
android:layout_height="28dp"/>
<LinearLayout android:orientation="vertical"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView android:id="@+id/name"
android:textSize="16sp"
android:textColor="@color/dashboard_black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/distance"
android:textSize="12sp"
android:textColor="@color/dashboard_blue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

Some files were not shown because too many files have changed in this diff Show more