From 56c7e8ba536c25a48632546d7a43c81774e7487f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20D=C3=BCzg=C3=B6ren?= Date: Sat, 28 Sep 2019 18:09:43 +0200 Subject: [PATCH] Removed Terms and Conditions as well as the Privacy Policy from SettingsFragment.kt, added little easter egg --- .../substitutionplan/activities/Main.kt | 8 +- .../fragments/PersonalPlanFragment.kt | 1 - .../fragments/SettingsFragment.kt | 74 +++++------------ app/src/main/res/layout/content_settings.xml | 82 +------------------ app/src/main/res/values-de/strings.xml | 8 +- app/src/main/res/values/strings.xml | 10 +-- 6 files changed, 32 insertions(+), 151 deletions(-) diff --git a/app/src/main/java/com/denizd/substitutionplan/activities/Main.kt b/app/src/main/java/com/denizd/substitutionplan/activities/Main.kt index 6676879..3c56668 100644 --- a/app/src/main/java/com/denizd/substitutionplan/activities/Main.kt +++ b/app/src/main/java/com/denizd/substitutionplan/activities/Main.kt @@ -131,15 +131,15 @@ internal class Main : AppCompatActivity(R.layout.app_bar_main) { edit.putInt("firstTimeOpening", prefs.getInt("firstTimeOpening", 0) + 1).apply() } - lateinit var defaultFragment: Fragment - if (prefs.getBoolean("defaultPersonalised", false)) { - defaultFragment = PersonalPlanFragment() + /// Launch the user-specified fragment (general or personal plan) + val defaultFragment = if (prefs.getBoolean("defaultPersonalised", false)) { bottomNav.selectedItemId = R.id.personal toolbarTxt.text = personalPlanTitle() + PersonalPlanFragment() } else { - defaultFragment = GeneralPlanFragment() bottomNav.selectedItemId = R.id.plan toolbarTxt.text = getString(R.string.app_name) + GeneralPlanFragment() } loadFragment(defaultFragment) diff --git a/app/src/main/java/com/denizd/substitutionplan/fragments/PersonalPlanFragment.kt b/app/src/main/java/com/denizd/substitutionplan/fragments/PersonalPlanFragment.kt index fa0cf4b..d9199d9 100644 --- a/app/src/main/java/com/denizd/substitutionplan/fragments/PersonalPlanFragment.kt +++ b/app/src/main/java/com/denizd/substitutionplan/fragments/PersonalPlanFragment.kt @@ -51,5 +51,4 @@ internal class PersonalPlanFragment : PlanFragment() { }, 64) }) } - } \ No newline at end of file diff --git a/app/src/main/java/com/denizd/substitutionplan/fragments/SettingsFragment.kt b/app/src/main/java/com/denizd/substitutionplan/fragments/SettingsFragment.kt index e079cab..1749dc5 100644 --- a/app/src/main/java/com/denizd/substitutionplan/fragments/SettingsFragment.kt +++ b/app/src/main/java/com/denizd/substitutionplan/fragments/SettingsFragment.kt @@ -39,8 +39,7 @@ import com.google.firebase.messaging.FirebaseMessaging import kotlin.collections.ArrayList internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnClickListener, - CompoundButton.OnCheckedChangeListener, - ColourAdapter.OnClickListener, + CompoundButton.OnCheckedChangeListener, ColourAdapter.OnClickListener, RingtoneAdapter.OnClickListener { private lateinit var mContext: Context @@ -51,6 +50,7 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl private lateinit var colourRecycler: RecyclerView private lateinit var ringtoneCustomiserDialog: AlertDialog private lateinit var currentRingtone: TextView + private var longPressed = false override fun onAttach(context: Context) { super.onAttach(context) @@ -79,8 +79,10 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl setRingtoneText() val forceRefreshButton = view.findViewById(R.id.btnForceRefresh) + val colourTextTitle = view.findViewById(R.id.txtCustomiseColours1) + val colourTextDesc = view.findViewById(R.id.txtCustomiseColours2) + greetingSwitch.setOnCheckedChangeListener(this) -// switchDark.setOnCheckedChangeListener(this) notificationSwitch.setOnCheckedChangeListener(this) defaultPlanSwitch.setOnCheckedChangeListener(this) autoRefreshSwitch.setOnCheckedChangeListener(this) @@ -88,12 +90,21 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl helpGradeButton.setOnClickListener(this) view.findViewById(R.id.chip_help_ordering).setOnClickListener(this) colourCustomisationButton.setOnClickListener(this) + colourCustomisationButton.setOnLongClickListener { + if (!longPressed) { + colourTextTitle.text = getString(R.string.made_by_deniz) + colourTextDesc.text = "---" + } else { + colourTextTitle.text = getString(R.string.customise_colours_title) + colourTextDesc.text = getString(R.string.customise_colours_desc) + } + longPressed = !longPressed + true + } view.findViewById(R.id.btnNoNotif).setOnClickListener(this) view.findViewById(R.id.btnCustomiseRingtone).setOnClickListener(this) view.findViewById(R.id.btnWebsite).setOnClickListener(this) view.findViewById(R.id.btnLicences).setOnClickListener(this) - view.findViewById(R.id.btnTerms).setOnClickListener(this) - view.findViewById(R.id.btnPrivacyP).setOnClickListener(this) versionButton.setOnClickListener(this) forceRefreshButton.setOnClickListener(this) forceRefreshButton.setOnLongClickListener { @@ -469,12 +480,6 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl R.id.btnLicences -> { createDialog(mContext.getString(R.string.licences_title), licences) } - R.id.btnTerms -> { - createDialog("Terms & Conditions", termsAndConditions) - } - R.id.btnPrivacyP -> { - createDialog("Privacy Policy", privacyPolicy) - } R.id.btnForceRefresh -> { DataFetcher( isPlan = true, @@ -559,54 +564,13 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl } } + /// Below this point follow string literals that I didn't bother putting in /res/values + private val licences = "Libraries:" + "\n • jsoup HTML parser © 2009-2018 Jonathan Hedley, licensed under the open source MIT Licence" + "\n\nFont:" + "\n • Manrope © 2018-2019 Michael Sharanda, licensed under the SIL Open Font Licence 1.1" + "\n\nIcons:" + "\n • bqlqn\n • fjstudio\n • Freepik\n • Smashicons" + - "\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0" + - "\n\nHuman resources:" + - "\n • Deniz Düzgören (Development & publishing)" + - "\n • Leon Becker (Initial marketing)" + - "\n • Alex Lick (Marketing & Play Store account)" + - "\n • Batuhan Özcan (Marketing & Play Store account)" + - "\n • Erich Kerkesner (Marketing & Play Store account)" - - private val termsAndConditions = "These terms automatically apply to anyone using this app - therefore, please make sure to read them carefully before using the app. Copying or modifying parts of the app or the entire app, as well as creating derivative versions, is prohibited without permission. This app is intellectual property of the developer.\n" + - "\nThe developer reserves the right to make changes to the app at any given time and for any reason. The user will be informed of any changes made accordingly.\n" + - "\nTampering with the end device, in the form of rooting or otherwise modifying the operating system may result in malfunction of the software. In this case, the developer does not provide support, as the user is responsible for keeping the device free of software that may compromise its security.\n" + - "\nFull functionality of the app relies on a steady internet connection. The developer does not take responsibility for malfunction of these services, nor for any errors caused by the end device. The user is responsible for ensuring that their device is fully updated and fully functioning.\n" + - "\nAs the app relies on third-parties, information provided in-app may be delayed or incorrect at times. The developer accepts no liability for any information mistakenly provided in the app.\n" + - "\nThe developer may wish to update the app at any point. Should such action arise, then the user is advised to update the app to ensure proper functionality. However, the developer does not promise that the app will be continuously updated, and may stop providing the app at any point. Unless told otherwise, upon any termination, (a) the rights and licenses granted to the user in these terms will end; (b) the user must stop using the app, and (if needed) delete it from their device.\n" + - "\nChanges to these Terms & Conditions\n" + - "\nThe developer may update these Terms & Conditions from time to time. Thus, the user is advised to review this page periodically for any changes. Any changes are effective immediately after they are posted on this page.\n" + - "\nContact Us\n" + - "\nIn case of questions or suggestions regarding these Terms & Conditions, the user is advised to contact the developer of this app. Contact information is provided through the Play Store.\n" + - "\n---\n" + - "\nThese Terms & Conditions were modified upon the template provided by App Privacy Policy Generator. This service is in no way affiliated with AvH Plan or the developer." - - private val privacyPolicy = "The app \"Alexander-von-Humboldt-Plan\", hereby abbreviated to AvH Plan, is provided as a free service by the developer for use as is.\n" + - "\nThis page is used to inform visitors and users regarding policies with the collection, use, and disclosure of personal information, if they choose to make use of the service.\n" + - "\nAvH Plan does not collect, store, share, or in any other way use personal information retrieved from its users. Any information asked for within the app is only used to improve the user experience and as such, is stored locally and cannot be accessed by third-parties or be used to identify the user.\n" + - "\nInformation Collection and Use\n" + - "\nAt this moment, AvH Plan does not require personally identifiable information for its core functionality. Certain features do require entering information that may be personally identifiable, however, this data will be retained on the user's device and is therefore not accessible outside the app\n" + - "\nLog Data\n" + - "\nIn the case of an error in the app, device-specific data may be collected and stored on your phone. This data is called Log Data. This Log Data may include information, such as your device's Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilising the service, the time and date when the last usage occured, and other statistics. This data can not be used to personally identify any user.\n" + - "\nCookies\n" + - "\nCookies are files with small amounts of data that are commonly used as anonymous unique identifiers on the web. AvH Plan strives to not make use of cookies for its functionality, however, as its functionality requires access to third-party-websites, cookies may be unintentionally collected by the device's web browser. AvH Plan does not make use of these cookies in any way.\n" + - "\nService Providers\n" + - "\nNo third-parties are employed for providing any functionality or services of the AvH Plan-app and as such, all functionality is accessible without directly sharing personal data with third-parties.\n" + - "\nSecurity\n" + - "\nWhile absolute security cannot be ensured due to the internet functionality the app employs, no information is shared over any transmission methods.\n" + - "\nLinks to Other Sites\n" + - "\nThis Service may contain links to other sites, which are not operated by the developer of AvH Plan. The user is advised to review the privacy policy of any webpage they may access through the app. No responsibility for the content of these third-party websites is provided by the app developer.\n" + - "\nChildren’s Privacy\n" + - "\nThe service does not address anyone under the age of 13. As the app does not collect any information from its users, no data is collected from users that may be under the age of 13.\n" + - "\nChanges to This Privacy Policy\n" + - "\nThis privacy policy may be updated as the AvH Plan app is updated with new features. As such, the user is advised to review this page periodically for any changes. Any changes that may be made are effective immediately upon publishing.\n" + - "\nContact Us\n" + - "\nIn case of questions or suggestions regarding this privacy policy, the user is advised to contact the developer of this app. Contact information is provided through the Play Store.\n" + - "\n---\n" + - "\nThis privacy policy was modified upon the template provided by privacypolicytemplate.net and App Privacy Policy Generator. These services are in no way affiliated with AvH Plan or the developer." + "\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0" } \ No newline at end of file diff --git a/app/src/main/res/layout/content_settings.xml b/app/src/main/res/layout/content_settings.xml index 9869521..36e57c4 100644 --- a/app/src/main/res/layout/content_settings.xml +++ b/app/src/main/res/layout/content_settings.xml @@ -635,84 +635,10 @@ android:focusable="true" style="@style/SelectableItemBackground" android:orientation="vertical" - app:layout_constraintBottom_toTopOf="@+id/txtTerms" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/txtWeb" /> - - - - - - - - - - - - + app:layout_constraintTop_toBottomOf="@+id/txtWeb" /> + app:layout_constraintStart_toStartOf="@+id/txtWhatittook" + app:layout_constraintTop_toBottomOf="@+id/txtWhatittook" /> + app:layout_constraintTop_toBottomOf="@+id/txtWhatittook" /> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 24f5451..2715871 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -33,13 +33,9 @@ Viel Spaß! Aktiviere Begrüßungen Falls du möchtest, dass ich nett bin :) - Lizenzen & Mitwirkende + Lizenzen Was die App ausmacht (Englisch) Versionsnummer - Datenschutzerklärung - AGB - Überprüfe die AGB der App (Englisch) - Überprüfe die Datenschutzerklärung der App (Englisch) Informationen Entwickelt von Deniz :) Aktualisiere Plan bei App-Start @@ -47,7 +43,7 @@ Wie du deine Kurse eintragen kannst Wie du deine Klasse eintragen kannst Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen und über welche du benachrichtigt werden möchtest. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet. - Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht und über Aktualisierungen informiert zu werden.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen können nur eingetragen werden, wenn keine Kurse eingetragen sind. + Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht und über Aktualisierungen informiert zu werden.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen einzutragen ist nicht empfohlen. Dieses Menü ist derzeit nur für Tests gedacht. Zusätzliche Funktionalität könnte in der Zukunft hinzugefügt werden. Probier\' gerne zufällige Codes aus. Anwenden Ungültiger Code diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 676fb0d..8f5aa5b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -38,23 +38,19 @@ Enable greeting If you want me to be nice :) - Licences & contributors + Licences What went into making this app Version Number - Terms & Conditions - Review this app\'s Terms & Conditions - Privacy Policy - Review this app\'s Privacy Policy Information - Made by Deniz :) + Developed by Deniz :) Refresh on startup In case the background sync doesn\'t work How to enter your grade - Enter your current grade to have it appear in your personal plan and be notified about any information.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nMultiple grades can only be entered when no courses have been entered. + Enter your current grade to have it appear in your personal plan and be notified about any information.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nEntering multiple grades is not recommended. How to enter your courses You need to enter the course abbreviation for every course you want in your personal plan and want to be notified about. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required. Experimental Menu