All Projects → 2tu → fit

2tu / fit

Licence: Apache-2.0 license
easy storage Object on SharedPreferences

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to fit

AnnotationProcessorStarter
Project to set up basics of a Java annotation processor
Stars: ✭ 19 (-64.15%)
Mutual labels:  apt, annotation
simple-annotation-processor
Simple annotation processor example. Inspired by the idea of "How ButterKnife works?"
Stars: ✭ 54 (+1.89%)
Mutual labels:  annotation, javapoet
shade
Automatic code generation for the SharedPreferences operation.
Stars: ✭ 26 (-50.94%)
Mutual labels:  annotation, sharedpreferences
RapidORM
Quick solutions for Android ORM
Stars: ✭ 24 (-54.72%)
Mutual labels:  apt, javapoet
ofxOpenCvDnnObjectDetection
OpenCV based DNN Object Detection Library for Openframeworks
Stars: ✭ 34 (-35.85%)
Mutual labels:  annotation
ensembldb
This is the ensembldb development repository.
Stars: ✭ 31 (-41.51%)
Mutual labels:  annotation
triehash
Generator for order-preserving minimal perfect hash functions in C
Stars: ✭ 36 (-32.08%)
Mutual labels:  apt
yara-exporter
Exporting MISP event attributes to yara rules usable with Thor apt scanner
Stars: ✭ 22 (-58.49%)
Mutual labels:  apt
DRAM
Distilled and Refined Annotation of Metabolism: A tool for the annotation and curation of function for microbial and viral genomes
Stars: ✭ 159 (+200%)
Mutual labels:  annotation
doccano-transformer
The official tool for transforming doccano format into common dataset formats.
Stars: ✭ 87 (+64.15%)
Mutual labels:  annotation
termux-x
it is unofficial repository maintained by me @Hax4us. you can check available packages in README
Stars: ✭ 87 (+64.15%)
Mutual labels:  apt
MS-CleanR
No description or website provided.
Stars: ✭ 21 (-60.38%)
Mutual labels:  annotation
concrete-python
Python modules and scripts for working with Concrete, a data serialization format for NLP
Stars: ✭ 19 (-64.15%)
Mutual labels:  annotation
XCPullToLoadMoreListView
XCPullToLoadMoreListView-下拉加载更多ListView控件(仿QQ、微信聊天对话列表控件)
Stars: ✭ 24 (-54.72%)
Mutual labels:  andorid
CipherSharedPrefs
Library implements encrypion layer for SharedPreferences. Also adds some additional features
Stars: ✭ 15 (-71.7%)
Mutual labels:  sharedpreferences
Kotlin-Annotation-Processor
Annotation Processor Sample in Kotlin
Stars: ✭ 19 (-64.15%)
Mutual labels:  javapoet
Android-SharedPreferences-Helper
This Shared Preferences Helper library (Library size = ~15kb only) Simplifies usage of the default Android SharedPreferences Class. The developer can do in a few lines of code which otherwise would have required several. Simple to understand as compared to the default Shared Preferences class and easy to use. Can be used by simply adding the dep…
Stars: ✭ 15 (-71.7%)
Mutual labels:  sharedpreferences
BACTpipe
BACTpipe: An assembly and annotation pipeline for bacterial genomics
Stars: ✭ 19 (-64.15%)
Mutual labels:  annotation
annotate
Create 3D labelled bounding boxes in RViz
Stars: ✭ 104 (+96.23%)
Mutual labels:  annotation
piaf
Question Answering annotation platform - Plateforme d'annotation
Stars: ✭ 62 (+16.98%)
Mutual labels:  annotation

Fit

Release

Fit storage bean for SharedPreferences which uses annotation processing to generate boilerplate code for you.

Installation

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Add the following dependency to your build.gradle file:

dependencies {
    implementation 'com.github.2tu.fit:fit:1.2.3'
    annotationProcessor 'com.github.2tu.fit:fit-compiler:1.2.3'
}

Usage

annotation model class.

@SharedPreferenceAble

save object

User user = new User();
Fit.save(context, user);
Fit.save(context, "user", user);

get

User user = Fit.get(context, User.class);
User user = Fit.get(context, "user", User.class);

clear

Fit.clear(context, User.class);
Fit.clear(context, User.class, "user");

other

Fit.get(context, "name").getBoolean("isFirst", false);
SharedPreferences.Editor editor = Fit.edit(context, "name");
editor.putBoolean("isFirst", true);
editor.apply();
Fit.clearObjectField(cotext, "user", "hobbies");

Q&A

apt or annotationProcessor

License

Copyright 2016 Tu

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the 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].