I have a Switch and a TextInputEditText. Both 'Enabled' are bound to the same field in the viewmodel.
When the activity is loaded, the bound field is set to false. The Switch is disabled as expected. However, the TextInputEditText is enabled. The 'Clickable' has the same issue. Text is bound successfully.
After changed the bound field to true and then false, the TextInputEditText Enable & Clickable work correctly. It seems that it only happens when it is loaded initially.
<android.support.v7.widget.SwitchCompat
style="@style/EntryTextStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
local:MvxLang="Text LabelDeferArrivalNotice"
local:MvxBind="Checked RouteMarker.DeferArrivalNotice; Enabled RouteMarker.ArrivalNotice" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/edittext_route_marker_EffectiveFromDateTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:editable="false"
android:focusableInTouchMode="false"
style="@style/EntryTextStyle"
local:MvxLang="Hint LabelEffectiveFromTime"
local:MvxBind="Text DateTimeToString(RouteMarker.EffectiveFromDateTime);
Enabled RouteMarker.ArrivalNotice;
Clickable RouteMarker.ArrivalNotice;
Click PromptDeferTimeCommand" />
Is there anything special I have to do with the TextInputEditText?
Thanks
TextInputEditText. Is it possibleRouteMarker.ArrivalNoticeis being set from a thread other than the main thread? - Trevor Balcom