NexusDialog icon indicating copy to clipboard operation
NexusDialog copied to clipboard

readonly mode

Open m-thielen opened this issue 8 years ago • 2 comments
trafficstars

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.

m-thielen avatar Oct 19 '17 15:10 m-thielen

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.

dkharrat avatar Oct 22 '17 23:10 dkharrat

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.

m-thielen avatar Oct 23 '17 07:10 m-thielen