From 0aa8c5605dff068550e7124c0bfbe1409292c9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Sun, 8 Apr 2018 16:15:05 +0200 Subject: [PATCH] Add setttings (#74) --- app/build.gradle | 1 + .../io/github/wulkanowy/data/Repository.java | 25 +++++++ .../wulkanowy/data/RepositoryContract.java | 10 +++ .../wulkanowy/data/db/shared/SharedPref.java | 38 ++++++++-- .../data/db/shared/SharedPrefContract.java | 10 +++ .../io/github/wulkanowy/services/SyncJob.java | 23 +++--- .../wulkanowy/ui/main/MainActivity.java | 56 ++++++--------- .../wulkanowy/ui/main/MainContract.java | 6 ++ .../wulkanowy/ui/main/MainPresenter.java | 17 ++++- .../ui/main/settings/SettingsFragment.java | 70 +++++++++++++++++++ .../ui/main/timetable/TimetableFragment.java | 2 +- .../wulkanowy/ui/splash/SplashActivity.java | 4 +- .../wulkanowy/ui/splash/SplashContract.java | 2 +- .../wulkanowy/ui/splash/SplashPresenter.java | 5 +- .../main/res/values-pl/prefernces_array.xml | 12 ++++ app/src/main/res/values-pl/strings.xml | 11 ++- app/src/main/res/values/prefernces_array.xml | 33 +++++++++ app/src/main/res/values/strings.xml | 11 ++- app/src/main/res/values/styles.xml | 1 + app/src/main/res/xml/preferences.xml | 38 ++++++++++ 20 files changed, 318 insertions(+), 57 deletions(-) create mode 100644 app/src/main/java/io/github/wulkanowy/ui/main/settings/SettingsFragment.java create mode 100644 app/src/main/res/values-pl/prefernces_array.xml create mode 100644 app/src/main/res/values/prefernces_array.xml create mode 100644 app/src/main/res/xml/preferences.xml diff --git a/app/build.gradle b/app/build.gradle index eb8b9422..d0344eda 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -72,6 +72,7 @@ dependencies { implementation "com.android.support:design:$supportVersion" implementation "com.android.support:cardview-v7:$supportVersion" implementation "com.android.support:customtabs:$supportVersion" + implementation "com.android.support:preference-v14:$supportVersion" implementation "com.firebase:firebase-jobdispatcher:$firebaseJob" implementation "org.apache.commons:commons-lang3:$apacheLang" implementation "org.apache.commons:commons-collections4:$apacheCollections" diff --git a/app/src/main/java/io/github/wulkanowy/data/Repository.java b/app/src/main/java/io/github/wulkanowy/data/Repository.java index d25be8b5..7b6caa8a 100644 --- a/app/src/main/java/io/github/wulkanowy/data/Repository.java +++ b/app/src/main/java/io/github/wulkanowy/data/Repository.java @@ -68,6 +68,31 @@ public class Repository implements RepositoryContract { return sharedPref.getCurrentUserId(); } + @Override + public int getStartupTab() { + return sharedPref.getStartupTab(); + } + + @Override + public int getServicesInterval() { + return sharedPref.getServicesInterval(); + } + + @Override + public boolean isServicesEnable() { + return sharedPref.isServicesEnable(); + } + + @Override + public boolean isNotifyEnable() { + return sharedPref.isNotifyEnable(); + } + + @Override + public boolean isMobileDisable() { + return sharedPref.isMobileDisable(); + } + @Override public String[] getSymbolsKeysArray() { return resources.getSymbolsKeysArray(); diff --git a/app/src/main/java/io/github/wulkanowy/data/RepositoryContract.java b/app/src/main/java/io/github/wulkanowy/data/RepositoryContract.java index f06c4762..55287263 100644 --- a/app/src/main/java/io/github/wulkanowy/data/RepositoryContract.java +++ b/app/src/main/java/io/github/wulkanowy/data/RepositoryContract.java @@ -21,6 +21,16 @@ public interface RepositoryContract extends ResourcesContract, AccountSyncContra long getCurrentUserId(); + int getStartupTab(); + + boolean isServicesEnable(); + + boolean isNotifyEnable(); + + int getServicesInterval(); + + boolean isMobileDisable(); + void syncGrades() throws VulcanException, IOException, ParseException; void syncSubjects() throws VulcanException, IOException, ParseException; diff --git a/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPref.java b/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPref.java index ba437f88..6034c99c 100644 --- a/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPref.java +++ b/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPref.java @@ -2,32 +2,62 @@ package io.github.wulkanowy.data.db.shared; import android.content.Context; import android.content.SharedPreferences; +import android.preference.PreferenceManager; import javax.inject.Inject; import javax.inject.Singleton; import io.github.wulkanowy.di.annotations.ApplicationContext; import io.github.wulkanowy.di.annotations.SharedPreferencesInfo; +import io.github.wulkanowy.ui.main.settings.SettingsFragment; @Singleton public class SharedPref implements SharedPrefContract { private static final String SHARED_KEY_USER_ID = "USER_ID"; - private final SharedPreferences sharedPreferences; + private final SharedPreferences appSharedPref; + + private final SharedPreferences settingsSharedPref; @Inject SharedPref(@ApplicationContext Context context, @SharedPreferencesInfo String sharedName) { - sharedPreferences = context.getSharedPreferences(sharedName, Context.MODE_PRIVATE); + appSharedPref = context.getSharedPreferences(sharedName, Context.MODE_PRIVATE); + settingsSharedPref = PreferenceManager.getDefaultSharedPreferences(context); } @Override public long getCurrentUserId() { - return sharedPreferences.getLong(SHARED_KEY_USER_ID, 0); + return appSharedPref.getLong(SHARED_KEY_USER_ID, 0); } @Override public void setCurrentUserId(long userId) { - sharedPreferences.edit().putLong(SHARED_KEY_USER_ID, userId).apply(); + appSharedPref.edit().putLong(SHARED_KEY_USER_ID, userId).apply(); + } + + @Override + public int getStartupTab() { + return Integer.parseInt(settingsSharedPref.getString(SettingsFragment.SHARED_KEY_START_TAB, "2")); + } + + @Override + public int getServicesInterval() { + return Integer.parseInt(settingsSharedPref.getString(SettingsFragment.SHARED_KEY_SERVICES_INTERVAL, "60")); + } + + @Override + public boolean isServicesEnable() { + return settingsSharedPref.getBoolean(SettingsFragment.SHARED_KEY_SERVICES_ENABLE, true); + } + + @Override + public boolean isNotifyEnable() { + return settingsSharedPref.getBoolean(SettingsFragment.SHARED_KEY_NOTIFY_ENABLE, true); + } + + @Override + public boolean isMobileDisable() { + return settingsSharedPref.getBoolean(SettingsFragment.SHARED_KEY_SERVICES_MOBILE_DISABLED, false); } } diff --git a/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPrefContract.java b/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPrefContract.java index 7f540acf..b00d9e4c 100644 --- a/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPrefContract.java +++ b/app/src/main/java/io/github/wulkanowy/data/db/shared/SharedPrefContract.java @@ -5,4 +5,14 @@ public interface SharedPrefContract { long getCurrentUserId(); void setCurrentUserId(long userId); + + int getStartupTab(); + + int getServicesInterval(); + + boolean isMobileDisable(); + + boolean isServicesEnable(); + + boolean isNotifyEnable(); } diff --git a/app/src/main/java/io/github/wulkanowy/services/SyncJob.java b/app/src/main/java/io/github/wulkanowy/services/SyncJob.java index e7b0908f..cefc8207 100644 --- a/app/src/main/java/io/github/wulkanowy/services/SyncJob.java +++ b/app/src/main/java/io/github/wulkanowy/services/SyncJob.java @@ -14,6 +14,7 @@ import com.firebase.jobdispatcher.RetryStrategy; import com.firebase.jobdispatcher.SimpleJobService; import com.firebase.jobdispatcher.Trigger; +import java.util.ArrayList; import java.util.List; import javax.inject.Inject; @@ -27,32 +28,34 @@ import io.github.wulkanowy.utils.LogUtils; public class SyncJob extends SimpleJobService { - private static final int DEFAULT_INTERVAL_START = 60 * 50; - - private static final int DEFAULT_INTERVAL_END = DEFAULT_INTERVAL_START + (60 * 40); - public static final String EXTRA_INTENT_KEY = "cardId"; - private List gradeList; + public static final String JOB_TAG = "SyncJob"; + + private List gradeList = new ArrayList<>(); @Inject RepositoryContract repository; - public static void start(Context context) { + public static void start(Context context, int interval, boolean useOnlyWifi) { FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context)); dispatcher.mustSchedule(dispatcher.newJobBuilder() .setLifetime(Lifetime.FOREVER) .setService(SyncJob.class) - .setTag("SyncJob") + .setTag(JOB_TAG) .setRecurring(true) - .setTrigger(Trigger.executionWindow(DEFAULT_INTERVAL_START, DEFAULT_INTERVAL_END)) - .setConstraints(Constraint.ON_ANY_NETWORK) + .setTrigger(Trigger.executionWindow(interval * 60, (interval + 10) * 60)) + .setConstraints(useOnlyWifi ? Constraint.ON_UNMETERED_NETWORK : Constraint.ON_ANY_NETWORK) .setReplaceCurrent(false) .setRetryStrategy(RetryStrategy.DEFAULT_EXPONENTIAL) .build()); } + public static void stop(Context context) { + new FirebaseJobDispatcher(new GooglePlayDriver(context)).cancel(JOB_TAG); + } + @Override public void onCreate() { super.onCreate(); @@ -67,7 +70,7 @@ public class SyncJob extends SimpleJobService { gradeList = repository.getNewGrades(); - if (!gradeList.isEmpty()) { + if (!gradeList.isEmpty() && repository.isNotifyEnable()) { showNotification(); } return JobService.RESULT_SUCCESS; diff --git a/app/src/main/java/io/github/wulkanowy/ui/main/MainActivity.java b/app/src/main/java/io/github/wulkanowy/ui/main/MainActivity.java index cc9b1dc8..3656e167 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/main/MainActivity.java +++ b/app/src/main/java/io/github/wulkanowy/ui/main/MainActivity.java @@ -21,13 +21,12 @@ import io.github.wulkanowy.ui.base.BaseActivity; import io.github.wulkanowy.ui.main.attendance.AttendanceFragment; import io.github.wulkanowy.ui.main.dashboard.DashboardFragment; import io.github.wulkanowy.ui.main.grades.GradesFragment; +import io.github.wulkanowy.ui.main.settings.SettingsFragment; import io.github.wulkanowy.ui.main.timetable.TimetableFragment; public class MainActivity extends BaseActivity implements MainContract.View, AHBottomNavigation.OnTabSelectedListener, OnFragmentIsReadyListener { - private int initTabPosition = 0; - @BindView(R.id.main_activity_nav) AHBottomNavigation bottomNavigation; @@ -52,15 +51,10 @@ public class MainActivity extends BaseActivity implements MainContract.View, super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - initTabPosition = getIntent().getIntExtra(SyncJob.EXTRA_INTENT_KEY, initTabPosition); - getActivityComponent().inject(this); setButterKnife(ButterKnife.bind(this)); - presenter.onStart(this); - - initiationViewPager(); - initiationBottomNav(); + presenter.onStart(this, getIntent().getIntExtra(SyncJob.EXTRA_INTENT_KEY, -1)); } @Override @@ -102,48 +96,44 @@ public class MainActivity extends BaseActivity implements MainContract.View, presenter.onFragmentIsReady(); } - private void initiationBottomNav() { - bottomNavigation.addItem(new AHBottomNavigationItem( - getString(R.string.grades_text), - getResources().getDrawable(R.drawable.ic_menu_grade_26dp) - )); - bottomNavigation.addItem(new AHBottomNavigationItem( - getString(R.string.attendance_text), - getResources().getDrawable(R.drawable.ic_menu_attendance_24dp) - )); - bottomNavigation.addItem(new AHBottomNavigationItem( - getString(R.string.dashboard_text), - getResources().getDrawable(R.drawable.ic_menu_dashboard_24dp) - )); - bottomNavigation.addItem(new AHBottomNavigationItem( - getString(R.string.lessonplan_text), - getResources().getDrawable(R.drawable.ic_menu_timetable_24dp) - )); - bottomNavigation.addItem(new AHBottomNavigationItem( - getString(R.string.settings_text), - getResources().getDrawable(R.drawable.ic_menu_other_24dp) - )); + @Override + public void initiationBottomNav(int tabPosition) { + bottomNavigation.addItem(new AHBottomNavigationItem(getString(R.string.grades_text), + R.drawable.ic_menu_grade_26dp)); + + bottomNavigation.addItem(new AHBottomNavigationItem(getString(R.string.attendance_text), + R.drawable.ic_menu_attendance_24dp)); + + bottomNavigation.addItem(new AHBottomNavigationItem(getString(R.string.dashboard_text), + R.drawable.ic_menu_dashboard_24dp)); + + bottomNavigation.addItem(new AHBottomNavigationItem(getString(R.string.timetable_text), + R.drawable.ic_menu_timetable_24dp)); + + bottomNavigation.addItem(new AHBottomNavigationItem(getString(R.string.settings_text), + R.drawable.ic_menu_other_24dp)); bottomNavigation.setAccentColor(getResources().getColor(R.color.colorPrimary)); bottomNavigation.setInactiveColor(Color.BLACK); bottomNavigation.setBackgroundColor(getResources().getColor(R.color.colorBackgroundBottomNav)); bottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_SHOW); bottomNavigation.setOnTabSelectedListener(this); - bottomNavigation.setCurrentItem(initTabPosition); + bottomNavigation.setCurrentItem(tabPosition); bottomNavigation.setBehaviorTranslationEnabled(false); } - private void initiationViewPager() { + @Override + public void initiationViewPager(int tabPosition) { pagerAdapter.addFragment(new GradesFragment()); pagerAdapter.addFragment(new AttendanceFragment()); pagerAdapter.addFragment(new DashboardFragment()); pagerAdapter.addFragment(new TimetableFragment()); - pagerAdapter.addFragment(new DashboardFragment()); + pagerAdapter.addFragment(new SettingsFragment()); viewPager.setPagingEnabled(false); viewPager.setAdapter(pagerAdapter); viewPager.setOffscreenPageLimit(4); - viewPager.setCurrentItem(initTabPosition, false); + viewPager.setCurrentItem(tabPosition, false); } @Override diff --git a/app/src/main/java/io/github/wulkanowy/ui/main/MainContract.java b/app/src/main/java/io/github/wulkanowy/ui/main/MainContract.java index cb1d5d7c..d4d8156b 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/main/MainContract.java +++ b/app/src/main/java/io/github/wulkanowy/ui/main/MainContract.java @@ -14,11 +14,17 @@ public interface MainContract { void showActionBar(); void hideActionBar(); + + void initiationViewPager(int tabPosition); + + void initiationBottomNav(int tabPosition); } @PerActivity interface Presenter extends BaseContract.Presenter { + void onStart(View view, int tabPositionIntent); + void onTabSelected(int position, boolean wasSelected); void onFragmentIsReady(); diff --git a/app/src/main/java/io/github/wulkanowy/ui/main/MainPresenter.java b/app/src/main/java/io/github/wulkanowy/ui/main/MainPresenter.java index 149e49e2..6a727b7a 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/main/MainPresenter.java +++ b/app/src/main/java/io/github/wulkanowy/ui/main/MainPresenter.java @@ -17,10 +17,21 @@ public class MainPresenter extends BasePresenter } @Override - public void onStart(MainContract.View view) { + public void onStart(MainContract.View view, int tabPositionIntent) { super.onStart(view); getView().showProgressBar(true); getView().hideActionBar(); + + int tabPosition; + + if (tabPositionIntent != -1) { + tabPosition = tabPositionIntent; + } else { + tabPosition = getRepository().getStartupTab(); + } + + getView().initiationBottomNav(tabPosition); + getView().initiationViewPager(tabPosition); } @Override @@ -32,11 +43,11 @@ public class MainPresenter extends BasePresenter @Override public void onFragmentIsReady() { - if (fragmentCount < 5) { + if (fragmentCount < 4) { fragmentCount++; } - if (fragmentCount == 5) { + if (fragmentCount == 4) { getView().showActionBar(); getView().showProgressBar(false); } diff --git a/app/src/main/java/io/github/wulkanowy/ui/main/settings/SettingsFragment.java b/app/src/main/java/io/github/wulkanowy/ui/main/settings/SettingsFragment.java new file mode 100644 index 00000000..d1483123 --- /dev/null +++ b/app/src/main/java/io/github/wulkanowy/ui/main/settings/SettingsFragment.java @@ -0,0 +1,70 @@ +package io.github.wulkanowy.ui.main.settings; + +import android.content.SharedPreferences; +import android.os.Bundle; +import android.support.v7.preference.PreferenceFragmentCompat; + +import io.github.wulkanowy.R; +import io.github.wulkanowy.services.SyncJob; + +public class SettingsFragment extends PreferenceFragmentCompat + implements SharedPreferences.OnSharedPreferenceChangeListener { + + public static final String SHARED_KEY_START_TAB = "startup_tab"; + + public static final String SHARED_KEY_SERVICES_ENABLE = "services_enable"; + + public static final String SHARED_KEY_NOTIFY_ENABLE = "notify_enable"; + + public static final String SHARED_KEY_SERVICES_INTERVAL = "services_interval"; + + public static final String SHARED_KEY_SERVICES_MOBILE_DISABLED = "services_disable_mobile"; + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + addPreferencesFromResource(R.xml.preferences); + } + + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (key.equals(SHARED_KEY_SERVICES_ENABLE) || key.equals(SHARED_KEY_SERVICES_INTERVAL) + || key.equals(SHARED_KEY_SERVICES_MOBILE_DISABLED)) { + launchServices(sharedPreferences.getBoolean(SHARED_KEY_SERVICES_ENABLE, true), + sharedPreferences); + } + } + + private void launchServices(boolean start, SharedPreferences sharedPref) { + if (start) { + int newInterval = Integer.parseInt(sharedPref.getString(SHARED_KEY_SERVICES_INTERVAL, "60")); + boolean useOnlyWifi = sharedPref.getBoolean(SHARED_KEY_SERVICES_MOBILE_DISABLED, false); + + SyncJob.stop(getContext()); + SyncJob.start(getContext(), newInterval, useOnlyWifi); + } else { + SyncJob.stop(getContext()); + } + } + + @Override + public void setMenuVisibility(boolean menuVisible) { + super.setMenuVisibility(menuVisible); + if (menuVisible) { + getActivity().setTitle(R.string.settings_text); + } + } + + @Override + public void onResume() { + super.onResume(); + getPreferenceScreen().getSharedPreferences() + .registerOnSharedPreferenceChangeListener(this); + } + + @Override + public void onPause() { + super.onPause(); + getPreferenceScreen().getSharedPreferences() + .unregisterOnSharedPreferenceChangeListener(this); + } +} diff --git a/app/src/main/java/io/github/wulkanowy/ui/main/timetable/TimetableFragment.java b/app/src/main/java/io/github/wulkanowy/ui/main/timetable/TimetableFragment.java index 2df28df2..5d9d96bf 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/main/timetable/TimetableFragment.java +++ b/app/src/main/java/io/github/wulkanowy/ui/main/timetable/TimetableFragment.java @@ -80,7 +80,7 @@ public class TimetableFragment extends BaseFragment implements TimetableContract @Override public void setActivityTitle() { - setTitle(getString(R.string.lessonplan_text)); + setTitle(getString(R.string.timetable_text)); } @Override diff --git a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashActivity.java b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashActivity.java index c9f98d5e..3eb3fdfe 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashActivity.java +++ b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashActivity.java @@ -44,7 +44,7 @@ public class SplashActivity extends BaseActivity implements SplashContract.View } @Override - public void startSyncService() { - SyncJob.start(getApplicationContext()); + public void startSyncService(int interval, boolean useOnlyWifi) { + SyncJob.start(getApplicationContext(), interval, useOnlyWifi); } } diff --git a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashContract.java b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashContract.java index a69deb03..515c842f 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashContract.java +++ b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashContract.java @@ -12,7 +12,7 @@ public interface SplashContract { void openMainActivity(); - void startSyncService(); + void startSyncService(int interval, boolean useOnlyWifi); } @PerActivity diff --git a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashPresenter.java b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashPresenter.java index c3d81215..165fc4ff 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/splash/SplashPresenter.java +++ b/app/src/main/java/io/github/wulkanowy/ui/splash/SplashPresenter.java @@ -18,7 +18,10 @@ public class SplashPresenter extends BasePresenter @Override public void onStart(@NonNull SplashContract.View activity) { super.onStart(activity); - getView().startSyncService(); + if (getRepository().isServicesEnable()) { + getView().startSyncService(getRepository().getServicesInterval(), + getRepository().isMobileDisable()); + } if (getRepository().getCurrentUserId() == 0) { getView().openLoginActivity(); diff --git a/app/src/main/res/values-pl/prefernces_array.xml b/app/src/main/res/values-pl/prefernces_array.xml new file mode 100644 index 00000000..4e66a373 --- /dev/null +++ b/app/src/main/res/values-pl/prefernces_array.xml @@ -0,0 +1,12 @@ + + + + 10 minut + 30 minut + 1 godzinę + 2 godziny + 6 godzin + 12 godzin + 24 godzin + + \ No newline at end of file diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 244f39e8..da84ba42 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -33,7 +33,7 @@ Dashboard Oceny Frekwencja - Plan lekcji + Plan lekcji Ustawienia Ta część aplikacji jest w budowie Brak ocen @@ -113,4 +113,13 @@ %1$d nieobecności %1$d nieobecności + + Widok + Domyślny widok + Powiadomienia + Pokazuj powiadomienia + Usługi + Włącz odświeżanie danych w tle + Interwał między odświeżaniem danych + Synchronizacja tylko przez WiFi diff --git a/app/src/main/res/values/prefernces_array.xml b/app/src/main/res/values/prefernces_array.xml new file mode 100644 index 00000000..8bf159f3 --- /dev/null +++ b/app/src/main/res/values/prefernces_array.xml @@ -0,0 +1,33 @@ + + + + @string/grades_text + @string/attendance_text + @string/dashboard_text + @string/timetable_text + + + 0 + 1 + 2 + 3 + + + 10 minutes + 30 minutes + 1 hour + 2 hours + 6 hours + 12 hours + 24 hours + + + 10 + 30 + 60 + 120 + 360 + 720 + 1440 + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b4b6c0c0..0c039698 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -33,7 +33,7 @@ Dashboard Grades Attendance - Timetable + Timetable Settings This section of app is under construction. No grades @@ -109,4 +109,13 @@ %1$d absences %1$d absences + + Default view after startup + View + Notifications + Show the notifications + Services + Enable background data refreshing + Interval between data refreshing + Synchronization via WiFi only diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ed5c249d..fff8e94c 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -13,6 +13,7 @@ @android:color/primary_text_dark @android:color/primary_text_dark @android:color/white + @style/PreferenceThemeOverlay.v14.Material