Skip to content

Repository files navigation

PreferenceManager

一款针对Android平台下Share preference 管理器

Jitpack PRs Welcome Star

目录

-最新版本
-如何引用
-进阶使用
-混淆配置
-如何提Issues
-License

如何引用

  • maven { url 'https://jitpack.io' } 加入到 repositories 中
  • 添加如下依赖,末尾的「latestVersion」指的是PreferenceManager Download 里的版本名称,请自行替换。 使用Gradle
repositories {
  google()
  maven { url 'https://jitpack.io' }
}

dependencies {
  // PictureSelector
  implementation 'com.github.peihua8858:PreferenceManager:${latestVersion}'
}

或者Maven:

<dependency>
  <groupId>com.github.peihua8858</groupId>
  <artifactId>PreferenceManager</artifactId>
  <version>${latestVersion}</version>
</dependency>

进阶使用

简单用例如下所示:

//初始化
PreferenceManager.initManager(context,sharedPreferences)

PreferenceManager.initManager(context)
//读取
PreferenceManager.read(key,defaultValue)
//保存
PreferenceManager.save(key,value)

混淆配置

-keep class com.fz.premanager.** { *; }

License

Copyright 2023 peihua

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages