Utility for B4i developers: https://www.b4x.com/android/forum/threads/adding-your-settings-to-the-default-settings-app.48778/
The source code is attached.
3 main features:
- Dynamically creates the UI for each element.
- Generates XML from the UI.
- Parses saved XML and recreates the UI.