Skip to content

Commit

Permalink
feat: new reviewer settings page
Browse files Browse the repository at this point in the history
dev-only
  • Loading branch information
BrayanDSO committed Jun 30, 2024
1 parent f02c91c commit 8cd9c40
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 Brayan Oliveira <[email protected]>
*
* 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 the Free Software
* Foundation; either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.ichi2.anki.preferences

import android.os.Bundle
import androidx.preference.PreferenceFragmentCompat
import com.ichi2.anki.R

/**
* Developer options to test some of the new reviewer settings and features
*
* Not a `SettingsFragment` to avoid boilerplate and sending analytics reports,
* since this is just a temporary screen while the new reviewer is being developed.
*/
class ReviewerOptionsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.preferences_reviewer)
}
}
1 change: 1 addition & 0 deletions AnkiDroid/src/main/res/values/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
<string name="pref_lock_database_key">debug_lock_database</string>
<string name="new_congrats_screen_pref_key">new_congrats_screen</string>
<string name="new_reviewer_pref_key">newReviewer</string>
<string name="new_reviewer_options_key">newReviewerOptions</string>
<string name="pref_show_onboarding_key">showOnboarding</string>
<string name="pref_reset_onboarding_key">resetOnboarding</string>
<string name="dev_options_enabled_by_user_key">devOptionsEnabledByUser</string>
Expand Down
5 changes: 5 additions & 0 deletions AnkiDroid/src/main/res/xml/preferences_dev_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
android:title="New reviewer"
android:key="@string/new_reviewer_pref_key"
android:defaultValue="false"/>
<Preference
android:title="New reviewer options"
android:key="@string/new_reviewer_options_key"
android:dependency="@string/new_reviewer_pref_key"
android:fragment="com.ichi2.anki.preferences.ReviewerOptionsFragment"/>
<SwitchPreferenceCompat
android:title="New congrats screen"
android:key="@string/new_congrats_screen_pref_key"
Expand Down
4 changes: 4 additions & 0 deletions AnkiDroid/src/main/res/xml/preferences_reviewer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

</androidx.preference.PreferenceScreen>

0 comments on commit 8cd9c40

Please sign in to comment.