From 944d9562f3a0ca201b62d9ba5ec9e8a2d318907c Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Fri, 30 Sep 2016 22:05:43 +0200 Subject: [PATCH] Fix resto logic + add preference for closing time --- .../preferences/SettingsActivity.java | 4 +- .../hydra/activities/resto/MenuActivity.java | 8 +- .../fragments/home/RestoMenuCallback.java | 9 +- ...ment.java => RestoPreferenceFragment.java} | 8 +- .../hydra/fragments/resto/MenuFragment.java | 5 - .../hydra/fragments/resto/RestoFragment.java | 63 +++++----- .../hydra/models/resto/RestoOverview.java | 43 ++++++- .../notifications/NotificationScheduler.java | 28 +++-- .../be/ugent/zeus/hydra/preference/Time.java | 113 ------------------ .../zeus/hydra/preference/TimePreference.java | 49 ++++++-- app/src/main/res/values/strings.xml | 9 +- app/src/main/res/xml/pref_headers.xml | 8 +- app/src/main/res/xml/pref_notifications.xml | 36 ------ app/src/main/res/xml/pref_resto.xml | 62 ++++++++++ 14 files changed, 217 insertions(+), 228 deletions(-) rename app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/{NotificationFragment.java => RestoPreferenceFragment.java} (89%) delete mode 100644 app/src/main/java/be/ugent/zeus/hydra/preference/Time.java delete mode 100644 app/src/main/res/xml/pref_notifications.xml create mode 100644 app/src/main/res/xml/pref_resto.xml diff --git a/app/src/main/java/be/ugent/zeus/hydra/activities/preferences/SettingsActivity.java b/app/src/main/java/be/ugent/zeus/hydra/activities/preferences/SettingsActivity.java index 8ccfabb54..116a3db01 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/activities/preferences/SettingsActivity.java +++ b/app/src/main/java/be/ugent/zeus/hydra/activities/preferences/SettingsActivity.java @@ -13,7 +13,7 @@ import be.ugent.zeus.hydra.activities.common.AppCompatPreferenceActivity; import be.ugent.zeus.hydra.fragments.preferences.HomeFragment; import be.ugent.zeus.hydra.fragments.preferences.MinervaFragment; -import be.ugent.zeus.hydra.fragments.preferences.NotificationFragment; +import be.ugent.zeus.hydra.fragments.preferences.RestoPreferenceFragment; import be.ugent.zeus.hydra.fragments.preferences.SkoFragment; import be.ugent.zeus.hydra.notifications.NotificationScheduler; @@ -43,7 +43,7 @@ public void onBuildHeaders(List
target) { */ protected boolean isValidFragment(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) - || NotificationFragment.class.getName().equals(fragmentName) + || RestoPreferenceFragment.class.getName().equals(fragmentName) || HomeFragment.class.getName().equals(fragmentName) || MinervaFragment.class.getName().equals(fragmentName) || SkoFragment.class.getName().equals(fragmentName); diff --git a/app/src/main/java/be/ugent/zeus/hydra/activities/resto/MenuActivity.java b/app/src/main/java/be/ugent/zeus/hydra/activities/resto/MenuActivity.java index fdc4c4f99..225710137 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/activities/resto/MenuActivity.java +++ b/app/src/main/java/be/ugent/zeus/hydra/activities/resto/MenuActivity.java @@ -10,14 +10,12 @@ import be.ugent.zeus.hydra.HydraApplication; import be.ugent.zeus.hydra.R; import be.ugent.zeus.hydra.activities.resto.common.RestoWebsiteActivity; -import be.ugent.zeus.hydra.fragments.resto.RestoFragment; import be.ugent.zeus.hydra.loaders.LoaderCallbackHandler; import be.ugent.zeus.hydra.models.resto.RestoMenu; import be.ugent.zeus.hydra.models.resto.RestoOverview; import be.ugent.zeus.hydra.requests.resto.RestoMenuOverviewRequest; import be.ugent.zeus.hydra.viewpager.MenuPagerAdapter; import org.threeten.bp.LocalDate; -import org.threeten.bp.ZonedDateTime; import java.util.Collections; @@ -69,14 +67,10 @@ public void onPageSelected(int position) { Intent intent = getIntent(); //Get the default start date - ZonedDateTime start = ZonedDateTime.now(); - if(start.isAfter(start.withHour(RestoFragment.CLOSING_HOUR))) { - start = start.plusDays(1); - } if(intent.hasExtra(ARG_DATE)) { startDate = (LocalDate) intent.getSerializableExtra(ARG_DATE); } else { - startDate = start.toLocalDate(); + startDate = LocalDate.now(); } loaderHandler.startLoader(); diff --git a/app/src/main/java/be/ugent/zeus/hydra/fragments/home/RestoMenuCallback.java b/app/src/main/java/be/ugent/zeus/hydra/fragments/home/RestoMenuCallback.java index 0a48ff200..a7240265b 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/fragments/home/RestoMenuCallback.java +++ b/app/src/main/java/be/ugent/zeus/hydra/fragments/home/RestoMenuCallback.java @@ -10,7 +10,6 @@ import be.ugent.zeus.hydra.models.resto.RestoOverview; import be.ugent.zeus.hydra.recyclerview.adapters.HomeCardAdapter; import be.ugent.zeus.hydra.requests.resto.RestoMenuOverviewRequest; -import org.threeten.bp.LocalDate; import java.util.ArrayList; import java.util.List; @@ -29,11 +28,11 @@ public RestoMenuCallback(Context context, HomeCardAdapter adapter, FragmentCallb @Override protected List convertData(@NonNull RestoOverview data) { List menuCardList = new ArrayList<>(); - for (RestoMenu menu : data) { - if (menu.getDate().isAfter(LocalDate.now())) { - menuCardList.add(new RestoMenuCard(menu)); - } + + for (RestoMenu menu : RestoOverview.filter(data, context)) { + menuCardList.add(new RestoMenuCard(menu)); } + return menuCardList; } diff --git a/app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/NotificationFragment.java b/app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/RestoPreferenceFragment.java similarity index 89% rename from app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/NotificationFragment.java rename to app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/RestoPreferenceFragment.java index ddaee9ffa..71d1c7872 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/NotificationFragment.java +++ b/app/src/main/java/be/ugent/zeus/hydra/fragments/preferences/RestoPreferenceFragment.java @@ -15,19 +15,19 @@ * * @author Rien Maertens */ -public class NotificationFragment extends PreferenceFragment { +public class RestoPreferenceFragment extends PreferenceFragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource - addPreferencesFromResource(R.xml.pref_notifications); + addPreferencesFromResource(R.xml.pref_resto); // Set and remove notifications final NotificationScheduler scheduler = new NotificationScheduler(getActivity()); final CheckBoxPreference notificationCheckbox = (CheckBoxPreference) findPreference("pref_key_daily_notifications_checkbox"); - TimePreference notificationTime = (TimePreference) findPreference("pref_daily_notifications_time"); + TimePreference notificationTime = (TimePreference) findPreference("pref_resto_notifications_time"); notificationCheckbox.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override @@ -44,7 +44,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if(notificationCheckbox.isChecked()){ - scheduler.scheduleNotification(newValue); + scheduler.scheduleNotification((String) newValue); } return true; } diff --git a/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/MenuFragment.java b/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/MenuFragment.java index bcc85129c..01d8697ce 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/MenuFragment.java +++ b/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/MenuFragment.java @@ -11,8 +11,6 @@ /** * Displays the resto menu for one day. - * - * The subclasses should decided in what manner the data is represented. */ public class MenuFragment extends Fragment { @@ -36,9 +34,6 @@ public static MenuFragment newInstance(RestoMenu menu) { return fragment; } - /** - * Some implementations may wish to persist the data. - */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/RestoFragment.java b/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/RestoFragment.java index 5d283d2ca..9801139f4 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/RestoFragment.java +++ b/app/src/main/java/be/ugent/zeus/hydra/fragments/resto/RestoFragment.java @@ -6,6 +6,7 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.content.Loader; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,14 +17,18 @@ import be.ugent.zeus.hydra.activities.resto.MenuActivity; import be.ugent.zeus.hydra.activities.resto.MetaActivity; import be.ugent.zeus.hydra.activities.resto.SandwichActivity; -import be.ugent.zeus.hydra.fragments.common.CachedLoaderFragment; +import be.ugent.zeus.hydra.fragments.common.LoaderFragment; +import be.ugent.zeus.hydra.loaders.RequestAsyncTaskLoader; +import be.ugent.zeus.hydra.loaders.ThrowableEither; import be.ugent.zeus.hydra.models.resto.RestoMenu; import be.ugent.zeus.hydra.models.resto.RestoOverview; +import be.ugent.zeus.hydra.requests.common.ProcessableCacheRequest; import be.ugent.zeus.hydra.requests.resto.RestoMenuOverviewRequest; import be.ugent.zeus.hydra.utils.DateUtils; import be.ugent.zeus.hydra.utils.ViewUtils; import be.ugent.zeus.hydra.views.MenuTable; -import org.threeten.bp.LocalDateTime; + +import java.util.ArrayList; import static be.ugent.zeus.hydra.utils.ViewUtils.$; @@ -31,10 +36,7 @@ * @author Niko Strijbol * @author mivdnber */ -public class RestoFragment extends CachedLoaderFragment { - - //The hour after which every resto is closed. - public static final int CLOSING_HOUR = 20; +public class RestoFragment extends LoaderFragment> { private TextView title; private MenuTable table; @@ -58,13 +60,6 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { setIcons(); - viewMenu.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - startActivity(new Intent(getActivity(), MenuActivity.class)); - } - }); - viewSandwich.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -109,35 +104,43 @@ private void setIcons() { viewResto.setCompoundDrawablesWithIntrinsicBounds(null, restoIcon, null, null); } - /** - * This must be called when data is received that has no errors. - * - * @param data The data. - */ @Override - public void receiveData(@NonNull RestoOverview data) { + public void receiveData(@NonNull ArrayList data) { - //We can't do anything without data. - if(data.size() < 2) { + //Check that we have at least one menu + //TODO: show error + if(data.size() < 1) { return; } - RestoMenu menu = data.get(0); - LocalDateTime now = LocalDateTime.now(); - if(now.isAfter(now.withHour(CLOSING_HOUR)) || now.isAfter(menu.getDate().atStartOfDay())) { - menu = data.get(1); - } + final RestoMenu menu = data.get(0); table.setMenu(menu); - title.setText(String.format(getString(R.string.resto_menu_title), DateUtils.getFriendlyDate(menu.getDate()))); + + viewMenu.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(getActivity(), MenuActivity.class); + intent.putExtra(MenuActivity.ARG_DATE, menu.getDate()); + startActivity(intent); + } + }); } /** - * @return The request that will be executed. + * Do the filtering of the menu's in the background as well. */ @Override - protected RestoMenuOverviewRequest getRequest() { - return new RestoMenuOverviewRequest(); + public Loader>> getLoader() { + return new RequestAsyncTaskLoader<>( + new ProcessableCacheRequest>(getContext(), new RestoMenuOverviewRequest(), shouldRenew) { + @NonNull + @Override + protected ArrayList transform(@NonNull RestoOverview data) { + return RestoOverview.filter(data, getContext()); + } + }, getContext() + ); } } \ No newline at end of file diff --git a/app/src/main/java/be/ugent/zeus/hydra/models/resto/RestoOverview.java b/app/src/main/java/be/ugent/zeus/hydra/models/resto/RestoOverview.java index 0ac3248a3..53f0c6c2c 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/models/resto/RestoOverview.java +++ b/app/src/main/java/be/ugent/zeus/hydra/models/resto/RestoOverview.java @@ -1,5 +1,13 @@ package be.ugent.zeus.hydra.models.resto; +import android.content.Context; +import android.content.SharedPreferences; +import android.preference.PreferenceManager; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.LocalDateTime; +import org.threeten.bp.LocalTime; + import java.util.ArrayList; /** @@ -10,4 +18,37 @@ * @author Niko Strijbol * @author mivdnber */ -public class RestoOverview extends ArrayList {} \ No newline at end of file +public class RestoOverview extends ArrayList { + + public static final String DEFAULT_CLOSING_TIME = "21:00"; + public static final String PREF_RESTO_CLOSING_HOUR = "pref_resto_closing_hour"; + + /** + * Filter the resto menu's. After 20:00, the menu of today is removed from the list. This will also remove resto's + * that are not today. + * + * @param data The original data, probably from the server. + * @return The filtered data. + */ + public static ArrayList filter(ArrayList data, Context context) { + + SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + + LocalTime closingHour = LocalTime.parse(preferences.getString(PREF_RESTO_CLOSING_HOUR, DEFAULT_CLOSING_TIME)); + + ArrayList list = new ArrayList<>(); + + final LocalDate today = LocalDate.now(); + final boolean isTooLate = LocalDateTime.now().isAfter(LocalDateTime.of(LocalDate.now(), closingHour)); + + //we still DONT have filters + for(RestoMenu menu: data) { + //Menu is skipped if (it is before today) or (it is too late and it is today) + if(!menu.getDate().isBefore(today) && (!isTooLate || !menu.getDate().isEqual(today))) { + list.add(menu); + } + } + + return list; + } +} \ No newline at end of file diff --git a/app/src/main/java/be/ugent/zeus/hydra/notifications/NotificationScheduler.java b/app/src/main/java/be/ugent/zeus/hydra/notifications/NotificationScheduler.java index 61307064a..6b205be7c 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/notifications/NotificationScheduler.java +++ b/app/src/main/java/be/ugent/zeus/hydra/notifications/NotificationScheduler.java @@ -7,9 +7,10 @@ import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import be.ugent.zeus.hydra.preference.Time; -import java.util.Calendar; +import org.threeten.bp.LocalDateTime; +import org.threeten.bp.LocalTime; +import org.threeten.bp.ZonedDateTime; /** * @author Rien Maertens @@ -41,19 +42,30 @@ public void testNotification(){ } public void scheduleNotification(){ - scheduleNotification(preferences.getInt("pref_daily_notifications_time", 0)); + scheduleNotification(preferences.getString("pref_resto_notifications_time", "12:00")); } - public void scheduleNotification(Object time){ - Time timeObj = new Time(time); - Calendar cal = timeObj.nextOccurrence(); + public void scheduleNotification(String time) { + + LocalTime notificationTime = LocalTime.parse(time); + LocalDateTime now = LocalDateTime.now(); + + ZonedDateTime nextOccurrence = ZonedDateTime.now(); + + //Get the next occurrence + if(notificationTime.isAfter(now.toLocalTime())) { + nextOccurrence = nextOccurrence.plusDays(1); + } + + nextOccurrence = nextOccurrence.withHour(notificationTime.getHour()).withMinute(notificationTime.getMinute()); + cancelNotifications(); // Daily alarm alarmManager.setInexactRepeating( AlarmManager.RTC_WAKEUP, - cal.getTimeInMillis(), + nextOccurrence.toInstant().toEpochMilli(), AlarmManager.INTERVAL_DAY, pendingIntent); } -} +} \ No newline at end of file diff --git a/app/src/main/java/be/ugent/zeus/hydra/preference/Time.java b/app/src/main/java/be/ugent/zeus/hydra/preference/Time.java deleted file mode 100644 index 582f8762f..000000000 --- a/app/src/main/java/be/ugent/zeus/hydra/preference/Time.java +++ /dev/null @@ -1,113 +0,0 @@ -package be.ugent.zeus.hydra.preference; - -import java.util.Calendar; -import java.util.Locale; - -/** - * @author Rien Maertens - * @since 17/04/2016. - */ -public class Time { - - private static final int MINUTES_IN_HOUR = 60; - private int hour; - private int minute; - - public Time(){ - clear(); - } - - public Time(Object obj){ - fromObject(obj); - } - - public Time(String time){ - fromString(time); - } - - public Time(int hour, int minute) { - set(hour, minute); - } - - public void clear(){ - hour = 0; - minute = 0; - } - - public void fromObject(Object obj) { - if (obj instanceof Integer){ - fromInt((Integer) obj); - } else if (obj instanceof String){ - fromString((String) obj); - } else { - throw new AssertionError("Object is not a String or an Integer."); - } - } - - public void fromString(String time){ - if (time.contains(":")){ - String[] split = time.split(":"); - if (split.length == 2){ - set(Integer.parseInt(split[0], 10), Integer.parseInt(split[1], 10)); - } - } else { - fromInt(Integer.parseInt(time, 10)); - } - } - - public void fromInt(int time){ - int newHour, newMinute; - newHour = (time / MINUTES_IN_HOUR); - newMinute = time % MINUTES_IN_HOUR; - set(newHour, newMinute); - } - - public void set(int hour, int minute) { - if (hour > 23 || minute > 59){ - throw new AssertionError("Not a valid time."); - } - this.hour = hour; - this.minute = minute; - } - - public int getHour() { - return hour; - } - - public int getMinute() { - return minute; - } - - public int toInteger(){ - return hour * MINUTES_IN_HOUR + minute; - } - - @Override - public String toString() { - return String.format(Locale.ENGLISH ,"%02d:%02d", hour, minute); - } - - public Calendar nextOccurrence(){ - Calendar cal = Calendar.getInstance(); - if (cal.get(Calendar.HOUR_OF_DAY) >= hour && cal.get(Calendar.MINUTE) >= minute){ - cal.add(Calendar.DATE, 1); - } - cal.set(Calendar.HOUR_OF_DAY, hour); - cal.set(Calendar.MINUTE, minute); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MILLISECOND, 0); - return cal; - } - - @Override - public int hashCode() { - return toInteger(); - } - - @Override - public boolean equals(Object o) { - return (o instanceof Time) && - ((Time) o).hour == this.hour && - ((Time) o).minute == this.minute; - } -} diff --git a/app/src/main/java/be/ugent/zeus/hydra/preference/TimePreference.java b/app/src/main/java/be/ugent/zeus/hydra/preference/TimePreference.java index e26642193..f8b442f4d 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/preference/TimePreference.java +++ b/app/src/main/java/be/ugent/zeus/hydra/preference/TimePreference.java @@ -2,23 +2,30 @@ import android.content.Context; import android.content.res.TypedArray; +import android.os.Build; import android.preference.DialogPreference; import android.text.format.DateFormat; import android.util.AttributeSet; import android.view.View; import android.widget.TimePicker; import be.ugent.zeus.hydra.R; +import org.threeten.bp.LocalTime; /** * Custom dialog to select a time in the preferences. * + * This dialogs uses {@link LocalTime}, and saves the preference as a time string, such as "10:20". + * * @author Rien Maertens + * @author Niko Strijbol * - * @link http://stackoverflow.com/a/10608622/4424838 + * @see Based on this + * @see LocalTime#toString() The exact documentation on how the value is saved. */ public class TimePreference extends DialogPreference { + private TimePicker picker; - private Time time; + protected LocalTime time; public TimePreference(Context context) { this(context, null); @@ -30,7 +37,7 @@ public TimePreference(Context context, AttributeSet attrs) { public TimePreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - time = new Time(); + time = LocalTime.now(); setPositiveButtonText(R.string.set); setNegativeButtonText(R.string.cancel); @@ -48,8 +55,19 @@ protected View onCreateDialogView() { @Override protected void onBindDialogView(View v) { super.onBindDialogView(v); - picker.setCurrentHour(time.getHour()); - picker.setCurrentMinute(time.getMinute()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + picker.setHour(time.getHour()); + } else { + //noinspection deprecation + picker.setCurrentHour(time.getHour()); + } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + picker.setMinute(time.getMinute()); + } else { + //noinspection deprecation + picker.setCurrentMinute(time.getMinute()); + } } @Override @@ -57,11 +75,18 @@ protected void onDialogClosed(boolean positiveResult) { super.onDialogClosed(positiveResult); if (positiveResult) { - time.set(picker.getCurrentHour(), picker.getCurrentMinute()); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + time = LocalTime.of(picker.getHour(), picker.getMinute()); + } else { + //noinspection deprecation + time = LocalTime.of(picker.getCurrentHour(), picker.getCurrentMinute()); + } + setSummary(getSummary()); - int timeInts = time.toInteger(); - if (callChangeListener(timeInts)) { - persistInt(timeInts); + + if (callChangeListener(time)) { + persistString(time.toString()); notifyChanged(); } } @@ -75,12 +100,12 @@ protected Object onGetDefaultValue(TypedArray a, int index) { @Override protected void onSetInitialValue(boolean restoreValue, Object defaultValue) { if (defaultValue == null) { - defaultValue = 0; + defaultValue = "00:00"; } if (restoreValue) { - time.fromObject(getPersistedInt((Integer) defaultValue)); + time = LocalTime.parse(getPersistedString((String) defaultValue)); } else { - time.fromObject(defaultValue); + time = LocalTime.parse((CharSequence) defaultValue); } setSummary(getSummary()); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 837c98b2c..1bb84b3fd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -35,6 +35,13 @@ Laat een voorbeeldnotificatie zien. Voorbeeld + Resto + Instellingen voor de studentenrestaurants + + Sluitingsuur + Sluitingsuur + Kies vanaf welk uur de menu voor de volgende dag getoond wordt. + Activiteiten Minerva @@ -90,7 +97,7 @@ Filters aanpassen Schamperartikel Nieuwsartikel - Menu voor %s + Menu van %s Activiteit door %s Door %s Startscherm diff --git a/app/src/main/res/xml/pref_headers.xml b/app/src/main/res/xml/pref_headers.xml index c1ad81062..f74a24982 100644 --- a/app/src/main/res/xml/pref_headers.xml +++ b/app/src/main/res/xml/pref_headers.xml @@ -16,11 +16,11 @@ android:targetClass="be.ugent.zeus.hydra.activities.preferences.AssociationSelectPrefActivity"/>
- +
+ android:fragment="be.ugent.zeus.hydra.fragments.preferences.RestoPreferenceFragment" + android:title="@string/pref_resto_title" + android:summary="@string/pref_resto_description" />
- - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/xml/pref_resto.xml b/app/src/main/res/xml/pref_resto.xml new file mode 100644 index 000000000..5b1083f65 --- /dev/null +++ b/app/src/main/res/xml/pref_resto.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file