Target SDK 30 (Play release)
@@ -4,6 +4,8 @@ OpenTopoMap viewer for Android
|
||||
|
||||
[](https://github.com/Pygmalion69/OpenTopoMapViewer/releases) [](https://travis-ci.org/Pygmalion69/OpenTopoMapViewer)
|
||||
|
||||
Note for v1.12.1: external storage has been restricted in this release.
|
||||
|
||||
- Follow location
|
||||
- Import GPX
|
||||
- Lonvia hiking routes
|
||||
|
@@ -1,14 +1,13 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "28.0.3"
|
||||
compileSdkVersion 31
|
||||
defaultConfig {
|
||||
applicationId "org.nitri.opentopo"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
versionCode 29
|
||||
versionName "1.11.9"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 31
|
||||
versionName "1.12.1"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
@@ -30,20 +29,20 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
//noinspection GradleCompatible
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'org.osmdroid:osmdroid-android:6.0.3'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.7.2'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.room:room-runtime:2.3.0'
|
||||
annotationProcessor 'androidx.room:room-compiler:2.3.0'
|
||||
implementation 'net.danlew:android.joda:2.10.1'
|
||||
implementation 'net.danlew:android.joda:2.10.9.1'
|
||||
implementation 'com.github.k3b:k3b-geoHelper:1.1.5'
|
||||
implementation 'com.github.ticofab:android-gpx-parser:2.0.1'
|
||||
implementation('com.squareup.picasso:picasso:2.71828') {
|
||||
@@ -55,7 +54,7 @@ dependencies {
|
||||
exclude group: 'com.android.support', module: 'support-core-utils'
|
||||
exclude group: 'com.android.support', module: 'exifinterface'
|
||||
}
|
||||
testImplementation 'junit:junit:4.13'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
||||
|
@@ -10,7 +10,6 @@
|
||||
<!-- DANGEROUS PERMISSIONS, must request -->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
BIN
app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 12 KiB |
@@ -56,8 +56,8 @@ public class CacheSettingsFragment extends DialogFragment {
|
||||
etTileCache = view.findViewById(R.id.etTileCache);
|
||||
etCacheSize = view.findViewById(R.id.etCacheSize);
|
||||
|
||||
String externalStorageRoot = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||
tvExternalStorageRoot.setText(getString(R.string.external_storage_root, externalStorageRoot));
|
||||
String storageRoot = Configuration.getInstance().getOsmdroidBasePath().getAbsolutePath();
|
||||
tvExternalStorageRoot.setText(getString(R.string.storage_root, storageRoot));
|
||||
|
||||
String currentTileCache = prefs.getString(PREF_TILE_CACHE, DEFAULT_TILE_CACHE);
|
||||
int currentCacheSize = prefs.getInt(PREF_CACHE_SIZE, DEFAULT_CACHE_SIZE);
|
||||
@@ -68,17 +68,17 @@ public class CacheSettingsFragment extends DialogFragment {
|
||||
builder.setView(view)
|
||||
.setPositiveButton(android.R.string.ok, (dialog, id) -> {
|
||||
String newTileCache = etTileCache.getText().toString();
|
||||
int newCacheSize = Integer.valueOf(etCacheSize.getText().toString());
|
||||
int newCacheSize = Integer.parseInt(etCacheSize.getText().toString());
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString(PREF_TILE_CACHE, newTileCache);
|
||||
editor.putInt(PREF_CACHE_SIZE, newCacheSize);
|
||||
editor.apply();
|
||||
File cacheDir = new File(externalStorageRoot + "/" + newTileCache);
|
||||
File cacheDir = new File(storageRoot + "/" + newTileCache);
|
||||
if (cacheDir.mkdirs()) {
|
||||
Log.i(TAG, "Tile cache created: " + newTileCache);
|
||||
}
|
||||
Configuration.getInstance().setOsmdroidTileCache(cacheDir);
|
||||
Configuration.getInstance().setTileFileSystemCacheMaxBytes(newCacheSize * 1024 * 1024);
|
||||
Configuration.getInstance().setTileFileSystemCacheMaxBytes((long) newCacheSize * 1024 * 1024);
|
||||
Configuration.getInstance().save(requireActivity().getApplicationContext(), prefs);
|
||||
if (!newTileCache.equals(currentTileCache) || newCacheSize != currentCacheSize)
|
||||
restart();
|
||||
@@ -105,7 +105,7 @@ public class CacheSettingsFragment extends DialogFragment {
|
||||
PendingIntent.getActivity(requireActivity().getBaseContext(), 0,
|
||||
new Intent(requireActivity().getIntent()), requireActivity().getIntent().getFlags()));
|
||||
|
||||
new Handler().postDelayed(() -> android.os.Process.killProcess(android.os.Process.myPid()), 500);
|
||||
new Handler(requireActivity().getMainLooper()).postDelayed(() -> android.os.Process.killProcess(android.os.Process.myPid()), 500);
|
||||
|
||||
requireActivity().finish();
|
||||
}
|
||||
|
@@ -68,12 +68,10 @@ public class MainActivity extends AppCompatActivity implements MapFragment.OnFra
|
||||
handleIntent(intent);
|
||||
}
|
||||
|
||||
JodaTimeAndroid.init(this);
|
||||
//JodaTimeAndroid.init(this);
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);
|
||||
} else if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_STORAGE_PERMISSION);
|
||||
} else {
|
||||
addMapFragment();
|
||||
}
|
||||
@@ -145,23 +143,12 @@ public class MainActivity extends AppCompatActivity implements MapFragment.OnFra
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
switch (requestCode) {
|
||||
case REQUEST_LOCATION_PERMISSION:
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_STORAGE_PERMISSION);
|
||||
} else {
|
||||
addMapFragment();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case REQUEST_STORAGE_PERMISSION:
|
||||
if (requestCode == REQUEST_LOCATION_PERMISSION) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
addMapFragment();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,6 @@ import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider;
|
||||
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
import io.ticofab.androidgpxparser.parser.domain.Gpx;
|
||||
|
||||
@@ -75,7 +74,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
private RotationGestureOverlay mRotationGestureOverlay;
|
||||
private LocationManager mLocationManager;
|
||||
private OverlayHelper mOverlayHelper;
|
||||
private final Handler mMapHandler = new Handler();
|
||||
private Handler mMapHandler;
|
||||
private final Runnable mCenterRunnable = new Runnable() {
|
||||
|
||||
@Override
|
||||
@@ -156,6 +155,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
return mapFragment;
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -163,8 +163,17 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
setHasOptionsMenu(true);
|
||||
Context context = requireActivity().getApplicationContext();
|
||||
mPrefs = requireActivity().getSharedPreferences(MAP_PREFS, Context.MODE_PRIVATE);
|
||||
|
||||
IConfigurationProvider configuration = Configuration.getInstance();
|
||||
configuration.setUserAgentValue(BuildConfig.APPLICATION_ID);
|
||||
File basePath = new File(context.getCacheDir().getAbsolutePath(), "osmdroid");
|
||||
configuration.setOsmdroidBasePath(basePath);
|
||||
File tileCache = new File(configuration.getOsmdroidBasePath().getAbsolutePath(), "tile");
|
||||
configuration.setOsmdroidTileCache(tileCache);
|
||||
SharedPreferences.Editor edit = mPrefs.edit();
|
||||
edit.putString("osmdroid.basePath", basePath.getAbsolutePath());
|
||||
edit.putString("osmdroid.cachePath", tileCache.getAbsolutePath());
|
||||
edit.commit();
|
||||
configuration.load(context, mPrefs);
|
||||
mBaseMap = mPrefs.getInt(PREF_BASE_MAP, BASE_MAP_OTM);
|
||||
mOverlay = mPrefs.getInt(PREF_OVERLAY, OverlayHelper.OVERLAY_NONE);
|
||||
@@ -297,6 +306,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mMapHandler = new Handler(requireActivity().getMainLooper());
|
||||
mListener.setGpx();
|
||||
Bundle arguments = getArguments();
|
||||
// Move to received geo intent coordinates
|
||||
@@ -420,7 +430,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
//File basePath = Configuration.getInstance().getOsmdroidBasePath();
|
||||
File basePath = Configuration.getInstance().getOsmdroidBasePath();
|
||||
File cache = Configuration.getInstance().getOsmdroidTileCache();
|
||||
Log.d(TAG, "Cache: " + cache.getAbsolutePath());
|
||||
initMap();
|
||||
@@ -500,7 +510,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
}
|
||||
}
|
||||
|
||||
private void showGpxdialog() {
|
||||
private void showGpxDialog() {
|
||||
final AlertDialog.Builder builder;
|
||||
builder = new AlertDialog.Builder(requireActivity(), R.style.AlertDialogTheme);
|
||||
builder.setTitle(getString(R.string.gpx))
|
||||
@@ -584,37 +594,37 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
|
||||
FragmentManager fm;
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_gpx:
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.id.action_gpx) {
|
||||
if (mOverlayHelper != null && mOverlayHelper.hasGpx()) {
|
||||
showGpxdialog();
|
||||
showGpxDialog();
|
||||
} else {
|
||||
mListener.selectGpx();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_location:
|
||||
} else if (itemId == R.id.action_location) {
|
||||
if (mLocationViewModel.getCurrentLocation() != null && mLocationViewModel.getCurrentLocation().getValue() != null) {
|
||||
mMapView.getController().animateTo(new GeoPoint(mLocationViewModel.getCurrentLocation().getValue()));
|
||||
}
|
||||
return true;
|
||||
case R.id.action_follow:
|
||||
} else if (itemId == R.id.action_follow) {
|
||||
enableFollow();
|
||||
Toast.makeText(getActivity(), R.string.follow_enabled, Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
case R.id.action_no_follow:
|
||||
} else if (itemId == R.id.action_no_follow) {
|
||||
disableFollow();
|
||||
Toast.makeText(getActivity(), R.string.follow_disabled, Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
case R.id.action_gpx_details:
|
||||
} else if (itemId == R.id.action_gpx_details) {
|
||||
if (mListener != null)
|
||||
mListener.addGpxDetailFragment();
|
||||
return true;
|
||||
case R.id.action_location_details:
|
||||
} else if (itemId == R.id.action_location_details) {
|
||||
fm = requireActivity().getSupportFragmentManager();
|
||||
LocationDetailFragment locationDetailFragment = new LocationDetailFragment();
|
||||
locationDetailFragment.show(fm, "location_detail");
|
||||
return true;
|
||||
case R.id.action_nearby:
|
||||
} else if (itemId == R.id.action_nearby) {
|
||||
if (mListener != null) {
|
||||
mListener.clearSelectedNearbyPlace();
|
||||
GeoPoint nearbyCenter = null;
|
||||
@@ -633,7 +643,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case R.id.action_cache_settings:
|
||||
} else if (itemId == R.id.action_cache_settings) {
|
||||
if (mMapView != null) {
|
||||
mMapCenterState = (GeoPoint) mMapView.getMapCenter();
|
||||
}
|
||||
@@ -642,15 +652,15 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
CacheSettingsFragment cacheSettingsFragment = new CacheSettingsFragment();
|
||||
cacheSettingsFragment.show(fm, "cache_settings");
|
||||
return true;
|
||||
case R.id.action_gpx_zoom:
|
||||
} else if (itemId == R.id.action_gpx_zoom) {
|
||||
disableFollow();
|
||||
zoomToBounds(Util.area(mListener.getGpx()));
|
||||
return true;
|
||||
case R.id.action_layers:
|
||||
} else if (itemId == R.id.action_layers) {
|
||||
if (getActivity() != null) {
|
||||
View anchorView = getActivity().findViewById(R.id.popupAnchorView);
|
||||
PopupMenu popup = new PopupMenu(getActivity(), anchorView);
|
||||
android.view.MenuInflater inflater = popup.getMenuInflater();
|
||||
MenuInflater inflater = popup.getMenuInflater();
|
||||
inflater.inflate(R.menu.menu_tile_sources, popup.getMenu());
|
||||
|
||||
MenuItem openTopoMapItem = popup.getMenu().findItem(R.id.otm);
|
||||
@@ -686,7 +696,6 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -701,22 +710,17 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
if (!menuItem.isChecked()) {
|
||||
menuItem.setChecked(true);
|
||||
switch (menuItem.getItemId()) {
|
||||
case R.id.otm:
|
||||
int itemId = menuItem.getItemId();
|
||||
if (itemId == R.id.otm) {
|
||||
mBaseMap = BASE_MAP_OTM;
|
||||
break;
|
||||
case R.id.osm:
|
||||
} else if (itemId == R.id.osm) {
|
||||
mBaseMap = BASE_MAP_OSM;
|
||||
break;
|
||||
case R.id.none:
|
||||
} else if (itemId == R.id.none) {
|
||||
mOverlay = OverlayHelper.OVERLAY_NONE;
|
||||
break;
|
||||
case R.id.lonvia_hiking:
|
||||
} else if (itemId == R.id.lonvia_hiking) {
|
||||
mOverlay = OverlayHelper.OVERLAY_HIKING;
|
||||
break;
|
||||
case R.id.lonvia_cycling:
|
||||
} else if (itemId == R.id.lonvia_cycling) {
|
||||
mOverlay = OverlayHelper.OVERLAY_CYCLING;
|
||||
break;
|
||||
}
|
||||
mPrefs.edit().putInt(PREF_BASE_MAP, mBaseMap).apply();
|
||||
mPrefs.edit().putInt(PREF_OVERLAY, mOverlay).apply();
|
||||
@@ -728,6 +732,7 @@ public class MapFragment extends Fragment implements LocationListener, PopupMenu
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
if (BuildConfig.DEBUG && location != null) Log.d(TAG, String.format("Location: %f, %f", location.getLatitude(), location.getLongitude()));
|
||||
mLocationViewModel.getCurrentLocation().setValue(location);
|
||||
}
|
||||
|
||||
|
@@ -1,34 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
@@ -1,170 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillColor="#26A69A"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
</vector>
|
15
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:tint="#FFFFFF">
|
||||
<group android:scaleX="2.2707"
|
||||
android:scaleY="2.2707"
|
||||
android:translateX="26.7516"
|
||||
android:translateY="26.7516">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20.5,3l-0.16,0.03L15,5.1 9,3 3.36,4.9c-0.21,0.07 -0.36,0.25 -0.36,0.48V20.5c0,0.28 0.22,0.5 0.5,0.5l0.16,-0.03L9,18.9l6,2.1 5.64,-1.9c0.21,-0.07 0.36,-0.25 0.36,-0.48V3.5c0,-0.28 -0.22,-0.5 -0.5,-0.5zM15,19l-6,-2.11V5l6,2.11V19z"/>
|
||||
</group>
|
||||
</vector>
|
42
app/src/main/res/layout/fragment_test_layout.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/addNoteEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:hint="Hint"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:lines="5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="Submit"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
<!--<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Test"/>
|
||||
|
||||
</FrameLayout>
|
||||
-->
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 191 KiB |
Before Width: | Height: | Size: 54 KiB |
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
<color name="ic_launcher_background">#4CAF50</color>
|
||||
</resources>
|
@@ -37,7 +37,7 @@
|
||||
<string name="tile_cache">Tile cache</string>
|
||||
<string name="max_cache_size">Max. cache size (MB)</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="external_storage_root">External storage root: %1$s</string>
|
||||
<string name="storage_root">External storage root: %1$s</string>
|
||||
|
||||
<string name="invalid_gpx">Invalid GPX</string>
|
||||
<string name="location_unknown">Location unknown</string>
|
||||
|
@@ -7,7 +7,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
|
BIN
opentopo_feature.png
Normal file
After Width: | Height: | Size: 775 KiB |