Tweakr
Android Library for Remote Debugging, Autogenerating Settings/Preference UIs, and Wizard-of-Ozing
com.google.tweakr.TweakrRepo Interface Reference
Inheritance diagram for com.google.tweakr.TweakrRepo:
com.google.tweakr.TweakrFirebaseRepo com.google.tweakr.preferences.TweakrPreferencesRepo com.google.tweakr.TweakrFirebaseRepoMultiuser

Classes

interface  OnChangeListener
 

Public Member Functions

void addListener (OnChangeListener listener)
 
void removeListener (OnChangeListener listener)
 
void add (String name, int targetId, ValueType valueType, Object initialValue, TweakMetadata tweakMetadata)
 

Public Attributes

String FIELD_SEPARATOR = ":"
 

Detailed Description

A repo to store Tweaks and manipulate them with a UI, then notify the registry via OnChangeListener.

Member Function Documentation

◆ add()

void com.google.tweakr.TweakrRepo.add ( String  name,
int  targetId,
ValueType  valueType,
Object  initialValue,
TweakMetadata  tweakMetadata 
)

Add a new Tweak.

Parameters
namefully-qualified name of the tweak: may be a path of parent objects to the actual field's name, separated by FIELD_SEPARATOR.
targetIdmonotonically increasing ID of the target object.
valueTypeValueType for converting the UI value before passing it to OnChangeListener#onFieldChanged.
initialValueInitial value of the field as it exists in the target object.
tweakMetadataMetadata from the annotation for the UI to display.

Implemented in com.google.tweakr.TweakrFirebaseRepo, and com.google.tweakr.preferences.TweakrPreferencesRepo.

◆ addListener()

void com.google.tweakr.TweakrRepo.addListener ( OnChangeListener  listener)

Registers a listener to be notified whenever a value changes in the UI.

Implemented in com.google.tweakr.TweakrFirebaseRepo, and com.google.tweakr.preferences.TweakrPreferencesRepo.

◆ removeListener()

void com.google.tweakr.TweakrRepo.removeListener ( OnChangeListener  listener)

The documentation for this interface was generated from the following file: