SimpleLibsPreference
Marc Auberer edited this page Jan 17, 2021
·
6 revisions
Integration of Mike Penz`s AboutLibraries lib.
If you want to use the SimpleLibsPreference
or LibsClickListener
you have to meet a few more requirements, which are needed to parse the dependencies, you used within your project.
Please edit the build.gradle
file at project level:
buildscript {
...
ext.aboutLibsVersion = '<latest-version>'
...
}
repositories {...}
dependencies {
...
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$aboutLibsVersion"
...
}
...
And the build.gradle
file at module level:
...
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
android {...}
dependencies {
...
implementation 'com.chillibits:simplesettings:<latest-version>'
implementation 'com.google.android.material:material:<latest-version>'
implementation 'androidx.preference:preference:<latest-version>'
implementation "com.mikepenz:aboutlibraries-core:$aboutLibsVersion"
implementation "com.mikepenz:aboutlibraries:$aboutLibsVersion@aar"
...
}
SimpleSettings(this).show {
Section {
LibsPref {
activityTitle = "LibsPreference"
edgeToEdge = true
...
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.chillibits.simplesettings.preference.LibsPreference
app:key="libs_preference"
app:title="@string/libsPreferenceTitle"
app:summary="@string/libsPreferenceSummary"
app:sort="true"
app:activity_title="@string/app_name"/>
</PreferenceScreen>
The LibsActivity
can be styled by passing the customization parameters to the SimpleLibsPreference
object. It then forwards the customization to the LibsActivity
.
© Marc Auberer 2020-2023