Skip to content

Conversation

@m-thielen
Copy link

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.

@dkharrat
Copy link
Owner

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.

@m-thielen
Copy link
Author

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants