Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i-vishi/prefixer
Prefixer: Simplify Shared Preferences editing. Inspect and modify Android app preferences effortlessly.
https://github.com/i-vishi/prefixer
android android-development android-library android-sdk jetpack-compose kotlin maven-central shared-preferences
Last synced: 4 days ago
JSON representation
Prefixer: Simplify Shared Preferences editing. Inspect and modify Android app preferences effortlessly.
- Host: GitHub
- URL: https://github.com/i-vishi/prefixer
- Owner: i-vishi
- License: apache-2.0
- Created: 2024-04-05T19:43:41.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-13T22:02:48.000Z (8 months ago)
- Last Synced: 2024-04-14T00:00:52.210Z (8 months ago)
- Topics: android, android-development, android-library, android-sdk, jetpack-compose, kotlin, maven-central, shared-preferences
- Language: Kotlin
- Homepage:
- Size: 808 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prefixer
Prefixer is an intuitive Android library designed for developers to effortlessly visualize and modify SharedPreferences. It simplifies preference management and enhances debugging and development efficiency by providing accessible SharedPreferences manipulation directly from your app's UI.
## Snapshots
| All Preferences Activity | Edit String/Number Preferences | Edit Boolean Preferences |
|:-------------------------------------------:|:----------------------------------------:|:------------------------------------:|
| ![](snapshots/all_preferences_activity.png) | ![](snapshots/edit_pref_bottomsheet.png) | ![](snapshots/edit_boolean_pref.png) |## Features
- **Easy Initialization**: Quick setup with just one line of code.
- **User-Friendly UI**: Launches a new activity displaying all SharedPreferences in a clean and interactive interface.
- **Edit Preferences**: Allows editing of SharedPreferences values directly from the UI with a simple ***long-press***.
- **Seamless Integration**: Easily integrates into existing Android projects without hassle.## Getting Started
### Installation
To add Prefixer to your project, follow these steps:
1. Ensure you have `mavenCentral()` in your project's `build.gradle` file:
```gradle
allprojects {
repositories {
...
mavenCentral()
}
}
```
2. Add Prefixer dependency to your module's build.gradle file:```gradle
dependencies {
implementation 'dev.vishalgaur:prefixer:1.2.0'
}
```### Quick Start
To utilize Prefixer in your application, adhere to these steps:
1. Initialize Prefixer in your Activity class:
```kotlin
class MyActivity : ComponentActivity() {
override fun onCreate() {
super.onCreate()
val instance = Prefixer.initialize(this, "pref_file_name") // Replace "pref_file_name" with your actual preferences file name.
}
}
```2. Retrieve the launch intent for viewing and editing the SharedPreferences, then start the activity:
```kotlin
val launchIntent = instance.getLaunchIntent(this)
startActivity(launchIntent)
```