Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom attributes #2

Open
3 tasks
ZacSweers opened this issue May 14, 2017 · 0 comments
Open
3 tasks

Custom attributes #2

ZacSweers opened this issue May 14, 2017 · 0 comments
Assignees

Comments

@ZacSweers
Copy link
Owner

From @hzsweers on September 1, 2015 22:0

Adding support for custom attributes would make it easier for users to coerce the resulting classes just the way they want, while extending functionality by being able to specify non-standard types.

Initial ideas:

  • valueType - Specify a custom type to cast the value to.
    • Useful for things like String -> CharSequence.
    • EditTextPreference is considered a String by shared prefs but can be a numerical value. Current behavior reads it as an int (Rewrite in Kotlin #5)
    • This would also be useful for specifying non-xml-friendly types that SharedPreferences supports, such as StringSet or Long.
  • entryName - Custom name for the entry in xml. Would take precedence over generating one from the key.
  • skip - Don't generate a block for this preference

Copied from original issue: Flipboard#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant