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
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+38 −0
Diff settings

Always

Just for now

@@ -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,

This comment has been minimized.

@grote

grote Jul 25, 2018

Owner

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

This comment has been minimized.

@urbalazs

urbalazs Jul 26, 2018

Author Contributor

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>

This comment has been minimized.

@grote

grote Jul 26, 2018

Owner

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

This comment has been minimized.

@urbalazs

urbalazs Jul 26, 2018

Author Contributor

Done.

status = BETA,
factory = { HungaryProvider(NAVITIA) }
)
)
)
)
),
@@ -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>
@@ -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>

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 6 3">
<rect fill="#436F4D" width="6" height="3"/>
<rect fill="#FFF" width="6" height="2"/>
<rect fill="#CD2A3E" width="6" height="1"/>
</svg>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.