Add option to not colorize notification

This commit is contained in:
Xiang Rong Lin 2020-11-01 18:13:41 +01:00 committed by Stypox
parent e97d0b9a69
commit 974f8f692c
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
5 changed files with 24 additions and 1 deletions

View file

@ -1,10 +1,19 @@
package org.schabi.newpipe.settings
import android.os.Build
import android.os.Bundle
import androidx.preference.Preference
import org.schabi.newpipe.R
class NotificationSettingsFragment : BasePreferenceFragment() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.notification_settings)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
val colorizePref: Preference? = findPreference(getString(R.string.notification_colorize_key))
colorizePref?.let {
preferenceScreen.removePreference(it)
}
}
}
}