jjobes / SlideDateTimePicker

A combined DatePicker and TimePicker in a DialogFragment for Android
Apache License 2.0
836 stars 235 forks source link

Warn about use of reflection #6

Closed iPaulPro closed 9 years ago

iPaulPro commented 9 years ago

You should add a warning to the readme that clearly states that this library is using a bunch of reflection in the Picker classes.

jjobes commented 9 years ago

Thank you, iPaulPro.The readme has been updated.

moshbear commented 3 years ago

This could somewhat be done without reflection. See Resources.getSystem().getIdentifier(name, "id", "android") to get the id. Works for all of numberpicker_input, hour, minute, and divider. This is the approach I used in the first iteration of my picker.

Reflection for the selection divider seems inevitable, though, as it's a private field and annotated with @UnsupportedAppUsage