Bind click on TextInputEditText in TextInputLayout
I've created a custom control whose layout is roughly like this
<TextInputLayout> <TextInputEditText></TextInputEditText> </TextInputLayout>
For a use case, I would like to attach a command to the click event on the TextInputLayout in order to open up a datepicker fragment from the view model. So I proceeded like this:
<MyCustomView ... app:MvxBind="Click SaveDateCommand"/>
However, the click event wont trigger the "SaveDateCommand". In my control I have added stylable properties to control the "focusable" and "focusableInTouchMode" of the TextInputEditText widget; I've set those to false to no avail. I also went the custom binding route. Didn't work either. As of know I have written the barebones layout for my control into the main layout to bind a click with a command in TextInputEditText.
<TextInputLayout> <TextInputEditText app:MvxBind="Click SaveDateCommand"/> </TextInputLayout>
However, I have the gut feeling that there has a to be a better way to do it. Thank you for your share of expertise on this one.