9 | *
10 | * This program is free software: you can redistribute it and/or modify
11 | * it under the terms of the GNU General Public License as published by
12 | * the Free Software Foundation, either version 3 of the License, or
13 | * (at your option) any later version.
14 | *
15 | * This program is distributed in the hope that it will be useful,
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | * GNU General Public License for more details.
19 | *
20 | * You should have received a copy of the GNU General Public License
21 | * along with this program. If not, see .
22 | */
23 |
24 | package com.codebutler.farebot.transit.stub;
25 |
26 | import android.content.res.Resources;
27 | import androidx.annotation.NonNull;
28 |
29 | import com.google.auto.value.AutoValue;
30 |
31 | /**
32 | * Stub implementation for Adelaide Metrocard (AU).
33 | *
34 | * https://github.com/micolous/metrodroid/wiki/Metrocard-%28Adelaide%29
35 | */
36 | @AutoValue
37 | public abstract class AdelaideMetrocardStubTransitInfo extends StubTransitInfo {
38 |
39 | @NonNull
40 | @Override
41 | public String getCardName(@NonNull Resources resources) {
42 | return "Metrocard (Adelaide)";
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/farebot-app/src/main/java/com/codebutler/farebot/app/core/activity/ActivityOperations.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * ActivityOperations.kt
3 | *
4 | * This file is part of FareBot.
5 | * Learn more at: https://codebutler.github.io/farebot/
6 | *
7 | * Copyright (C) 2017 Eric Butler
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | */
22 |
23 | package com.codebutler.farebot.app.core.activity
24 |
25 | import androidx.appcompat.app.AppCompatActivity
26 | import androidx.appcompat.view.ActionMode
27 | import android.view.MenuItem
28 | import io.reactivex.Observable
29 |
30 | /**
31 | * interface for screens to interact with parent activity.
32 | */
33 | class ActivityOperations(
34 | private val activity: AppCompatActivity,
35 | val activityResult: Observable,
36 | val menuItemClick: Observable