All Projects → YuriDenison → Typedvalue

YuriDenison / Typedvalue

Licence: apache-2.0
Tiny library to simplify access to SharedPreferences, Bundle or any other key-value storage

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Typedvalue

Preference-Rhythm
Android library makes using Shared Preference easier.
Stars: ✭ 16 (-11.11%)
Mutual labels:  sharedpreferences, rxjava2
iMoney
iMoney 金融项目
Stars: ✭ 55 (+205.56%)
Mutual labels:  sharedpreferences, rxjava2
Prefser
Wrapper for Android SharedPreferences with object serialization and RxJava Observables
Stars: ✭ 228 (+1166.67%)
Mutual labels:  rxjava2, sharedpreferences
preferx
A reactive SharedPreferences library for Kotlin
Stars: ✭ 13 (-27.78%)
Mutual labels:  sharedpreferences, rxjava2
Hraftd
A reference use of Hashicorp's Raft implementation
Stars: ✭ 732 (+3966.67%)
Mutual labels:  key-value
Offlinesampleapp
Sample Offline-First MVVM app that uses Android Priority Job Queue, Room, Retrofit2, LiveData, LifecycleObserver, RxJava2, Dagger Android
Stars: ✭ 653 (+3527.78%)
Mutual labels:  rxjava2
Kotpref
Kotpref - Android SharedPreferences delegation library for Kotlin
Stars: ✭ 618 (+3333.33%)
Mutual labels:  sharedpreferences
Reactive Grpc
Reactive stubs for gRPC
Stars: ✭ 602 (+3244.44%)
Mutual labels:  rxjava2
Shpref Library
💾 Android Kotlin library. Shared preferences wrapper. (2020)
Stars: ✭ 16 (-11.11%)
Mutual labels:  sharedpreferences
Nessdb
A very fast transactional key-value, embedded database storage engine in Fractal-Tree. Teaching/Research purposes only.
Stars: ✭ 786 (+4266.67%)
Mutual labels:  key-value
Ganhuoio
基于Gank.IO提供的API的第三方客户端(RxJava+Retrofit)
Stars: ✭ 727 (+3938.89%)
Mutual labels:  rxjava2
Bitcask
🔑A high performance Key/Value store written in Go with a predictable read/write performance and high throughput. Uses a Bitcask on-disk layout (LSM+WAL) similar to Riak.
Stars: ✭ 654 (+3533.33%)
Mutual labels:  key-value
Movienight
MovieNight is a sample Android application that uses the clean architecture approach and is written in Kotlin.
Stars: ✭ 744 (+4033.33%)
Mutual labels:  rxjava2
Laravel Options
Global key-value store in the database
Stars: ✭ 626 (+3377.78%)
Mutual labels:  key-value
Acgclub
一款纯粹的ACG聚合类App
Stars: ✭ 829 (+4505.56%)
Mutual labels:  rxjava2
Android Kotlin Mvp Architecture
This repository contains a detailed sample app that implements MVP architecture in Kotlin using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
Stars: ✭ 615 (+3316.67%)
Mutual labels:  rxjava2
Grpc By Example Java
A collection of useful/essential gRPC Java Examples
Stars: ✭ 709 (+3838.89%)
Mutual labels:  rxjava2
Cv4j
The target is to set up a high quality and real-time image process and machine learning library which is implemented in pure java. The framework can run application on java desktop and android platform.
Stars: ✭ 786 (+4266.67%)
Mutual labels:  rxjava2
Pogreb
Embedded key-value store for read-heavy workloads written in Go
Stars: ✭ 708 (+3833.33%)
Mutual labels:  key-value
Histore
🏬 200b key-value store backed by navigation state
Stars: ✭ 683 (+3694.44%)
Mutual labels:  key-value

TypedValue

Build Status API Download Android Arsenal License

TypedValue is a tiny library project to simplify access to SharedPreferences, Bundle or any other key-value storage with it's own KeyValueDelegate

Common values are available out of the box:

Date module contains custom TypedValues for managing dates:

For java.time entities ThreeTen library is used.

Demo app

image

The sample application demonstrates:

  • Convenient way to manage application preferences: AppPreferences and AppPreferencesImpl

    Any calls (get(), set(), asObservable(), etc.) of each preference can be easily find via interface properties

     interface AppPreferences {
       val animationTypeValue: AnimationTypeValue
       val scaleValue: FloatValue
       val messageShownValue: BoolValue
     }
    
     class AppPreferencesImpl(app: Application) : AppPreferences {
       private val delegate = PreferenceDelegate(PreferenceManager.getDefaultSharedPreferences(app))
     
       override val animationTypeValue: AnimationTypeValue by lazy { AnimationTypeValue(delegate, KEY_ANIMATION_TYPE, AnimationType.CONFETTI) }
       override val scaleValue: FloatValue by lazy { FloatValue(delegate, KEY_SCALE, 0.8f) }
       override val messageShownValue: BoolValue by lazy { BoolValue(delegate, KEY_MESSAGE_SHOWN) }
     
       private companion object {
         const val KEY_ANIMATION_TYPE = ".key_animation_type"
         const val KEY_SCALE = ".key_scale"
         const val KEY_MESSAGE_SHOWN = ".key_message_shown"
       }
     }
    
  • benefits of observable SharedPreferences with uni-directional data flow of 'SettingsPresenter'

  • custom TypedValue: AnimationTypeValue

Installation

Add the following dependency to your build.gradle file:

dependencies {
    implementation 'io.denison:typedvalue:${LATEST_VERSION}'
    implementation 'io.denison:typedvalue-date:${LATEST_VERSION}'
}

License

Please see LICENSE

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].