Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/fragments/FragmentListener.java
/* | /* | ||||
BusTO - Fragments components | BusTO - Fragments components | ||||
Copyright (C) 2018 Fabio Mazza | Copyright (C) 2018 Fabio Mazza | ||||
This program is free software: you can redistribute it and/or modify | 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 | it under the terms of the GNU General Public License as published by | ||||
the Free Software Foundation, either version 3 of the License, or | the Free Software Foundation, either version 3 of the License, or | ||||
(at your option) any later version. | (at your option) any later version. | ||||
This program is distributed in the hope that it will be useful, | This program is distributed in the hope that it will be useful, | ||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
GNU General Public License for more details. | GNU General Public License for more details. | ||||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License | ||||
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
package it.reyboz.bustorino.fragments; | package it.reyboz.bustorino.fragments; | ||||
import it.reyboz.bustorino.backend.Stop; | import it.reyboz.bustorino.backend.Stop; | ||||
public interface FragmentListener { | public interface FragmentListener { | ||||
void toggleSpinner(boolean state); | void toggleSpinner(boolean state); | ||||
/** | /** | ||||
* Sends the message to the activity to adapt the GUI | * Sends the message to the activity to adapt the GUI | ||||
* to the fragment that has been attached | * to the fragment that has been attached | ||||
* @param fragmentType the type of fragment attached | * @param fragmentType the type of fragment attached | ||||
*/ | */ | ||||
void readyGUIfor(FragmentKind fragmentType); | void readyGUIfor(FragmentKind fragmentType); | ||||
/** | /** | ||||
* Houston, we need another fragment! | * Houston, we need another fragment! | ||||
* | * | ||||
* @param ID the Stop ID | * @param ID the Stop ID | ||||
*/ | */ | ||||
void createFragmentForStop(String ID); | void createFragmentForStop(String ID); | ||||
/** | /** | ||||
* Add the last successfully searched stop to the favorites | * Add the last successfully searched stop to the favorites | ||||
*/ | */ | ||||
void toggleLastStopToFavorites(); | void toggleLastStopToFavorites(); | ||||
/** | /** | ||||
* Get the last successfully searched bus stop or NULL | * Get the last successfully searched bus stop or NULL | ||||
* | * | ||||
* @return | * @return | ||||
*/ | */ | ||||
Stop getLastSuccessfullySearchedBusStop(); | Stop getLastSuccessfullySearchedBusStop(); | ||||
/** | /** | ||||
* Get the last successfully searched bus stop ID or NULL | * Get the last successfully searched bus stop ID or NULL | ||||
* | * | ||||
* @return | * @return | ||||
*/ | */ | ||||
String getLastSuccessfullySearchedBusStopID(); | String getLastSuccessfullySearchedBusStopID(); | ||||
/** | /** | ||||
* Automatically update the "Add to favorite" star icon | * Automatically update the "Add to favorite" star icon | ||||
*/ | */ | ||||
void updateStarIconFromLastBusStop(); | void updateStarIconFromLastBusStop(); | ||||
/** | /** | ||||
* Tell the activity that we need to disable/enable its floatingActionButton | * Tell the activity that we need to disable/enable its floatingActionButton | ||||
* @param yes or no | * @param yes or no | ||||
*/ | */ | ||||
void showFloatingActionButton(boolean yes); | void showFloatingActionButton(boolean yes); | ||||
/** | /** | ||||
* Tell activity that we need to enable/disable the refreshLayout | * Tell activity that we need to enable/disable the refreshLayout | ||||
* @param yes or no | * @param yes or no | ||||
*/ | */ | ||||
void enableRefreshLayout(boolean yes); | void enableRefreshLayout(boolean yes); | ||||
} | } |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register