NexusDialog
NexusDialog copied to clipboard
readonly mode
This PR adds a readonly mode to display items in its current state while preventing accidental edits. The changes are quite a lot due to the fact that Android's EditText does not have a decent readonly state. Therefore, in readonly mode the code hides the EditText and displays a TextView instead. Since EditText widgets are also used by DatePicker and TimePicker, I created a TextController class which all controllers using EditText inherit from. Maybe the select controllers should use it, too.
Thanks for your contribution! This feature is useful.
I was wondering why you chose to implement it this way as opposed to the other possible approaches, such as using editText.setInputType.
Setting the input type (and all other approaches mentioned in this SO thread) all have at least one drawback: the underline of the EditText is still there - to me, this implies the field is editable.