add open source libraries screen

This commit is contained in:
Johan von Forstner
2020-04-11 18:20:51 +02:00
parent 030881665f
commit 40a5f824c2
7 changed files with 26 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import androidx.preference.PreferenceFragmentCompat
import com.johan.evmap.BuildConfig
import com.johan.evmap.MapsActivity
import com.johan.evmap.R
import com.mikepenz.aboutlibraries.LibsBuilder
class AboutFragment : PreferenceFragmentCompat() {
@@ -36,6 +37,16 @@ class AboutFragment : PreferenceFragmentCompat() {
(activity as? MapsActivity)?.openUrl(preference.summary.toString())
true
}
"oss_licenses" -> {
LibsBuilder()
.withLicenseShown(true)
.withAboutVersionShown(false)
.withAboutIconShown(false)
.withActivityTitle(getString(R.string.oss_licenses))
.withExcludedLibraries()
.start(requireActivity())
true
}
else -> super.onPreferenceTreeClick(preference)
}
}