Saber Sample

SharedPreferences "injection" for Android.

Лицензия

Лицензия

Группа

Группа

com.jug6ernaut
Идентификатор

Идентификатор

saber-sample
Последняя версия

Последняя версия

0.5.0
Дата

Дата

Тип

Тип

apk
Описание

Описание

Saber Sample
SharedPreferences "injection" for Android.

Скачать saber-sample

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.jug6ernaut : saber jar 0.5.0
com.jakewharton : butterknife jar 4.0.1
org.parceler : parceler-api jar 0.2.6

provided (2)

Идентификатор библиотеки Тип Версия
org.parceler : parceler jar 0.2.6
com.google.android : android jar 4.1.1.4

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10
org.easytesting : fest-assert-core jar 2.0M10
com.squareup : fest-android jar 1.0.7
org.robolectric : robolectric jar 2.4

Модули Проекта

Данный проект не имеет модулей.

Saber Build Status

Android SharedPreferences wrapper and injector. Based on Dart, which was originally based on ButterKnife.

SharedPreference "injection" library for Android which uses annotation processing to generate code that does direct field assignment of your SharedPreference..

Usage

@PreferenceConfig(file = "someFile") // optional, file used for all sub @Preference unless override
public class MainActivity extends Activity {

  @Bind Preference<Boolean> boolPreference; // no information needed

  @Override protected void onCreate(Bundle savedInstanceState) {
    Saber.inject(this);

    Boolean bool = boolPreference.get();
    boolPreference.set(true);
  }
  
}

Saber provides wrapper classes for all shared preference applicable value types, preferenceType safe and null safe.

IntPreference
LongPreference
FloatPreference
BooleanPreference
StringPreference
StringSetPreference

Configuration

@Bind Has 3 fields, all optional

key Key to be used, if not provided variable name is used.

file File to use, if not provided the default is used.

dv Default value to be used, if not provided the class specific value will be used.

Download

Download the latest JAR via Maven:

<dependency>
  <groupId>com.jug6ernaut.saber</groupId>
  <artifactId>saber</artifactId>
  <version>0.6.0</version>
</dependency>

or Gradle:

compile 'com.jug6ernaut.saber:saber:0.6.0'

License

Copyright 2015 William Webb
Copyright 2014 Prateek Srivastava (@f2prateek)
Copyright 2013 Jake Wharton

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.

Версии библиотеки

Версия
0.5.0