Shared

A Simple Android SharedPreferences

Лицензия

Лицензия

Группа

Группа

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

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

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

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

0.0.1
Дата

Дата

Тип

Тип

aar
Описание

Описание

Shared
A Simple Android SharedPreferences
Ссылка на сайт

Ссылка на сайт

https://github.com/devahoy/shared
Система контроля версий

Система контроля версий

https://github.com/devahoy/shared

Скачать shared

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.devahoy/shared/ -->
<dependency>
    <groupId>com.devahoy</groupId>
    <artifactId>shared</artifactId>
    <version>0.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.devahoy/shared/
implementation 'com.devahoy:shared:0.0.1'
// https://jarcasting.com/artifacts/com.devahoy/shared/
implementation ("com.devahoy:shared:0.0.1")
'com.devahoy:shared:aar:0.0.1'
<dependency org="com.devahoy" name="shared" rev="0.0.1">
  <artifact name="shared" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.devahoy', module='shared', version='0.0.1')
)
libraryDependencies += "com.devahoy" % "shared" % "0.0.1"
[com.devahoy/shared "0.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

Shared Build Status

Shared is a Simple Android SharedPreferences, annoyed when use SharedPreferences to save data. Why you must declare SharedPreference.Editor() and then save with apply() or commit() every time. This library is save your time.

Download

Download shared-0.0.1.jar and save to libs folder

or Gradle

dependencies {
    compile 'com.devahoy:shared:0.0.1'
}

Usage

// this : Context,
// name : String, a SharedPreferences file name.
Shared shared = new Shared(this, name);

// Save data
shared.save(key, value);

// Get data
shared.get(key, value);

// Remove data
shared.remove(key);

Example

Shared shared = new Shared(this, "MyData");

// Save data.
shared.save("name", "Hello Kitty");
shared.save("age", 40);
shared.save("isAlive", true);

// Get data.
String name = shared.getString("name", "n/a");
int age = shared.getInt("age", 0);
boolean isAlive = shared.getBoolean("isAlive", false);

// Delete data.
shared.remove("name");
shared.remove("age");
shared.remove("isAlive");

License

Copyright 2014 DevAhoy

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.
com.devahoy

Devahoy Studios

Devahoy Playground & Experiment

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

Версия
0.0.1