Settings: rename "developer mode" to "advanced settings"
This commit is contained in:
parent
1bd85082c3
commit
a00f51a264
|
@ -86,7 +86,7 @@ class RageShake @Inject constructor(private val activity: AppCompatActivity,
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openSettings() {
|
private fun openSettings() {
|
||||||
navigator.openSettings(activity, VectorSettingsActivity.EXTRA_DIRECT_ACCESS_DEVELOPER)
|
navigator.openSettings(activity, VectorSettingsActivity.EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -55,8 +55,8 @@ class VectorSettingsActivity : VectorBaseActivity(),
|
||||||
if (isFirstCreation()) {
|
if (isFirstCreation()) {
|
||||||
// display the fragment
|
// display the fragment
|
||||||
when (intent.getIntExtra(EXTRA_DIRECT_ACCESS, EXTRA_DIRECT_ACCESS_ROOT)) {
|
when (intent.getIntExtra(EXTRA_DIRECT_ACCESS, EXTRA_DIRECT_ACCESS_ROOT)) {
|
||||||
EXTRA_DIRECT_ACCESS_DEVELOPER ->
|
EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS ->
|
||||||
replaceFragment(R.id.vector_settings_page, VectorSettingsDeveloperModeFragment::class.java, null, FRAGMENT_TAG)
|
replaceFragment(R.id.vector_settings_page, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG)
|
||||||
else ->
|
else ->
|
||||||
replaceFragment(R.id.vector_settings_page, VectorSettingsRootFragment::class.java, null, FRAGMENT_TAG)
|
replaceFragment(R.id.vector_settings_page, VectorSettingsRootFragment::class.java, null, FRAGMENT_TAG)
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ class VectorSettingsActivity : VectorBaseActivity(),
|
||||||
private const val EXTRA_DIRECT_ACCESS = "EXTRA_DIRECT_ACCESS"
|
private const val EXTRA_DIRECT_ACCESS = "EXTRA_DIRECT_ACCESS"
|
||||||
|
|
||||||
const val EXTRA_DIRECT_ACCESS_ROOT = 0
|
const val EXTRA_DIRECT_ACCESS_ROOT = 0
|
||||||
const val EXTRA_DIRECT_ACCESS_DEVELOPER = 1
|
const val EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS = 1
|
||||||
|
|
||||||
private const val FRAGMENT_TAG = "VectorSettingsPreferencesFragment"
|
private const val FRAGMENT_TAG = "VectorSettingsPreferencesFragment"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,10 @@ import im.vector.riotx.core.platform.VectorBaseActivity
|
||||||
import im.vector.riotx.core.preference.VectorSwitchPreference
|
import im.vector.riotx.core.preference.VectorSwitchPreference
|
||||||
import im.vector.riotx.features.rageshake.RageShake
|
import im.vector.riotx.features.rageshake.RageShake
|
||||||
|
|
||||||
class VectorSettingsDeveloperModeFragment : VectorSettingsBaseFragment() {
|
class VectorSettingsAdvancedSettingsFragment : VectorSettingsBaseFragment() {
|
||||||
|
|
||||||
override var titleRes = R.string.settings_developer_mode
|
override var titleRes = R.string.settings_advanced_settings
|
||||||
override val preferenceXmlRes = R.xml.vector_settings_developer_mode
|
override val preferenceXmlRes = R.xml.vector_settings_advanced_settings
|
||||||
|
|
||||||
private var rageshake: RageShake? = null
|
private var rageshake: RageShake? = null
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
|
||||||
<string name="settings_show_devices_list">See all my devices</string>
|
<string name="settings_show_devices_list">See all my devices</string>
|
||||||
|
<string name="settings_advanced_settings">Advanced settings</string>
|
||||||
<string name="settings_developer_mode">Developer mode</string>
|
<string name="settings_developer_mode">Developer mode</string>
|
||||||
<string name="settings_developer_mode_summary">The developer mode activates hidden features and may also make the application less stable. For developers only!</string>
|
<string name="settings_developer_mode_summary">The developer mode activates hidden features and may also make the application less stable. For developers only!</string>
|
||||||
<string name="settings_rageshake">Rageshake</string>
|
<string name="settings_rageshake">Rageshake</string>
|
||||||
|
|
|
@ -2,25 +2,6 @@
|
||||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
|
||||||
android:key="SETTINGS_RAGE_SHAKE_CATEGORY_KEY"
|
|
||||||
android:title="@string/settings_rageshake">
|
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorSwitchPreference
|
|
||||||
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
|
|
||||||
android:title="@string/send_bug_report_rage_shake" />
|
|
||||||
|
|
||||||
<androidx.preference.SeekBarPreference
|
|
||||||
android:defaultValue="13"
|
|
||||||
android:dependency="SETTINGS_USE_RAGE_SHAKE_KEY"
|
|
||||||
android:key="SETTINGS_RAGE_SHAKE_DETECTION_THRESHOLD_KEY"
|
|
||||||
android:max="15"
|
|
||||||
android:summary="@string/settings_rageshake_detection_threshold_summary"
|
|
||||||
android:title="@string/settings_rageshake_detection_threshold"
|
|
||||||
app:min="11" />
|
|
||||||
|
|
||||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreferenceCategory android:title="@string/settings_developer_mode">
|
<im.vector.riotx.core.preference.VectorPreferenceCategory android:title="@string/settings_developer_mode">
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorSwitchPreference
|
<im.vector.riotx.core.preference.VectorSwitchPreference
|
||||||
|
@ -44,9 +25,28 @@
|
||||||
|
|
||||||
<!-- TODO Display unsupported events -->
|
<!-- TODO Display unsupported events -->
|
||||||
|
|
||||||
|
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
||||||
android:dependency="SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY"
|
android:key="SETTINGS_RAGE_SHAKE_CATEGORY_KEY"
|
||||||
android:title="@string/settings_notifications">
|
android:title="@string/settings_rageshake">
|
||||||
|
|
||||||
|
<im.vector.riotx.core.preference.VectorSwitchPreference
|
||||||
|
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||||
|
android:title="@string/send_bug_report_rage_shake" />
|
||||||
|
|
||||||
|
<androidx.preference.SeekBarPreference
|
||||||
|
android:defaultValue="13"
|
||||||
|
android:dependency="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||||
|
android:key="SETTINGS_RAGE_SHAKE_DETECTION_THRESHOLD_KEY"
|
||||||
|
android:max="15"
|
||||||
|
android:summary="@string/settings_rageshake_detection_threshold_summary"
|
||||||
|
android:title="@string/settings_rageshake_detection_threshold"
|
||||||
|
app:min="11" />
|
||||||
|
|
||||||
|
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||||
|
|
||||||
|
<im.vector.riotx.core.preference.VectorPreferenceCategory android:title="@string/settings_notifications">
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreference
|
<im.vector.riotx.core.preference.VectorPreference
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
|
@ -60,6 +60,4 @@
|
||||||
|
|
||||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||||
|
|
||||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
|
@ -47,8 +47,8 @@
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreference
|
<im.vector.riotx.core.preference.VectorPreference
|
||||||
android:icon="@drawable/ic_settings_root_general"
|
android:icon="@drawable/ic_settings_root_general"
|
||||||
android:title="@string/settings_developer_mode"
|
android:title="@string/settings_advanced_settings"
|
||||||
app:fragment="im.vector.riotx.features.settings.VectorSettingsDeveloperModeFragment" />
|
app:fragment="im.vector.riotx.features.settings.VectorSettingsAdvancedSettingsFragment" />
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreference
|
<im.vector.riotx.core.preference.VectorPreference
|
||||||
android:icon="@drawable/ic_settings_root_help_about"
|
android:icon="@drawable/ic_settings_root_help_about"
|
||||||
|
|
Loading…
Reference in New Issue