Tweakr
Android Library for Remote Debugging, Autogenerating Settings/Preference UIs, and Wizard-of-Ozing
|
Static Public Member Functions | |
static synchronized TweakrRepo | getRepo () |
static synchronized void | setRepo (TweakrRepo repo) |
static void | register (Object target) |
static void | register (Object target, String namePrefix) |
static void | addListener (TweakrRepo.OnChangeListener listener) |
static void | removeListener (TweakrRepo.OnChangeListener listener) |
The main Tweakr manager.
Whenever you add com.google.tweakr.annotations.Tweak
annotations to the members of an object, make sure to call register(Object)
in the object's constructor so it can find the annotations and register each annotated member. For some Android objects you may want to call it during onCreate() instead of the constructor, so you can initialize any views or other fields before registering them.
|
static |
{
|
static |
Returns the current repo used for this session.
|
static |
{
|
static |
Registers all members of target that are annotated with com.google.tweakr.annotations.Tweak
.
Any annotated fields with children must be non-null at the time of registration.
target | the object containing members to register. |
namePrefix | An optional prefix for each Tweak. Use this if you want to differentiate multiple objects in the UI: instead of changing a value and changing all objects that share that member, you can add a unique namePrefix for each object (or group of objects) so that the changes only affect a subset of the targets. |
|
static |
{
|
static |
Optionally sets the repo to be used for this session.
You must set this before any other calls to methods in this class (e.g. register(Object)
). Best practice is to set it in your Application#onCreate()