Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Hungary provider #451

Merged
merged 2 commits into from Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -530,6 +530,19 @@ private val networks = arrayOf(
factory = { SpainProvider(NAVITIA) }
)
)
),
Country(
R.string.np_name_hungary, flag = "🇭🇺", networks = listOf(
TransportNetwork(
id = NetworkId.HUNGARY,
name = R.string.np_name_hungary,
description = R.string.np_desc_hungary,
agencies = R.string.np_desc_hungary_networks,
logo = R.drawable.network_hungary_logo,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? Looks like this logo doesn't actually get added. You need to transform the SVG into an AndroidVectorDrawable, see #238

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @grote
here is the Hungary logo in AndroidVectorDrawable format:

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:viewportWidth="6"
    android:viewportHeight="3"
    android:width="64dp"
    android:height="64dp">
    <path
        android:pathData="M0 0L6 0 6 3 0 3Z"
        android:fillColor="#436f4d" />
    <path
        android:pathData="M0 0L6 0 6 2 0 2Z"
        android:fillColor="#ffffff" />
    <path
        android:pathData="M0 0L6 0 6 1 0 1Z"
        android:fillColor="#cd2a3e" />
</vector>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you mind adding it to your pull request?
It needs to go to app/src/main/res/drawable/network_hungary_logo.xml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

status = BETA,
factory = { HungaryProvider(NAVITIA) }
)
)
)
)
),
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/network_hungary_logo.xml
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="6"
android:viewportHeight="3"
android:width="64dp"
android:height="64dp">
<path
android:pathData="M0 0L6 0 6 3 0 3Z"
android:fillColor="#436f4d" />
<path
android:pathData="M0 0L6 0 6 2 0 2Z"
android:fillColor="#ffffff" />
<path
android:pathData="M0 0L6 0 6 1 0 1Z"
android:fillColor="#cd2a3e" />
</vector>
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Expand Up @@ -374,6 +374,10 @@ and always knows where you are to not miss where to get off the bus.
<string name="np_desc_spain">Madrid, Barcelona, Basque Country, Valencia, Alicante, Mallorca, Menorca, Tenerife, La Palma, Navarra</string>
<string name="np_desc_spain_networks" translatable="false">CRTM, TMB, FGC, Moveuskadi, Metrovalencia, EMT Valencia, TRAM, CTM, EMT Palma, CIME, Tranvía, TITSA, TILP, Transporte Interurbano de Navarra</string>

<string name="np_name_hungary">Hungary</string>
<string name="np_desc_hungary">Budapest, Miskolc</string>
<string name="np_desc_hungary_networks" translatable="false">BKK, MKV</string>

<string name="np_region_sweden">Sweden</string>
<string name="np_desc_se">Sweden, Stockholm</string>

Expand Down
5 changes: 5 additions & 0 deletions artwork/networks/network_hungary_logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.