mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 04:13:53 +01:00
Disable linting for icon hiding code in preferences (#6519)
Some checks failed
Android CI / Run tests and generate APK (push) Has been cancelled
Some checks failed
Android CI / Run tests and generate APK (push) Has been cancelled
This commit is contained in:
parent
717a855149
commit
3a55583460
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package fr.free.nrw.commons.settings
|
||||
|
||||
import android.Manifest.permission
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.Dialog
|
||||
import android.content.Context.MODE_PRIVATE
|
||||
|
|
@ -303,6 +304,11 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||
)
|
||||
}
|
||||
|
||||
// Remove the space for icons in the settings menu.
|
||||
// This uses an internal API that shouldn't be used in app code,
|
||||
// but it appears to be the most robust way to do this at the moment,
|
||||
// disable the warning.
|
||||
@SuppressLint("RestrictedApi")
|
||||
override fun onCreateAdapter(preferenceScreen: PreferenceScreen): Adapter<PreferenceViewHolder>
|
||||
{
|
||||
return object : PreferenceGroupAdapter(preferenceScreen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue