Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/frameworks/input-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The `setting` dict has the same shape as the one used by `SettingActivity` and `
- **`min`** (int): Minimum value for `"slider"` (default: `0`)
- **`max`** (int): Maximum value for `"slider"` (default: `100`)
- **`allow_deselect`** (bool): For `radiobuttons`, allow the user to un-select the active option (default: `False`)
- **`selected_callback`** (callable): For `radiobuttons` and `dropdown`, called as `selected_callback(value)` every time the user picks an option (including re-tapping the already-selected radio), **before** Save. Use it to preview a choice live, e.g. play the sound the user just tapped. Independent of `changed_callback`, which still fires only after Save when the stored value changed. Exceptions inside it are logged and swallowed. (default: `None`)

## Result Contract

Expand Down
1 change: 1 addition & 0 deletions docs/frameworks/setting-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Each setting is defined as a dictionary with the following properties:
### Optional Properties
- **`ui`** (string): UI type to use for editing. Options: `"textarea"` (default), `"radiobuttons"`, `"dropdown"`, `"slider"`, `"activity"`
- **`ui_options`** (list): Options for `radiobuttons` and `dropdown` UI types. Each entry is a `(label, value)` tuple — the **label** appears on the radio button or dropdown row AND in the parent `SettingsActivity`'s value-label row beneath the title. The **value** is what gets stored in SharedPreferences. See [SettingsActivity → Display Labels for `ui_options`](settings-activity.md#display-labels-for-ui_options) for details.
- **`selected_callback`** (callable): Optional live-selection hook for `radiobuttons`/`dropdown`: `selected_callback(value)` fires on every pick before Save (so a picker can preview, e.g. play a sound), while `changed_callback` fires after Save. See [InputActivity](input-activity.md).
- **`placeholder`** (string): Placeholder text for textarea input
- **`default_value`** (string): Default value to select or fill in
- **`changed_callback`** (function): Callback function called when the setting value changes
Expand Down