All Projects → Maxr1998 → ModernAndroidPreferences

Maxr1998 / ModernAndroidPreferences

Licence: Apache-2.0 license
Android Preferences defined through Kotlin DSL, shown in a RecyclerView

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to ModernAndroidPreferences

Night Shift On Unsupported Macs
Enable Night Shift on older Unsupported Macs
Stars: ✭ 86 (-6.52%)
Mutual labels:  preferences
Mac
macOS Mojave v. 10.14 setup for developers.
Stars: ✭ 209 (+127.17%)
Mutual labels:  preferences
PowerPreference
💾 A Powerful library to control and simplify the usage of shared preference in Android.
Stars: ✭ 95 (+3.26%)
Mutual labels:  preferences
Ccnpreferenceswindowcontroller
CCNPreferencesWindowController is an Objective-C subclass of NSWindowController that automatically manages your custom view controllers for handling app preferences.
Stars: ✭ 105 (+14.13%)
Mutual labels:  preferences
Macos Fn Toggle
A macOS app to quickly toggle the behavior of the fn key.
Stars: ✭ 178 (+93.48%)
Mutual labels:  preferences
Prefser
Wrapper for Android SharedPreferences with object serialization and RxJava Observables
Stars: ✭ 228 (+147.83%)
Mutual labels:  preferences
Androidpreferenceactivity
Provides an alternative implementation of Android's PreferenceActivity
Stars: ✭ 63 (-31.52%)
Mutual labels:  preferences
django-siteprefs
Reusable app for Django introducing site preferences system
Stars: ✭ 15 (-83.7%)
Mutual labels:  preferences
Typedpreferences
Preference wrappers for primitive types for Android
Stars: ✭ 191 (+107.61%)
Mutual labels:  preferences
tauri-plugin-store
Simple and persistent, unencrypted key-value store for your Tauri app.
Stars: ✭ 123 (+33.7%)
Mutual labels:  preferences
Bulldog
Android library to simplify reading and writing to SharedPreferences, never write code like this anymore prefs.edit().putString("someKey","someString").apply()
Stars: ✭ 133 (+44.57%)
Mutual labels:  preferences
Preferenceholder
SharedPreference usage made fun in Kotlin
Stars: ✭ 148 (+60.87%)
Mutual labels:  preferences
setup
My setup... dotfiles, aliases, functions, preferences, apps. Everything.
Stars: ✭ 110 (+19.57%)
Mutual labels:  preferences
Mac Bootstrap
💻 Provision a new Mac for web development with dotfiles + Fish/Zsh, Neovim, and Tmux
Stars: ✭ 96 (+4.35%)
Mutual labels:  preferences
MaterialPreferences
🍉 An Android library that lets you implement MaterialPreferences on Setting UI.
Stars: ✭ 21 (-77.17%)
Mutual labels:  preferences
Multiplatform Preferences
Kotlin Multi Platform Preferences, for android an ios : SharedPreferences & NSUserDefault
Stars: ✭ 76 (-17.39%)
Mutual labels:  preferences
Settings View
🔧 Edit Atom settings
Stars: ✭ 226 (+145.65%)
Mutual labels:  preferences
LocalPreferences
Better alternative for Unity's PlayerPrefs
Stars: ✭ 33 (-64.13%)
Mutual labels:  preferences
vscode-formatting-toggle
A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.
Stars: ✭ 52 (-43.48%)
Mutual labels:  preferences
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (-50%)
Mutual labels:  preferences

ModernAndroidPreferences

GitHub release Maven Central Build status Lint status License

Android preferences in Kotlin DSL, displayed in a RecyclerView.

No XML, no troubles with PreferenceManager, Fragments, or styling, no more ListView. 🎉

Code example

// Setup a preference screen
val screen = screen(context) {
    pref("first") {
        title = "A preference"
        summary = "Click me to do stuff"
        click {
            doStuff()
        }
    }
    pref("second") {
        title = "Another one"
        iconRes = R.drawable.preference_icon_24dp
    }
    categoryHeader("more") {
        titleRes = R.string.category_more
    }
    switch("toggle_feature") {
        title = "Also supports switches"
    }
    // and many other preference widgets!
}

// Wrap the created screen in a preference adapter…
val preferencesAdapter = PreferencesAdapter(screen)

// …that can be attached to a RecyclerView
recyclerView.adapter = preferencesAdapter

View the example app

Example Activities (with and without using ViewModel) show advanced info like back handling, saving/restoring scroll position, and using the OnScreenChangeListener.

Include to project

ModernAndroidPreferences is on Maven Central, so you can get it like any other dependency:

dependencies {
    implementation 'de.maxr1998:modernandroidpreferences:2.2.0'
}

NOTE: This library has previously been available as de.Maxr1998.android:modernpreferences on Bintray JCenter, but was migrated to Sonatype Maven Central in light of the impending JCenter sunsetting.
To get in line with Maven naming standards, it was renamed to de.maxr1998:modernandroidpreferences.

License

Copyright © 2018-2021 Max Rumpf alias Maxr1998

This library is released under the Apache License version 2.0. If you use this library (or code from it) in your projects, crediting me is appreciated.

The example application however is licensed under the GNU General Public version 3, or any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].