diff --git a/app/build.gradle b/app/build.gradle index 29e8a55c5..dc4903f37 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -113,8 +113,9 @@ dependencies { implementation 'com.google.android:flexbox:0.3.1' implementation 'com.mikepenz:materialdrawer:6.0.0' implementation 'com.mikepenz:aboutlibraries:6.0.0' - implementation 'com.mikepenz:fastadapter-commons:3.0.3@aar' - implementation 'com.mikepenz:fastadapter-extensions-expandable:3.0.3@aar' + implementation 'com.mikepenz:fastadapter:3.2.3@aar' + implementation 'com.mikepenz:fastadapter-commons:3.2.3@aar' + implementation 'com.mikepenz:fastadapter-extensions-expandable:3.2.3@aar' implementation 'uk.co.samuelwall:material-tap-target-prompt:2.1.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.4.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0' @@ -228,9 +229,6 @@ dependencyVerification { 'com.mapbox.mapboxsdk:mapbox-java-geojson:2.2.9:mapbox-java-geojson-2.2.9.jar:e888f38e36173a1ac39f3ba08fe6ba50d809b5d05ca8de5c143dee35114bfd91', 'com.mapzen.android:lost:3.0.4:lost-3.0.4.aar:7c95374ddd406356a6a3085c93e1a549feb68e919b29a8f0f194bc47f27788c0', 'com.mikepenz:aboutlibraries:6.0.0:aboutlibraries-6.0.0.aar:9d59e0c6caddda8bdcac1f8dd46ca824dde671b3201e6612a9ca297470da66a1', - 'com.mikepenz:fastadapter-commons:3.0.3:fastadapter-commons-3.0.3.aar:c73e2b079523431ec9313fbcf82f5d659ce47aeae1838965869eaadf81a2c0bd', - 'com.mikepenz:fastadapter-extensions-expandable:3.0.3:fastadapter-extensions-expandable-3.0.3.aar:5f4b78a877ab9e44e7f15dd69decbfcfc38ba45359bb6ee659d5043fdd931a7b', - 'com.mikepenz:fastadapter:3.0.0:fastadapter-3.0.0.aar:6a75d94586448e9222fc36a3e0a0a6d61d3bd30bedb125f681a956b310816e7e', 'com.mikepenz:iconics-core:2.9.5:iconics-core-2.9.5.aar:4250d3082eb20029137574f2f9240bfc6a1f0dd2ce72b7290e75bea8a9cf3b14', 'com.mikepenz:materialdrawer:6.0.0:materialdrawer-6.0.0.aar:e3c43bf540fa220c90108c96e6f6c76ccc971fb100cb4616158650a495a44bf3', 'com.mikepenz:materialize:1.1.1:materialize-1.1.1.aar:0b85d3df906c36ad423271efdaafd4fa3dfb6211400ee91328201c341e7028b8', diff --git a/app/src/androidTest/java/de/grobox/transportr/networks/PickTransportNetworkActivityTest.kt b/app/src/androidTest/java/de/grobox/transportr/networks/PickTransportNetworkActivityTest.kt index bf0aa9ce6..f2372da69 100644 --- a/app/src/androidTest/java/de/grobox/transportr/networks/PickTransportNetworkActivityTest.kt +++ b/app/src/androidTest/java/de/grobox/transportr/networks/PickTransportNetworkActivityTest.kt @@ -24,8 +24,7 @@ import android.support.test.InstrumentationRegistry import android.support.test.espresso.Espresso.onView import android.support.test.espresso.action.ViewActions.click import android.support.test.espresso.assertion.ViewAssertions.matches -import android.support.test.espresso.contrib.RecyclerViewActions.actionOnItem -import android.support.test.espresso.contrib.RecyclerViewActions.scrollToPosition +import android.support.test.espresso.contrib.RecyclerViewActions.* import android.support.test.espresso.matcher.ViewMatchers.* import android.support.test.filters.LargeTest import android.support.test.rule.ActivityTestRule @@ -34,12 +33,14 @@ import android.support.v7.widget.RecyclerView import de.grobox.transportr.R import de.grobox.transportr.ScreengrabTest import de.grobox.transportr.map.MapActivity +import de.grobox.transportr.networks.TransportNetwork import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import java.util.* import javax.inject.Inject +import de.schildbach.pte.NetworkId @LargeTest @@ -73,15 +74,33 @@ class PickTransportNetworkActivityTest : ScreengrabTest() { .check(matches(withText(R.string.pick_network_first_run))) makeScreenshot("1_FirstStart") - // hack to find region position in list - val regionList = ArrayList(EnumSet.allOf(Region::class.java)) + // some hacking to find network position in list val context = InstrumentationRegistry.getTargetContext() - Collections.sort(regionList) { r1, r2 -> context.getString(r1.getName()).compareTo(context.getString(r2.getName())) } + + val continentList = ArrayList(EnumSet.allOf(Continent::class.java)) + Collections.sort(continentList) { r1, r2 -> r1.getName(context).compareTo(r2.getName(context)) } + + val countryList = Continent.EUROPE.getSubRegions() + Collections.sort(countryList) { r1, r2 -> r1.getName(context).compareTo(r2.getName(context)) } + + val networkList = Country.GERMANY.getSubRegions() // select DB network provider + val continentIndex = continentList.indexOf(Continent.EUROPE) + val countryIndex = countryList.indexOf(Country.GERMANY) + var networkIndex = -1 + for (network in networkList) { + networkIndex++ + if ((network as TransportNetwork).getId() == NetworkId.DB) { + break + } + } onView(withId(R.id.list)) - .perform(scrollToPosition(regionList.indexOf(Region.GERMANY) + 5)) + .perform(scrollToPosition(continentIndex + 5)) + .perform(actionOnItem(withChild(withText(R.string.np_continent_europe)), click())) + .perform(scrollToPosition(continentIndex + countryIndex + 5)) .perform(actionOnItem(withChild(withText(R.string.np_region_germany)), click())) + .perform(scrollToPosition(continentIndex + countryIndex + networkIndex + 5)) .perform(actionOnItem(withChild(withText(R.string.np_name_db)), click())) } diff --git a/app/src/main/java/de/grobox/transportr/networks/Continent.java b/app/src/main/java/de/grobox/transportr/networks/Continent.java new file mode 100644 index 000000000..d98dd58d7 --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/Continent.java @@ -0,0 +1,82 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.content.Context; +import android.support.annotation.DrawableRes; +import android.support.annotation.Nullable; +import android.support.annotation.StringRes; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import de.grobox.transportr.R; + +@ParametersAreNonnullByDefault +enum Continent implements ParentRegion { + + EUROPE(R.string.np_continent_europe, R.drawable.continent_europe), + AFRICA(R.string.np_continent_africa, R.drawable.continent_africa), + NORTH_AMERICA(R.string.np_continent_north_america, R.drawable.continent_north_america), + CENTRAL_AMERICA(R.string.np_continent_central_america, R.drawable.continent_central_america), + SOUTH_AMERICA(R.string.np_continent_south_america, R.drawable.continent_south_america), + ASIA(R.string.np_continent_asia, R.drawable.continent_asia), + OCEANIA(R.string.np_continent_oceania, R.drawable.continent_oceania); + + + private final @StringRes int name; + private final @DrawableRes int contour; + private List subRegions; + + Continent(@StringRes int name, @DrawableRes int contour) { + this.name = name; + this.contour = contour; + this.subRegions = new ArrayList<>(); + } + + @Override + @StringRes + public int getName() { + return name; + } + + @DrawableRes + public int getContour() { + return contour; + } + + @Override + public String getName(Context context) { + return context.getString(name); + } + + @Override + public void addSubRegion(Region subRegion) { + subRegions.add(subRegion); + } + + @Override + public List getSubRegions() { + return subRegions; + } + +} diff --git a/app/src/main/java/de/grobox/transportr/networks/ContinentItem.java b/app/src/main/java/de/grobox/transportr/networks/ContinentItem.java new file mode 100644 index 000000000..9fd2ebaee --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/ContinentItem.java @@ -0,0 +1,76 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.content.Context; +import android.support.annotation.IdRes; +import android.support.annotation.LayoutRes; +import android.view.View; + +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import de.grobox.transportr.R; + +@ParametersAreNonnullByDefault +class ContinentItem extends ParentRegionItem { + + private final Continent continent; + + ContinentItem(Continent continent) { + super(); + this.continent = continent; + } + + @Override + protected String getName(Context context) { + return continent.getName(context); + } + + @IdRes + @Override + public int getType() { + return R.id.list_item_transport_continent; + } + + @Override + @LayoutRes + public int getLayoutRes() { + return R.layout.list_item_transport_continent; + } + + @Override + public void bindView(ContinentViewHolder ui, List payloads) { + super.bindView(ui, payloads); + ui.bind(continent, isExpanded()); + } + + @Override + public ContinentViewHolder getViewHolder(View view) { + return new ContinentViewHolder(view); + } + + @Override + public long getIdentifier() { + return continent.getName(); + } + +} diff --git a/app/src/main/java/de/grobox/transportr/networks/ContinentViewHolder.java b/app/src/main/java/de/grobox/transportr/networks/ContinentViewHolder.java new file mode 100644 index 000000000..928ca6eb8 --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/ContinentViewHolder.java @@ -0,0 +1,47 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.os.Build; +import android.support.v7.widget.RecyclerView; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import de.grobox.transportr.R; + +import static android.view.View.GONE; +import static android.view.View.VISIBLE; + +class ContinentViewHolder extends ParentRegionViewHolder { + + private final ImageView contour; + + ContinentViewHolder(View v) { + super(v); + contour = v.findViewById(R.id.contour); + } + + @Override + void bind(Continent continent, boolean expanded) { + super.bind(continent, expanded); + contour.setImageResource(continent.getContour()); + } +} diff --git a/app/src/main/java/de/grobox/transportr/networks/Country.java b/app/src/main/java/de/grobox/transportr/networks/Country.java new file mode 100644 index 000000000..f7136ad22 --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/Country.java @@ -0,0 +1,99 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.content.Context; +import android.support.annotation.Nullable; +import android.support.annotation.StringRes; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import de.grobox.transportr.R; + +@ParametersAreNonnullByDefault +enum Country implements ParentRegion { + + GERMANY(R.string.np_region_germany, "🇩🇪", Continent.EUROPE), + AUSTRIA(R.string.np_region_austria, "🇦🇹", Continent.EUROPE), + LIECHTENSTEIN(R.string.np_region_liechtenstein, "🇱🇮", Continent.EUROPE), + SWITZERLAND(R.string.np_region_switzerland, "🇨🇭", Continent.EUROPE), + LUXEMBOURG(R.string.np_region_luxembourg, "🇱🇺", Continent.EUROPE), + NETHERLANDS(R.string.np_region_netherlands, "🇳🇱", Continent.EUROPE), + DENMARK(R.string.np_region_denmark, "🇩🇰", Continent.EUROPE), + SWEDEN(R.string.np_region_sweden, "🇸🇪", Continent.EUROPE), + NORWAY(R.string.np_region_norway, "🇳🇴", Continent.EUROPE), + FINLAND(R.string.np_region_finland, "🇫🇮", Continent.EUROPE), + GREAT_BRITAIN(R.string.np_region_gb, "🇬🇧", Continent.EUROPE), + IRELAND(R.string.np_region_ireland, "🇮🇪", Continent.EUROPE), + POLAND(R.string.np_region_poland, "🇵🇱", Continent.EUROPE), + UAE(R.string.np_region_uae, "🇦🇪", Continent.ASIA), + USA(R.string.np_region_usa, "🇺🇸", Continent.NORTH_AMERICA), //TODO: it seems there's a problem with the flag + AUSTRALIA(R.string.np_region_australia, "🇦🇺", Continent.OCEANIA), + FRANCE(R.string.np_region_france, "🇫🇷", Continent.EUROPE), + BRAZIL(R.string.np_region_br, "🇧🇷", Continent.SOUTH_AMERICA), + CANADA(R.string.np_region_canada, "🇨🇦", Continent.NORTH_AMERICA); + + private final @StringRes int name; + private final @Nullable String flag; + private final Continent continent; + private List subRegions; + + Country(@StringRes int name, @Nullable String flag, Continent continent) { + this.name = name; + this.flag = flag; + this.continent = continent; + this.continent.addSubRegion(this); + this.subRegions = new ArrayList<>(); + } + + @Override + @StringRes + public int getName() { + return name; + } + + @Override + public String getName(Context context) { + return context.getString(name); + } + + @Nullable + public String getFlag() { + return flag; + } + + public Continent getContinent() { + return continent; + } + + @Override + public void addSubRegion(Region subRegion) { + subRegions.add(subRegion); + } + + @Override + public List getSubRegions() { + return subRegions; + } + +} diff --git a/app/src/main/java/de/grobox/transportr/networks/CountryItem.java b/app/src/main/java/de/grobox/transportr/networks/CountryItem.java new file mode 100644 index 000000000..9249de7a4 --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/CountryItem.java @@ -0,0 +1,76 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.content.Context; +import android.support.annotation.IdRes; +import android.support.annotation.LayoutRes; +import android.view.View; + +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import de.grobox.transportr.R; + +@ParametersAreNonnullByDefault +class CountryItem extends ParentRegionItem { + + protected final Country country; + + CountryItem(Country country) { + super(); + this.country = country; + } + + @Override + protected String getName(Context context) { + return country.getName(context); + } + + @IdRes + @Override + public int getType() { + return R.id.list_item_transport_country; + } + + @Override + @LayoutRes + public int getLayoutRes() { + return R.layout.list_item_transport_country; + } + + @Override + public void bindView(CountryViewHolder ui, List payloads) { + super.bindView(ui, payloads); + ui.bind(country, isExpanded()); + } + + @Override + public CountryViewHolder getViewHolder(View view) { + return new CountryViewHolder(view); + } + + @Override + public long getIdentifier() { + return country.getName(); + } + +} diff --git a/app/src/main/java/de/grobox/transportr/networks/CountryViewHolder.java b/app/src/main/java/de/grobox/transportr/networks/CountryViewHolder.java new file mode 100644 index 000000000..50932d533 --- /dev/null +++ b/app/src/main/java/de/grobox/transportr/networks/CountryViewHolder.java @@ -0,0 +1,53 @@ +/* + * Transportr + * + * Copyright (c) 2013 - 2017 Torsten Grote + * + * This program is Free Software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.grobox.transportr.networks; + +import android.os.Build; +import android.support.v7.widget.RecyclerView; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import de.grobox.transportr.R; + +import static android.view.View.GONE; +import static android.view.View.VISIBLE; + +class CountryViewHolder extends ParentRegionViewHolder { + + private final TextView flag; + + CountryViewHolder(View v) { + super(v); + flag = v.findViewById(R.id.flag); + } + + @Override + void bind(Country country, boolean expanded) { + super.bind(country, expanded); + if (Build.VERSION.SDK_INT >= 21) { + flag.setText(country.getFlag()); + flag.setVisibility(VISIBLE); + } else { + flag.setVisibility(GONE); + } + } + +} diff --git a/app/src/main/java/de/grobox/transportr/networks/PickTransportNetworkActivity.java b/app/src/main/java/de/grobox/transportr/networks/PickTransportNetworkActivity.java index 22db9c453..f094256d9 100644 --- a/app/src/main/java/de/grobox/transportr/networks/PickTransportNetworkActivity.java +++ b/app/src/main/java/de/grobox/transportr/networks/PickTransportNetworkActivity.java @@ -33,6 +33,7 @@ import com.mikepenz.fastadapter.expandable.ExpandableExtension; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -79,25 +80,48 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { } setResult(RESULT_CANCELED); - adapter = new FastItemAdapter<>(); adapter.withSelectable(true); - adapter.getItemAdapter().withComparator(new RegionItem.RegionComparator(this)); adapter.withSelectionListener(this); expandableExtension = new ExpandableExtension<>(); + expandableExtension.withOnlyOneExpandedItem(true); adapter.addExtension(expandableExtension); list = findViewById(R.id.list); list.setLayoutManager(new LinearLayoutManager(this)); list.setAdapter(adapter); - Map> networksByRegion = getTransportNetworksByRegion(); - for (Region region : networksByRegion.keySet()) { - RegionItem regionItem = new RegionItem(region); - List networks = networksByRegion.get(region); - List networkItems = new ArrayList<>(networks.size()); - for (TransportNetwork n : networks) networkItems.add(new TransportNetworkItem(n)); - regionItem.withSubItems(networkItems); - adapter.add(regionItem); + List continentItems = new ArrayList<>(Continent.values().length); + for (Continent continent : Continent.values()) { + ContinentItem continentItem = new ContinentItem(continent); + List subRegions = continent.getSubRegions(); + List subRegionItems = new ArrayList<>(subRegions.size()); + for (Region subRegion : subRegions) { + if (subRegion instanceof Country) { + Country country = (Country)subRegion; + CountryItem countryItem = new CountryItem(country); + List networks = country.getSubRegions(); + List networkItems = new ArrayList<>(networks.size()); + for (Region network : networks) { + if (!(network instanceof TransportNetwork)) + continue; + networkItems.add(new TransportNetworkItem((TransportNetwork)network)); + } + countryItem.withSubItems(networkItems); + subRegionItems.add(countryItem); + } else if (subRegion instanceof TransportNetwork) { + TransportNetwork network = (TransportNetwork)subRegion; + subRegionItems.add(new TransportNetworkItem(network)); + } + } + + Collections.sort(subRegionItems, new RegionItem.RegionComparator(this)); + continentItem.withSubItems(subRegionItems); + continentItems.add(continentItem); + } + + Collections.sort(continentItems, new RegionItem.RegionComparator(this)); + for (ContinentItem c : continentItems) { + adapter.add(c); } if (savedInstanceState != null) adapter.withSavedInstanceState(savedInstanceState); @@ -134,9 +158,24 @@ private void selectItem() { selectAllowed = true; return; } - int pos = adapter.getPosition(new RegionItem(network.getRegion())); + Region region = network.getRegion(); + Continent continent = null; + Country country = null; + if (region instanceof Country) { + country = (Country)region; + continent = country.getContinent(); + } else if (region instanceof Continent) { + continent = (Continent)region; + } + int pos = adapter.getPosition(new ContinentItem(continent)); if (pos != -1) { expandableExtension.expand(pos); + if (country != null) { + pos = adapter.getPosition(new CountryItem(country)); + if (pos != -1) { + expandableExtension.expand(pos); + } + } pos = adapter.getPosition(new TransportNetworkItem(network)); if (pos != -1) { adapter.select(pos, false); @@ -146,19 +185,4 @@ private void selectItem() { } } } - - private HashMap> getTransportNetworksByRegion() { - HashMap> networks = new HashMap<>(); - for (TransportNetwork n : TransportNetworks.networks) { - if (networks.containsKey(n.getRegion())) { - networks.get(n.getRegion()).add(n); - } else { - List list = new ArrayList<>(); - list.add(n); - networks.put(n.getRegion(), list); - } - } - return networks; - } - } diff --git a/app/src/main/java/de/grobox/transportr/networks/Region.java b/app/src/main/java/de/grobox/transportr/networks/Region.java index eaeaa6843..ffe265b4b 100644 --- a/app/src/main/java/de/grobox/transportr/networks/Region.java +++ b/app/src/main/java/de/grobox/transportr/networks/Region.java @@ -20,64 +20,14 @@ package de.grobox.transportr.networks; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import javax.annotation.ParametersAreNonnullByDefault; - -import de.grobox.transportr.R; - -@ParametersAreNonnullByDefault -enum Region { - - EUROPE(R.string.np_region_europe, "🇪🇺"), - GERMANY(R.string.np_region_germany, "🇩🇪"), - AUSTRIA(R.string.np_region_austria, "🇦🇹"), - LIECHTENSTEIN(R.string.np_region_liechtenstein, "🇱🇮"), - SWITZERLAND(R.string.np_region_switzerland, "🇨🇭"), - BELGIUM(R.string.np_region_belgium, "🇧🇪"), - LUXEMBOURG(R.string.np_region_luxembourg, "🇱🇺"), - NETHERLANDS(R.string.np_region_netherlands, "🇳🇱"), - DENMARK(R.string.np_region_denmark, "🇩🇰"), - SWEDEN(R.string.np_region_sweden, "🇸🇪"), - NORWAY(R.string.np_region_norway, "🇳🇴"), - FINLAND(R.string.np_region_finland, "🇫🇮"), - GREAT_BRITAIN(R.string.np_region_gb, "🇬🇧"), - IRELAND(R.string.np_region_ireland, "🇮🇪"), - ITALY(R.string.np_region_italy, "🇮🇹"), - POLAND(R.string.np_region_poland, "🇵🇱"), - UAE(R.string.np_region_uae, "🇦🇪"), - USA(R.string.np_region_usa, "🇺🇸"), - AUSTRALIA(R.string.np_region_australia, "🇦🇺"), - FRANCE(R.string.np_region_france, "🇫🇷"), - NEW_ZEALAND(R.string.np_region_nz, "🇳🇿"), - SPAIN(R.string.np_region_spain, "🇪🇸"), - BRAZIL(R.string.np_region_br, "🇧🇷"), - CANADA(R.string.np_region_canada, "🇨🇦"), - COSTA_RICA(R.string.np_region_costa_rica, "🇨🇷"), - AFRICA(R.string.np_region_africa, "🌍"), - CENTRAL_AMERICA(R.string.np_region_central_america, "🌎"); - - private final @StringRes int name; - private final @Nullable String flag; - - Region(@StringRes int name, @Nullable String flag) { - this.name = name; - this.flag = flag; - } - - @StringRes - public int getName() { - return name; - } - - public String getName(Context context) { - return context.getString(name); - } - - @Nullable - public String getFlag() { - return flag; - } +import java.util.List; +interface Region { + String getName(Context context); +} +interface ParentRegion extends Region { + int getName(); + void addSubRegion(Region region); + List getSubRegions(); } diff --git a/app/src/main/java/de/grobox/transportr/networks/RegionItem.java b/app/src/main/java/de/grobox/transportr/networks/RegionItem.java index 3fe0080d5..82d5d8c59 100644 --- a/app/src/main/java/de/grobox/transportr/networks/RegionItem.java +++ b/app/src/main/java/de/grobox/transportr/networks/RegionItem.java @@ -20,12 +20,8 @@ package de.grobox.transportr.networks; import android.content.Context; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; import android.support.v4.view.ViewCompat; -import android.view.View; -import com.mikepenz.fastadapter.IItem; import com.mikepenz.fastadapter.expandable.items.AbstractExpandableItem; import com.mikepenz.fastadapter.listeners.OnClickListener; @@ -37,48 +33,41 @@ import de.grobox.transportr.R; @ParametersAreNonnullByDefault -class RegionItem extends AbstractExpandableItem { +abstract class RegionItem extends AbstractExpandableItem { - private final Region region; + protected abstract String getName(Context context); - RegionItem(Region region) { - super(); - this.region = region; - } + static class RegionComparator implements Comparator { - @IdRes - @Override - public int getType() { - return R.id.list_item_transport_region; - } - - @Override - @LayoutRes - public int getLayoutRes() { - return R.layout.list_item_transport_region; - } - - @Override - public void bindView(RegionViewHolder ui, List payloads) { - super.bindView(ui, payloads); - ui.bind(region, isExpanded()); - } + private final Context context; - @Override - public RegionViewHolder getViewHolder(View view) { - return new RegionViewHolder(view); - } + RegionComparator(Context context) { + super(); + this.context = context; + } - @Override - public long getIdentifier() { - return region.getName(); + @Override + public int compare(RegionItem r1, RegionItem r2) { + // sort regions alphabetically + return r1.getName(context).compareTo(r2.getName(context)); + } } +} +abstract class ParentRegionItem extends RegionItem { + @Override - public OnClickListener getOnItemClickListener() { + public OnClickListener getOnItemClickListener() { return (v, adapter, item, position) -> { if (item.getSubItems() != null) { if (!item.isExpanded()) { + List subItems = item.getSubItems(); + for (Child subItem : subItems) { + if (subItem.getSubItems() != null && subItem.isExpanded()) { + subItem.withIsExpanded(false); + adapter.getFastAdapter().notifyAdapterDataSetChanged(); + } + } ViewCompat.animate(v.findViewById(R.id.chevron)).rotation(180).start(); } else { ViewCompat.animate(v.findViewById(R.id.chevron)).rotation(0).start(); @@ -88,24 +77,4 @@ public OnClickListener getOnItemClickListener() { return false; }; } - - static class RegionComparator implements Comparator { - - private final Context context; - - RegionComparator(Context context) { - super(); - this.context = context; - } - - @Override - public int compare(IItem i1, IItem i2) { - if (i1 instanceof RegionItem && i2 instanceof RegionItem) { - // sort regions alphabetically - return ((RegionItem) i1).region.getName(context).compareTo(((RegionItem) i2).region.getName(context)); - } - return 0; - } - } - } diff --git a/app/src/main/java/de/grobox/transportr/networks/RegionViewHolder.java b/app/src/main/java/de/grobox/transportr/networks/RegionViewHolder.java index 2591a9527..d716ad158 100644 --- a/app/src/main/java/de/grobox/transportr/networks/RegionViewHolder.java +++ b/app/src/main/java/de/grobox/transportr/networks/RegionViewHolder.java @@ -19,7 +19,6 @@ package de.grobox.transportr.networks; -import android.os.Build; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; @@ -27,32 +26,31 @@ import de.grobox.transportr.R; -import static android.view.View.GONE; -import static android.view.View.VISIBLE; - -class RegionViewHolder extends RecyclerView.ViewHolder { - - private final TextView flag; - private final TextView name; - private final ImageView chevron; +abstract class RegionViewHolder extends RecyclerView.ViewHolder { + protected final TextView name; RegionViewHolder(View v) { super(v); - flag = v.findViewById(R.id.flag); name = v.findViewById(R.id.name); + } + + void bind(Reg region, boolean expanded) { + name.setText(region.getName(name.getContext())); + } +} + +abstract class ParentRegionViewHolder extends RegionViewHolder { + protected final ImageView chevron; + + ParentRegionViewHolder(View v) { + super(v); chevron = v.findViewById(R.id.chevron); } - void bind(Region region, boolean expanded) { - if (Build.VERSION.SDK_INT >= 21) { - flag.setText(region.getFlag()); - flag.setVisibility(VISIBLE); - } else { - flag.setVisibility(GONE); - } - name.setText(region.getName()); + @Override + void bind(Reg region, boolean expanded) { + super.bind(region, expanded); if (expanded) chevron.setRotation(0); else chevron.setRotation(180); } - } diff --git a/app/src/main/java/de/grobox/transportr/networks/TransportNetwork.java b/app/src/main/java/de/grobox/transportr/networks/TransportNetwork.java index 787fdd9a7..1356a6002 100644 --- a/app/src/main/java/de/grobox/transportr/networks/TransportNetwork.java +++ b/app/src/main/java/de/grobox/transportr/networks/TransportNetwork.java @@ -24,6 +24,8 @@ import android.support.annotation.Nullable; import android.support.annotation.StringRes; +import java.util.List; + import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.concurrent.Immutable; @@ -34,10 +36,10 @@ @Immutable @ParametersAreNonnullByDefault -public class TransportNetwork { +public class TransportNetwork implements Region { private final NetworkId id; - private final Region region; + private final ParentRegion region; private final @StringRes int name; private final @StringRes int description; private final @StringRes int agencies; @@ -47,7 +49,7 @@ public class TransportNetwork { public enum Status {ALPHA, BETA, STABLE} - TransportNetwork(NetworkId id, Region region, int name, int description, int agencies, Status status, int logo, boolean goodLineNames) { + TransportNetwork(NetworkId id, ParentRegion region, int name, int description, int agencies, Status status, int logo, boolean goodLineNames) { checkArgument(description != 0 || agencies != 0); this.id = id; this.region = region; @@ -57,6 +59,7 @@ public enum Status {ALPHA, BETA, STABLE} this.status = status; this.logo = logo; this.goodLineNames = goodLineNames; + this.region.addSubRegion(this); } public NetworkId getId() { @@ -71,6 +74,7 @@ public Region getRegion() { return region; } + @Override public String getName(Context context) { if (name == 0) { return id.name(); diff --git a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkBuilder.java b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkBuilder.java index 48ce796b7..4edb36aa5 100644 --- a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkBuilder.java +++ b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkBuilder.java @@ -35,7 +35,7 @@ class TransportNetworkBuilder { private NetworkId id; - private Region region; + private ParentRegion region; private @StringRes int name; private @StringRes int description; private @StringRes int agencies; @@ -58,7 +58,7 @@ TransportNetworkBuilder setId(NetworkId id) { return this; } - TransportNetworkBuilder setRegion(Region region) { + TransportNetworkBuilder setRegion(ParentRegion region) { this.region = region; return this; } diff --git a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkItem.java b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkItem.java index 6f0276b2e..073131b44 100644 --- a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkItem.java +++ b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkItem.java @@ -19,14 +19,11 @@ package de.grobox.transportr.networks; +import android.content.Context; import android.support.annotation.IdRes; import android.support.annotation.LayoutRes; import android.view.View; -import com.mikepenz.fastadapter.IItem; -import com.mikepenz.fastadapter.ISubItem; -import com.mikepenz.fastadapter.expandable.items.AbstractExpandableItem; - import java.util.List; import javax.annotation.ParametersAreNonnullByDefault; @@ -34,15 +31,20 @@ import de.grobox.transportr.R; @ParametersAreNonnullByDefault -class TransportNetworkItem extends AbstractExpandableItem { +class TransportNetworkItem extends RegionItem { - private final TransportNetwork network; + protected final TransportNetwork network; TransportNetworkItem(TransportNetwork network) { super(); this.network = network; } + @Override + protected String getName(Context context) { + return network.getName(context); + } + @IdRes @Override public int getType() { @@ -58,7 +60,7 @@ public int getLayoutRes() { @Override public void bindView(TransportNetworkViewHolder ui, List payloads) { super.bindView(ui, payloads); - ui.bind(network); + ui.bind(network, false); } @Override diff --git a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkViewHolder.java b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkViewHolder.java index 87bfa7d65..c60fca918 100644 --- a/app/src/main/java/de/grobox/transportr/networks/TransportNetworkViewHolder.java +++ b/app/src/main/java/de/grobox/transportr/networks/TransportNetworkViewHolder.java @@ -31,24 +31,23 @@ import static de.grobox.transportr.networks.TransportNetwork.Status.ALPHA; import static de.grobox.transportr.networks.TransportNetwork.Status.STABLE; -class TransportNetworkViewHolder extends RecyclerView.ViewHolder { +class TransportNetworkViewHolder extends RegionViewHolder { private final ImageView logo; - private final TextView name; private final TextView desc; private final TextView status; TransportNetworkViewHolder(View v) { super(v); logo = v.findViewById(R.id.logo); - name = v.findViewById(R.id.name); desc = v.findViewById(R.id.desc); status = v.findViewById(R.id.status); } - void bind(TransportNetwork network) { + @Override + void bind(TransportNetwork network, boolean expanded) { + super.bind(network, expanded); logo.setImageResource(network.getLogo()); - name.setText(network.getName(name.getContext())); desc.setText(network.getDescription(desc.getContext())); if (network.getStatus() == STABLE) { status.setVisibility(GONE); diff --git a/app/src/main/java/de/grobox/transportr/networks/TransportNetworks.java b/app/src/main/java/de/grobox/transportr/networks/TransportNetworks.java index f63ada326..5efc2b37b 100644 --- a/app/src/main/java/de/grobox/transportr/networks/TransportNetworks.java +++ b/app/src/main/java/de/grobox/transportr/networks/TransportNetworks.java @@ -33,7 +33,7 @@ public interface TransportNetworks { new TransportNetworkBuilder() .setId(NetworkId.RT) - .setRegion(Region.EUROPE) + .setRegion(Continent.EUROPE) .setName(R.string.np_name_rt) .setDescription(R.string.np_desc_rt) .setAgencies(R.string.np_desc_rt_networks) @@ -47,45 +47,45 @@ public interface TransportNetworks { .setName(R.string.np_name_db) .setDescription(R.string.np_desc_db) .setLogo(R.drawable.network_db_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.BVG) .setDescription(R.string.np_desc_bvg) .setLogo(R.drawable.network_bvg_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VBB) .setDescription(R.string.np_desc_vbb) .setLogo(R.drawable.network_vbb_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.BAYERN) .setName(R.string.np_name_bayern) .setDescription(R.string.np_desc_bayern) .setLogo(R.drawable.network_bayern_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.AVV) .setDescription(R.string.np_desc_avv) .setLogo(R.drawable.network_avv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .setStatus(BETA) .build(), new TransportNetworkBuilder() .setId(NetworkId.MVV) .setDescription(R.string.np_desc_mvv) .setLogo(R.drawable.network_mvv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.INVG) .setDescription(R.string.np_desc_invg) .setLogo(R.drawable.network_invg_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .setStatus(BETA) .build(), new TransportNetworkBuilder() @@ -93,45 +93,45 @@ public interface TransportNetworks { .setDescription(R.string.np_desc_vgn) .setAgencies(R.string.np_desc_vgn_networks) .setLogo(R.drawable.network_vgn_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .setStatus(BETA) .build(), new TransportNetworkBuilder() .setId(NetworkId.VVM) .setDescription(R.string.np_desc_vvm) .setLogo(R.drawable.network_vvm_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VMV) .setDescription(R.string.np_desc_vmv) .setLogo(R.drawable.network_vmv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.GVH) .setDescription(R.string.np_desc_gvh) .setLogo(R.drawable.network_gvh_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.BSVAG) .setName(R.string.np_name_bsvag) .setDescription(R.string.np_desc_bsvag) .setLogo(R.drawable.network_bsvag_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VVO) .setDescription(R.string.np_desc_vvo) .setLogo(R.drawable.network_vvo_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VMS) .setDescription(R.string.np_desc_vms) .setLogo(R.drawable.network_vms_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .setStatus(BETA) .build(), new TransportNetworkBuilder() @@ -139,87 +139,87 @@ public interface TransportNetworks { .setName(R.string.np_name_nasa) .setDescription(R.string.np_desc_nasa) .setLogo(R.drawable.network_nasa_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .setStatus(BETA) .build(), new TransportNetworkBuilder() .setId(NetworkId.VRR) .setDescription(R.string.np_desc_vrr) .setLogo(R.drawable.network_vrr_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.MVG) .setDescription(R.string.np_desc_mvg) .setLogo(R.drawable.network_mvg_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.NVV) .setName(R.string.np_name_nvv) .setDescription(R.string.np_desc_nvv) .setLogo(R.drawable.network_nvv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VRN) .setDescription(R.string.np_desc_vrn) .setLogo(R.drawable.network_vrn_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VVS) .setDescription(R.string.np_desc_vvs) .setLogo(R.drawable.network_vvs_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.DING) .setDescription(R.string.np_desc_ding) .setLogo(R.drawable.network_ding_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.KVV) .setDescription(R.string.np_desc_kvv) .setLogo(R.drawable.network_kvv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VAGFR) .setName(R.string.np_name_vagfr) .setDescription(R.string.np_desc_vagfr) .setLogo(R.drawable.network_vagfr_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.NVBW) .setDescription(R.string.np_desc_nvbw) .setLogo(R.drawable.network_nvbw_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VVV) .setDescription(R.string.np_desc_vvv) .setLogo(R.drawable.network_vvv_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VGS) .setDescription(R.string.np_desc_vgs) .setLogo(R.drawable.network_vgs_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VRS) .setDescription(R.string.np_desc_vrs) .setLogo(R.drawable.network_vrs_logo) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), new TransportNetworkBuilder() .setId(NetworkId.VMT) .setDescription(R.string.np_desc_vmt) - .setRegion(Region.GERMANY) + .setRegion(Country.GERMANY) .build(), // Austria @@ -229,53 +229,53 @@ public interface TransportNetworks { .setName(R.string.np_name_oebb) .setDescription(R.string.np_desc_oebb) .setLogo(R.drawable.network_oebb_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.VOR) .setDescription(R.string.np_desc_vor) .setLogo(R.drawable.network_vor_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.LINZ) .setName(R.string.np_name_linz) .setDescription(R.string.np_desc_linz) .setLogo(R.drawable.network_linz_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.VVT) .setDescription(R.string.np_desc_vvt) .setLogo(R.drawable.network_vvt_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.IVB) .setDescription(R.string.np_desc_ivb) .setLogo(R.drawable.network_ivb_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.STV) .setName(R.string.np_name_stv) .setDescription(R.string.np_desc_stv) .setLogo(R.drawable.network_stv_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.WIEN) .setName(R.string.np_name_wien) .setDescription(R.string.np_desc_wien) .setLogo(R.drawable.network_wien_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), new TransportNetworkBuilder() .setId(NetworkId.VMOBIL) .setName(R.string.np_name_vmobil) .setDescription(R.string.np_desc_vmobil) .setLogo(R.drawable.network_vmobil_logo) - .setRegion(Region.AUSTRIA) + .setRegion(Country.AUSTRIA) .build(), // Liechtenstein @@ -285,7 +285,7 @@ public interface TransportNetworks { .setName(R.string.np_name_vmobil) .setDescription(R.string.np_desc_vmobil) .setLogo(R.drawable.network_vmobil_logo) - .setRegion(Region.LIECHTENSTEIN) + .setRegion(Country.LIECHTENSTEIN) .build(), // Switzerland @@ -295,19 +295,19 @@ public interface TransportNetworks { .setName(R.string.np_name_sbb) .setDescription(R.string.np_desc_sbb) .setLogo(R.drawable.network_sbb_logo) - .setRegion(Region.SWITZERLAND) + .setRegion(Country.SWITZERLAND) .build(), new TransportNetworkBuilder() .setId(NetworkId.VBL) .setDescription(R.string.np_desc_vbl) .setLogo(R.drawable.network_vbl_logo) - .setRegion(Region.SWITZERLAND) + .setRegion(Country.SWITZERLAND) .build(), new TransportNetworkBuilder() .setId(NetworkId.ZVV) .setDescription(R.string.np_desc_zvv) .setLogo(R.drawable.network_zvv_logo) - .setRegion(Region.SWITZERLAND) + .setRegion(Country.SWITZERLAND) .build(), // Belgium @@ -318,7 +318,7 @@ public interface TransportNetworks { .setDescription(R.string.np_desc_sncb) .setAgencies(R.string.np_desc_sncb_networks) .setLogo(R.drawable.network_sncb_logo) - .setRegion(Region.BELGIUM) + .setRegion(Continent.EUROPE) .build(), // Luxembourg @@ -328,7 +328,7 @@ public interface TransportNetworks { .setName(R.string.np_name_lu) .setDescription(R.string.np_desc_lu) .setAgencies(R.string.np_desc_lu_networks) - .setRegion(Region.LUXEMBOURG) + .setRegion(Country.LUXEMBOURG) .build(), // Netherlands @@ -337,7 +337,7 @@ public interface TransportNetworks { .setId(NetworkId.NS) .setDescription(R.string.np_desc_ns) .setLogo(R.drawable.network_ns_logo) - .setRegion(Region.NETHERLANDS) + .setRegion(Country.NETHERLANDS) .setStatus(BETA) .build(), @@ -346,7 +346,7 @@ public interface TransportNetworks { .setName(R.string.np_name_negentwee) .setDescription(R.string.np_desc_negentwee) .setLogo(R.drawable.network_negentwee_logo) - .setRegion(Region.NETHERLANDS) + .setRegion(Country.NETHERLANDS) .setStatus(ALPHA) .build(), @@ -356,7 +356,7 @@ public interface TransportNetworks { .setId(NetworkId.DSB) .setDescription(R.string.np_desc_dsb) .setLogo(R.drawable.network_dsb_logo) - .setRegion(Region.DENMARK) + .setRegion(Country.DENMARK) .build(), // Sweden @@ -365,7 +365,7 @@ public interface TransportNetworks { .setId(NetworkId.SE) .setDescription(R.string.np_desc_se) .setLogo(R.drawable.network_se_logo) - .setRegion(Region.SWEDEN) + .setRegion(Country.SWEDEN) .build(), // Norway @@ -374,7 +374,7 @@ public interface TransportNetworks { .setId(NetworkId.NRI) .setDescription(R.string.np_desc_nri) .setLogo(R.drawable.network_nri_logo) - .setRegion(Region.NORWAY) + .setRegion(Country.NORWAY) .build(), // Finland @@ -382,7 +382,7 @@ public interface TransportNetworks { new TransportNetworkBuilder() .setId(NetworkId.HSL) .setDescription(R.string.np_desc_hsl) - .setRegion(Region.FINLAND) + .setRegion(Country.FINLAND) .setLogo(R.drawable.network_hsl_logo) .setStatus(BETA) .build(), @@ -392,13 +392,13 @@ public interface TransportNetworks { new TransportNetworkBuilder() .setId(NetworkId.TLEM) .setDescription(R.string.np_desc_tlem) - .setRegion(Region.GREAT_BRITAIN) + .setRegion(Country.GREAT_BRITAIN) .build(), new TransportNetworkBuilder() .setId(NetworkId.MERSEY) .setName(R.string.np_name_mersey) .setDescription(R.string.np_desc_mersey) - .setRegion(Region.GREAT_BRITAIN) + .setRegion(Country.GREAT_BRITAIN) .setLogo(R.drawable.network_mersey_logo) .build(), @@ -407,7 +407,7 @@ public interface TransportNetworks { new TransportNetworkBuilder() .setId(NetworkId.TFI) .setDescription(R.string.np_desc_tfi) - .setRegion(Region.IRELAND) + .setRegion(Country.IRELAND) .setLogo(R.drawable.network_tfi_logo) .build(), @@ -418,7 +418,7 @@ public interface TransportNetworks { .setName(R.string.np_name_it) .setDescription(R.string.np_desc_it) .setAgencies(R.string.np_desc_it_networks) - .setRegion(Region.ITALY) + .setRegion(Continent.EUROPE) .setLogo(R.drawable.network_it_logo) .setStatus(BETA) .setGoodLineNames(true) @@ -430,7 +430,7 @@ public interface TransportNetworks { .setId(NetworkId.PL) .setName(R.string.np_name_pl) .setDescription(R.string.np_desc_pl) - .setRegion(Region.POLAND) + .setRegion(Country.POLAND) .setLogo(R.drawable.network_pl_logo) .build(), @@ -440,7 +440,7 @@ public interface TransportNetworks { .setId(NetworkId.DUB) .setName(R.string.np_name_dub) .setDescription(R.string.np_desc_dub) - .setRegion(Region.UAE) + .setRegion(Country.UAE) .setStatus(BETA) .build(), @@ -451,7 +451,7 @@ public interface TransportNetworks { .setName(R.string.np_name_rtachicago) .setDescription(R.string.np_desc_rtachicago) .setAgencies(R.string.np_desc_rtachicago_networks) - .setRegion(Region.USA) + .setRegion(Country.USA) .setLogo(R.drawable.network_rtachicago_logo) .setStatus(BETA) .build(), @@ -459,7 +459,7 @@ public interface TransportNetworks { .setId(NetworkId.CALIFORNIA) .setName(R.string.np_name_california) .setDescription(R.string.np_desc_california) - .setRegion(Region.USA) + .setRegion(Country.USA) .setLogo(R.drawable.network_california_logo) .setStatus(ALPHA) .build(), @@ -467,7 +467,7 @@ public interface TransportNetworks { .setId(NetworkId.OREGON) .setName(R.string.np_name_oregon) .setDescription(R.string.np_desc_oregon) - .setRegion(Region.USA) + .setRegion(Country.USA) .setLogo(R.drawable.network_oregon_logo) .setStatus(ALPHA) .build(), @@ -475,7 +475,7 @@ public interface TransportNetworks { .setId(NetworkId.NEWYORK) .setName(R.string.np_name_usny) .setDescription(R.string.np_desc_usny) - .setRegion(Region.USA) + .setRegion(Country.USA) .setStatus(ALPHA) .build(), @@ -486,7 +486,7 @@ public interface TransportNetworks { .setName(R.string.np_name_australia) .setDescription(R.string.np_desc_australia) .setAgencies(R.string.np_desc_australia_networks) - .setRegion(Region.AUSTRALIA) + .setRegion(Country.AUSTRALIA) .setLogo(R.drawable.network_aus_logo) .setStatus(BETA) .build(), @@ -495,7 +495,7 @@ public interface TransportNetworks { .setId(NetworkId.SYDNEY) .setName(R.string.np_name_sydney) .setDescription(R.string.np_desc_sydney) - .setRegion(Region.AUSTRALIA) + .setRegion(Country.AUSTRALIA) .setLogo(R.drawable.network_sydney_logo) .build(), @@ -506,7 +506,7 @@ public interface TransportNetworks { .setName(R.string.np_name_paris) .setDescription(R.string.np_desc_paris) .setAgencies(R.string.np_desc_paris_networks) - .setRegion(Region.FRANCE) + .setRegion(Country.FRANCE) .setLogo(R.drawable.network_paris_logo) .setStatus(BETA) .build(), @@ -515,7 +515,7 @@ public interface TransportNetworks { .setName(R.string.np_name_frenchsouthwest) .setDescription(R.string.np_desc_frenchsouthwest) .setAgencies(R.string.np_desc_frenchsouthwest_networks) - .setRegion(Region.FRANCE) + .setRegion(Country.FRANCE) .setLogo(R.drawable.network_francesouthwest_logo) .setStatus(BETA) .setGoodLineNames(true) @@ -525,7 +525,7 @@ public interface TransportNetworks { .setName(R.string.np_name_francenortheast) .setDescription(R.string.np_desc_francenortheast) .setAgencies(R.string.np_desc_francenortheast_networks) - .setRegion(Region.FRANCE) + .setRegion(Country.FRANCE) .setLogo(R.drawable.network_francenortheast_logo) .setStatus(ALPHA) .setGoodLineNames(true) @@ -535,7 +535,7 @@ public interface TransportNetworks { .setName(R.string.np_name_francenorthwest) .setDescription(R.string.np_desc_francenorthwest) .setAgencies(R.string.np_desc_francenorthwest_networks) - .setRegion(Region.FRANCE) + .setRegion(Country.FRANCE) .setLogo(R.drawable.network_francenorthwest_logo) .setStatus(ALPHA) .build(), @@ -544,7 +544,7 @@ public interface TransportNetworks { .setName(R.string.np_name_frenchsoutheast) .setDescription(R.string.np_desc_frenchsoutheast) .setAgencies(R.string.np_desc_frenchsoutheast_networks) - .setRegion(Region.FRANCE) + .setRegion(Country.FRANCE) .setLogo(R.drawable.network_francesoutheast_logo) .setStatus(BETA) .setGoodLineNames(true) @@ -557,7 +557,7 @@ public interface TransportNetworks { .setName(R.string.np_name_nz) .setDescription(R.string.np_desc_nz) .setAgencies(R.string.np_desc_nz_networks) - .setRegion(Region.NEW_ZEALAND) + .setRegion(Continent.OCEANIA) .setLogo(R.drawable.network_nz_logo) .setStatus(BETA) .build(), @@ -569,7 +569,7 @@ public interface TransportNetworks { .setName(R.string.np_name_spain) .setDescription(R.string.np_desc_spain) .setAgencies(R.string.np_desc_spain_networks) - .setRegion(Region.SPAIN) + .setRegion(Continent.EUROPE) .setLogo(R.drawable.network_spain_logo) .setStatus(BETA) .build(), @@ -581,7 +581,7 @@ public interface TransportNetworks { .setName(R.string.np_name_br) .setDescription(R.string.np_desc_br) .setAgencies(R.string.np_desc_br_networks) - .setRegion(Region.BRAZIL) + .setRegion(Country.BRAZIL) .setLogo(R.drawable.network_br_logo) .setStatus(ALPHA) .setGoodLineNames(true) @@ -591,7 +591,7 @@ public interface TransportNetworks { .setName(R.string.np_name_br_floripa) .setDescription(R.string.np_desc_br_floripa) .setAgencies(R.string.np_desc_br_floripa_networks) - .setRegion(Region.BRAZIL) + .setRegion(Country.BRAZIL) .setLogo(R.drawable.network_brfloripa_logo) .setStatus(ALPHA) .setGoodLineNames(true) @@ -604,7 +604,7 @@ public interface TransportNetworks { .setName(R.string.np_name_ontario) .setDescription(R.string.np_desc_ontario) .setAgencies(R.string.np_desc_ontario_networks) - .setRegion(Region.CANADA) + .setRegion(Country.CANADA) .setLogo(R.drawable.network_ontario_logo) .setStatus(BETA) .setGoodLineNames(true) @@ -614,7 +614,7 @@ public interface TransportNetworks { .setName(R.string.np_name_quebec) .setDescription(R.string.np_desc_quebec) .setAgencies(R.string.np_desc_quebec_networks) - .setRegion(Region.CANADA) + .setRegion(Country.CANADA) .setLogo(R.drawable.network_quebec_logo) .setStatus(ALPHA) .setGoodLineNames(true) @@ -627,7 +627,7 @@ public interface TransportNetworks { .setName(R.string.np_name_costa_rica) .setDescription(R.string.np_desc_costa_rica) .setAgencies(R.string.np_desc_costa_rica_networks) - .setRegion(Region.COSTA_RICA) + .setRegion(Continent.CENTRAL_AMERICA) .setStatus(ALPHA) .setGoodLineNames(true) .build(), @@ -638,7 +638,7 @@ public interface TransportNetworks { .setId(NetworkId.GHANA) .setName(R.string.np_name_ghana) .setDescription(R.string.np_desc_ghana) - .setRegion(Region.AFRICA) + .setRegion(Continent.AFRICA) .setStatus(ALPHA) .setGoodLineNames(true) .build(), @@ -649,7 +649,7 @@ public interface TransportNetworks { .setId(NetworkId.NICARAGUA) .setName(R.string.np_name_nicaragua) .setDescription(R.string.np_desc_nicaragua) - .setRegion(Region.CENTRAL_AMERICA) + .setRegion(Continent.CENTRAL_AMERICA) .setLogo(R.drawable.network_nicaragua_logo) .setStatus(ALPHA) .setGoodLineNames(true) diff --git a/app/src/main/res/drawable/continent_africa.xml b/app/src/main/res/drawable/continent_africa.xml new file mode 100644 index 000000000..aed90f876 --- /dev/null +++ b/app/src/main/res/drawable/continent_africa.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_asia.xml b/app/src/main/res/drawable/continent_asia.xml new file mode 100644 index 000000000..014399000 --- /dev/null +++ b/app/src/main/res/drawable/continent_asia.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_central_america.xml b/app/src/main/res/drawable/continent_central_america.xml new file mode 100644 index 000000000..56f85bcd7 --- /dev/null +++ b/app/src/main/res/drawable/continent_central_america.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_europe.xml b/app/src/main/res/drawable/continent_europe.xml new file mode 100644 index 000000000..d21fb9f9e --- /dev/null +++ b/app/src/main/res/drawable/continent_europe.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_north_america.xml b/app/src/main/res/drawable/continent_north_america.xml new file mode 100644 index 000000000..c6d96c75a --- /dev/null +++ b/app/src/main/res/drawable/continent_north_america.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_oceania.xml b/app/src/main/res/drawable/continent_oceania.xml new file mode 100644 index 000000000..7e9ea649d --- /dev/null +++ b/app/src/main/res/drawable/continent_oceania.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/continent_south_america.xml b/app/src/main/res/drawable/continent_south_america.xml new file mode 100644 index 000000000..b8d5a6532 --- /dev/null +++ b/app/src/main/res/drawable/continent_south_america.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_pick_transport_network.xml b/app/src/main/res/layout/activity_pick_transport_network.xml index 7e56243b8..615767fd8 100644 --- a/app/src/main/res/layout/activity_pick_transport_network.xml +++ b/app/src/main/res/layout/activity_pick_transport_network.xml @@ -49,6 +49,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" - tools:listitem="@layout/list_item_transport_region"/> + tools:listitem="@layout/list_item_transport_continent"/> diff --git a/app/src/main/res/layout/list_item_transport_continent.xml b/app/src/main/res/layout/list_item_transport_continent.xml new file mode 100644 index 000000000..34aa9ca4a --- /dev/null +++ b/app/src/main/res/layout/list_item_transport_continent.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/layout/list_item_transport_region.xml b/app/src/main/res/layout/list_item_transport_country.xml similarity index 78% rename from app/src/main/res/layout/list_item_transport_region.xml rename to app/src/main/res/layout/list_item_transport_country.xml index ba7711c13..07874c10c 100644 --- a/app/src/main/res/layout/list_item_transport_region.xml +++ b/app/src/main/res/layout/list_item_transport_country.xml @@ -1,24 +1,23 @@ + tools:text="Network Provider Country"/> Quebec Dinamarca Dinamarca, Copenhagen - Europa Europa Finlàndia Helsinki @@ -136,7 +135,6 @@ Irlanda, Dublin, Belfast Israel Israel, Jerusalem - Itàlia Itàlia Liechtenstein Liechtenstein, Vorarlberg, Bregenz @@ -146,11 +144,9 @@ Holanda, Amsterdam Noruega Noruega, Oslo, Bergen - Nova Zelanda Nova Zelanda Polònia Polònia, trens a Polònia - Espanya Espanya Suècia Suècia, Estocolm diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 263e18822..d442f0ed1 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -78,10 +78,8 @@ Co je nového Více... Mnoho autobusových linek, žádné Executivos - Evropa Evropa Většina Německa - Španělsko Španělsko Spojené arabské Emiráty, Dubai diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index f089a201f..5bf0ac213 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -149,6 +149,13 @@ es welche gibt) anzeigen lassen. Änderungsprotokoll Was gibt\'s Neues Mehr… + Europa + Afrika + Nordamerika + Zentralamerika + Südamerika + Asien + Ozeanien Australien Melbourne, Sydney, Brisbane, Perth, Adelaide, Hobart, Launceston, Burnie Australien, Neusüdwales, Sydney @@ -174,7 +181,6 @@ es welche gibt) anzeigen lassen. Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Québec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Dänemark Dänemark, Kopenhagen - Europa Europa Nur Fernzüge Railteam-Allianz @@ -231,7 +237,6 @@ es welche gibt) anzeigen lassen. Irland, Dublin, Belfast Israel Israel, Jerusalem - Italien Italien Rom, Mailand, Turin, Venedig, Palermo, Trient Liechtenstein @@ -244,12 +249,10 @@ es welche gibt) anzeigen lassen. Sämtliche öffentliche Verkehrsmittel in Belgien Norwegen Norwegen, Oslo, Bergen - Neuseeland Neuseeland Neuseeland, Wellington, Auckland Polen Polen, Eisenbahnen in Polen - Spanien Spanien Madrid, Barcelona, Baskenland, Valencia, Alicante, Mallorca, Menorca, Teneriffa, La Palma, Navarra Schweden @@ -270,9 +273,7 @@ es welche gibt) anzeigen lassen. Öffentliche Verkehrsmittel in Kalifornien (USA) Oregon Global Transport im Bundesstaat Oregon (USA) - Costa Rica Costa Rica - Afrika Ghana Accra Koordinator diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index fd18c39a3..11bcfb4dd 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -167,7 +167,6 @@ Vi ankaŭ povas esplori proksimajn staciojn kaj rigardi baldaŭajn forveturojn i Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Kebekio, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montrealo, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danujo Danujo, Kopenhago - Eŭropo Eŭropo Nur long-distancaj vagonaroj Societo Railteam @@ -224,7 +223,6 @@ Vi ankaŭ povas esplori proksimajn staciojn kaj rigardi baldaŭajn forveturojn i Irlando, Dublino, Belfasto Israelo Israelo, Jerusalemo - Italujo Italujo Romo, Milano, Torino, Venecio, Palermo, Trento Liĥtenŝtejno @@ -237,12 +235,10 @@ Vi ankaŭ povas esplori proksimajn staciojn kaj rigardi baldaŭajn forveturojn i Publika transporto en Nederlando Norvegujo Norvegujo, Oslo, Bergen - Nov-Zelando Nov-Zelando Nov-Zelando, Velingtono, Auckland Polujo Polujo, fervojo en Polujo - Hispanujo Hispanujo Madrido, Barcelono, Eŭskujo, Valencio, Alakanto, Majorko, Minorko, Tenerifo, La Palma, Navaro Svedujo @@ -263,9 +259,7 @@ Vi ankaŭ povas esplori proksimajn staciojn kaj rigardi baldaŭajn forveturojn i Publika transporto en Kalifornio (Usono) Oregono Global Transport en Oregono Ŝtato (Usono) - Kostariko Kostariko - Afriko Ganao Akrao Prizorganto diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5c4403197..84aa03913 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -105,6 +105,13 @@ Inténtelo de nuevo más tarde, por favor. Cambios Novedades Más... + Europa + Africa + América del Norte + América Central + América del Sur + Asia + Oceanía Australia Australia, Nueva Gales del Sur, Sídney Austria @@ -129,7 +136,6 @@ Inténtelo de nuevo más tarde, por favor. Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Dinamarca Dinamarca, Copenhague - Europa Europa sólo larga distancia Alianza Railteam @@ -186,7 +192,6 @@ Inténtelo de nuevo más tarde, por favor. Irlanda, Dublín, Belfast Israel Israel, Jerusalén - Italia Italia Roma, Milano, Turín, Venecia, Palermo, Trento Liechtenstein @@ -199,13 +204,11 @@ Inténtelo de nuevo más tarde, por favor. Todo el transporte público de Países Bajos Noruega Noruega, Oslo, Bergen - Nueva Zelanda Nueva Zelanda Nueva Zelanda, Wellington, Auckland Polonia Polonia, lineas de ferrocarriles en Polonia - España - España + España Madrid, Barcelona, Euskadi - País Vasco, Valencia, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra Suecia Suecia, Estocolmo diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index c699e062c..3f08542bd 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -172,7 +172,6 @@ Hurbileko geltokiak aurkitu ditzakezu ere eta hurrengo irteerak ikusi atzerapek Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danimarka Danimarka, Kopenhage - Europa Europa Distantzia handiko trenak soilik Railteam aliantza @@ -229,7 +228,6 @@ Hurbileko geltokiak aurkitu ditzakezu ere eta hurrengo irteerak ikusi atzerapek Irlanda, Dublin, Belfast Israel Israel, Jerusalem - Italia Italia Roma, Milan, Turin, Venezia, Palermo, Trento Liechtenstein @@ -242,12 +240,10 @@ Hurbileko geltokiak aurkitu ditzakezu ere eta hurrengo irteerak ikusi atzerapek Herbehereetako garraio publiko guztia Norvegia Norvegia, Oslo, Bergen - Zeelanda Berria Zeelanda Berria Zeelanda Berria, Wellington, Auckland Polonia Polonia, Poloniako trenbideak - Espainia Espainia Madril, Bartzelona, Euskadi, Nafarroa, Valentzia, Alacant, Mallorca, Menorca, Tenerife, La Palma Suedia @@ -268,9 +264,7 @@ Hurbileko geltokiak aurkitu ditzakezu ere eta hurrengo irteerak ikusi atzerapek Kaliforniako (EEBB) garraio publikoa Oregon Oregon estatuko (EEBB) garraio orokorra - Costa Rica Costa Rica - Afrika Ghana Accra Mantentzailea diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 02eb94331..7c471d6d3 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -168,7 +168,6 @@ Vous pouvez aussi découvrir les arrêts, stations alentour et afficher les proc Deux-Montagnes, Laval, L’Assomption, Outaouais, Sud-Ouest, Québec, Haut-Saint-Laurent, Lanaudière, La Presqu’Île, Laurentides, Montréal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danemark Danemark, Copenhague - Europe Europe Trains longue distance seulement Alliance Railteam @@ -225,7 +224,6 @@ Vous pouvez aussi découvrir les arrêts, stations alentour et afficher les proc Irlande, Dublin, Belfast Israël Israël, Jérusalem - Italie Italie Rome, Milan, Turin, Venise, Palerme, Trente Liechtenstein @@ -238,12 +236,10 @@ Vous pouvez aussi découvrir les arrêts, stations alentour et afficher les proc Tous les transports en commun des Pays-Bas Norvège Norvège, Oslo, Bergen - Nouvelle-Zélande Nouvelle-Zélande Nouvelle-Zélande, Wellington, Auckland Pologne Pologne, chemins de fer en Pologne - Espagne Espagne Madrid, Barcelone, Pays basque, Valence, Alicante, Majorque, Minore, Tenerife, La Palma, Navarre Suède @@ -264,9 +260,7 @@ Vous pouvez aussi découvrir les arrêts, stations alentour et afficher les proc Transports en commun en Californie (É.-U.) Oregon « Global Transport » dans l’état de l’Oregon (É.-U.) - Costa Rica Costa Rica - Afrique Ghana Accra Mainteneur diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index e3ad83802..7de0558a2 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -120,7 +120,6 @@ A Transportr irányt mutat az otthonodtól, jelenlegi helyzetedtől vagy egy ado Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Dánia Dánia, Koppenhága - Európa Európa Csak hosszútávú vonatok Railteam alliance @@ -177,7 +176,6 @@ A Transportr irányt mutat az otthonodtól, jelenlegi helyzetedtől vagy egy ado Írország, Dublin, Belfast Izrael Izrael, Jeruzsálem - Olaszország Olaszország Róma, Milánó, Torinó, Velence, Palermo, Trento Liechtenstein @@ -190,13 +188,11 @@ A Transportr irányt mutat az otthonodtól, jelenlegi helyzetedtől vagy egy ado A teljes Holland tömegközlekedési hálózat Norvégia Norvégia, Oslo, Bergen - Új-zéland Új-zéland Új-Zéland, Welligton, Auckland Lengyelország Lengyelország, vasúti útvonalak Lengyelországban - Spanyolország - Spanyolország + Spanyolország Madrid, Barcelona, Baszkföld, Valencia, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra Svédország Svédország, Stockholm diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 604604697..fd158ee82 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -168,7 +168,6 @@ Puoi anche scoprire stazioni vicine e visualizzare le prossime partenze, inclusi Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danimarca Danimarca, Copenhagen - Europa Europa Solo treni a lunga percorrenza Railteam @@ -225,7 +224,6 @@ Puoi anche scoprire stazioni vicine e visualizzare le prossime partenze, inclusi Irlanda, Dublino, Belfast Israele Israele, Gerusalemme - Italia Italia Roma, Milano, Torino, Venezia, Palermo, Trento Liechtenstein @@ -238,12 +236,10 @@ Puoi anche scoprire stazioni vicine e visualizzare le prossime partenze, inclusi Tutti i trasporti pubblici nei Paesi Bassi Norvegia Norvegia, Oslo, Bergen - Nuova Zelanda Nuova Zelanda Nuova Zelanda, Wellington, Auckland Polonia Polonia, ferrovie in Polonia - Spagna Spagna Madrid, Barcellona, Paesi Baschi, Valencia, Alicante, Maiorca, Menorca, Tenerife, La Palma, Navarra Svezia @@ -264,10 +260,6 @@ Puoi anche scoprire stazioni vicine e visualizzare le prossime partenze, inclusi Trasporto pubblico in California (USA) Oregon Trasporto pubblico nello Stato dell\'Oregon (USA) - Costa Rica - Costa Rica - Africa - Ghana Accra Mantenitori Contributori diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 74b3ed7f8..9eb0b2daa 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -171,7 +171,6 @@ ドゥ-モンターニュ、ラバル、ラソンプシオン、ウタウエ、南西部、ケベック、オー-サン-ローラン、ラノディエール地域、ラ・プレスクイル、ローレンティッド地域、モントリオール、レムーラン、リシュリューバレー、シャンブリーリシュリュー-カリニャン、ルシヨン、ソレル-ヴァレンヌザ、Le Richelain、シャーブルック、サントジュリー デンマーク デンマーク、コペンハーゲン - ヨーロッパ ヨーロッパ 長距離列車のみ 鉄道アライアンス @@ -228,7 +227,6 @@ アイルランド、ダブリン、ベルファスト イスラエル イスラエル、エルサレム - イタリア イタリア ローマ、ミラノ、トリノ、ヴェネツィア、パレルモ、トレント リヒテンシュタイン @@ -241,12 +239,10 @@ オランダのすべての公共交通機関 ノルウェー ノルウェー、オスロ、ベルゲン - ニュージーランド ニュージーランド ニュージーランド、ウェリントン、オークランド ポーランド ポーランド、ポーランドの鉄道 - スペイン スペイン マドリード、バルセロナ、バスク地方、バレンシア、アリカンテ、マヨルカ、メノルカ、テネリフェ、ラ・パルマ、ナバラ スウェーデン @@ -267,9 +263,7 @@ カリフォルニアの公共交通機関 (米国) オレゴン オレゴン州 (米国) のグローバルトランスポート - コスタリカ コスタリカ - アフリカ ガーナ アクラ メンテナー diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 0a78e0a43..832f97b2b 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -173,7 +173,6 @@ Du kan oppdage stasjoner i nærheten og vise kommende avganger, inkludert forsin Deux-Montagnes, Laval, L\'Assomption, Outaouais, Le Sud-Ouest, Québec, Montérégie, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danmark Danmark, København - Europa Europa Bare langdistansetog Railteam-alliansen @@ -230,7 +229,6 @@ Du kan oppdage stasjoner i nærheten og vise kommende avganger, inkludert forsin Irland, Dublin, Belfast Israel Israel, Jerusalem - Italia Italia Rom, Milano, Torino, Venedig, Palermo, Trient Liechtenstein @@ -243,12 +241,10 @@ Du kan oppdage stasjoner i nærheten og vise kommende avganger, inkludert forsin All offentlig transport i Holland Norge Norge, Oslo, Bergen - Ny-Zealand Ny-Zealand Ny-Zealand, Wellington, Auckland Polen Polen, jernbane i Polen - Spania Spania Madrid, Barcelona, Baskerland, Valencia, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra Sverige @@ -268,9 +264,7 @@ Du kan oppdage stasjoner i nærheten og vise kommende avganger, inkludert forsin California Oregon Transport for hele staten Oregon (USA) - Costa Rica Costa Rica - Afrika Ghana Accra Utgivelsesansvarlig diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 0589a0a43..4ab7f0c22 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -123,7 +123,6 @@ Je kan ook dichtbijgelegen stations vinden en vertrektijden bekijken, inclusief Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Denemarken Denemarken, Kopenhagen - Europa Europa Alleen langeafstandstreinen Railteam-alliantie @@ -180,7 +179,6 @@ Je kan ook dichtbijgelegen stations vinden en vertrektijden bekijken, inclusief Ierland, Dublin, Belfast Israël Israël, Jeruzalem - Italië Italie Rome, Milaan, Turijn, Venetië, Palermo, Trente Liechtenstein @@ -193,12 +191,10 @@ Je kan ook dichtbijgelegen stations vinden en vertrektijden bekijken, inclusief Alle OV in Nederland Noorwegen Noorwegen, Oslo, Bergen - Nieuw-Zeeland Nieuw-Zeeland Nieuw-Zeeland, Wellington, Auckland Polen Polen, spoorwegen in Polen - Spanje Spanje Zweden Zweden, Stockholm diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index c5b974c9f..77e32cfb2 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -169,7 +169,6 @@ Możesz także przeszukiwać pobliskie stacje i przyszłe odjazdy wraz z opóźn Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Dania Dania, Kopenhaga - Europa Europa Tylko pociągi długodystansowe Sieć Railteam @@ -226,7 +225,6 @@ Możesz także przeszukiwać pobliskie stacje i przyszłe odjazdy wraz z opóźn Irlandia, Dublin, Belfast Izrael Izrael, Jerozolima - Włochy Włochy Rzym, Mediolan, Turyn, Wenecja, Palermo, Trydent Liechtenstein @@ -239,12 +237,10 @@ Możesz także przeszukiwać pobliskie stacje i przyszłe odjazdy wraz z opóźn Transport publiczny w Holandii Norwegia Norwegia, Oslo, Bergen - Nowa Zelandia Nowa Zelandia Nowa Zelandia, Wellington, Auckland Polska Polska, koleje w Polsce - Hiszpania Hiszpania Madryt, Barcelona, Kraj Basków, Walencja, Alicante, Majorka, Minorka, Teneryfa, La Palma, Nawarra Szwecja @@ -265,9 +261,7 @@ Możesz także przeszukiwać pobliskie stacje i przyszłe odjazdy wraz z opóźn Transport publiczny w Stanie Kalifornia (USA) Oregon Global Transport w stanie Oregon (USA) - Kostaryka Kostaryka - Afryka Ghana Akra Opiekun diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index d51383551..15a6a4b4d 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -168,7 +168,6 @@ Você pode também descobrir terminais por perto e visualizar os ônibus que est Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Dinamarca Dinamarca, Copenhague - Europa Europa Apenas trens de longa distancia aliança Railteam @@ -217,7 +216,6 @@ Você pode também descobrir terminais por perto e visualizar os ônibus que est Irlanda, Dublin, Belfast Israel Israel, Jerusalém - Itália Itália Liechtenstein Liechtenstein, Vorarlberg, Bregenz @@ -227,11 +225,9 @@ Você pode também descobrir terminais por perto e visualizar os ônibus que est Países Baixos, Amsterdã Noruega Noruega, Oslo, Bergen - Nova Zelândia Nova Zelândia Polônia Polônia, ferrovias na Polônia - Espanha Espanha Suécia Suécia, Estocolmo @@ -250,9 +246,7 @@ Você pode também descobrir terminais por perto e visualizar os ônibus que est Transporte público na Califórnia (EUA) Oregon Transporte Global no estado de Oregon (EUA) - Costa Rica Costa Rica - África Gana Mantenedores Contribuidores diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 45ce9f3cf..8eb8b0cf3 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -82,7 +82,6 @@ Transportr, நீங்கள் வசிக்கும் இடத்தி கனடா டென்மார்க் டென்மார்க், கோபன்ஹேகன் - ஐரோப்பா ஐரோப்பா ஃபின்லாந்து ஹெல்சின்கி @@ -105,7 +104,6 @@ Transportr, நீங்கள் வசிக்கும் இடத்தி ஐயர்லாந்து, டப்லின், பெல்ஃபாஸ்ட் இஸ்ரேல் இஸ்ரேல், ஜெருசலேம் - இத்தாலி இத்தாலி லக்ஸம்பர்க் லக்ஸம்பர்க் @@ -113,10 +111,8 @@ Transportr, நீங்கள் வசிக்கும் இடத்தி நெதர்லாந்து, ஆம்ஸ்டர்டாம் நார்வே நார்வே, ஓஸ்லோ, பெர்கென் - நியூசிலாந்து நியூசிலாந்து போலாந்து - ஸ்பெயின் ஸ்பெயின் சுவீடன் சுவீடன், ஸ்டாக்ஹோம் diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 5212cd075..a5e9b79f3 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -100,7 +100,6 @@ Deux-Montagnes, Laval, L\'Assomption, Outaouais, Sud-Ouest, Quebec, Haut-Saint-Laurent, Lanaudière, La Presqu\'Île, Laurentides, Montreal, Les Moulins, Vallée du Richelieu, Chambly-Richelieu-Carignan, Roussillon, Sorel-Varennes, Le Richelain, Sherbrooke, Sainte-Julie Danimarka Danimarka, Kopenhag - Avrupa Avrupa Sadece Uzun Yol Trenleri Finlandiya @@ -156,7 +155,6 @@ İrlanda, Dublin, Belfast İsrail İsrail, Kudüs - İtalya İtalya Roma, Milan, Turin, Venedik, Palermo, Trento Lihtenştayn @@ -168,12 +166,10 @@ Hollanda\'daki tüm toplu taşımalar Norveç Norveç, Oslo, Bergen - Yeni Zelanda Yeni Zelanda Yeni Zelanda, Wellington, Auckland Polonya Polonya, Polonya demiryolları - İspanya İspanya Madrid, Barselona, Bask Ülkesi, Valensiya, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra İsveç diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e9097b1e9..a777c6094 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -178,6 +178,14 @@ there are any). Changelog What\'s New More… + + Europe + Africa + North America + Central America + South America + Asia + Oceania Australia Australia @@ -222,7 +230,6 @@ there are any). Denmark Denmark, Copenhagen - Europe Europe Long-distance trains only Railteam alliance @@ -299,7 +306,6 @@ there are any). Israel Israel, Jerusalem - Italy Italy Rome, Milan, Turin, Venice, Palermo, Trento ATM, GTT, AMAT, ACTV @@ -321,7 +327,6 @@ there are any). Norway Norway, Oslo, Bergen - New Zealand New Zealand New-Zealand, Wellington, Auckland Go Wellington, Tranz Metro, Auckland Transport @@ -330,7 +335,6 @@ there are any). PKP Poland, railways in Poland - Spain Spain Madrid, Barcelona, Basque Country, Valencia, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra CRTM, TMB, FGC, Moveuskadi, Metrovalencia, EMT Valencia, TRAM, CTM, EMT Palma, CIME, Tranvía, TITSA, TILP, Transporte Interurbano de Navarra @@ -360,12 +364,10 @@ there are any). Oregon Global Transport in Oregon State (USA) - Costa Rica Costa Rica Tren Urbano INCOFER - Africa Ghana Accra diff --git a/artwork/continent_africa.svg b/artwork/continent_africa.svg new file mode 100644 index 000000000..e51a95242 --- /dev/null +++ b/artwork/continent_africa.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_asia.svg b/artwork/continent_asia.svg new file mode 100644 index 000000000..a11ba8716 --- /dev/null +++ b/artwork/continent_asia.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_central_america.svg b/artwork/continent_central_america.svg new file mode 100644 index 000000000..97eca63b2 --- /dev/null +++ b/artwork/continent_central_america.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_europe.svg b/artwork/continent_europe.svg new file mode 100644 index 000000000..210b576f3 --- /dev/null +++ b/artwork/continent_europe.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_north_america.svg b/artwork/continent_north_america.svg new file mode 100644 index 000000000..051716c53 --- /dev/null +++ b/artwork/continent_north_america.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_oceania.svg b/artwork/continent_oceania.svg new file mode 100644 index 000000000..45101f85a --- /dev/null +++ b/artwork/continent_oceania.svg @@ -0,0 +1,12 @@ + + + + diff --git a/artwork/continent_south_america.svg b/artwork/continent_south_america.svg new file mode 100644 index 000000000..55a9bd4c4 --- /dev/null +++ b/artwork/continent_south_america.svg @@ -0,0 +1,12 @@ + + + +