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.
All Preferences Activity | Edit String/Number Preferences | Edit Boolean Preferences |
---|---|---|
- 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.
To add Prefixer to your project, follow these steps:
-
Ensure you have
mavenCentral()
in your project'sbuild.gradle
file:allprojects { repositories { ... mavenCentral() } }
-
Add Prefixer dependency to your module's build.gradle file:
dependencies { implementation 'dev.vishalgaur:prefixer:1.2.0' }
To utilize Prefixer in your application, adhere to these steps:
-
Initialize Prefixer in your Activity class:
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. } }
-
Retrieve the launch intent for viewing and editing the SharedPreferences, then start the activity:
val launchIntent = instance.getLaunchIntent(this) startActivity(launchIntent)