When I need to update a field in the UI, do I need to run this code in the UI thread ?
For example: I have to change the layout of my activity .
The code I'm using is this:
RunOnUiThread(() =>
{
_layoutBlurred.Visibility = ViewStates.Visible;
_layoutBlurred.Background = image;
_layoutContent.Visibility = ViewStates.Invisible;
_listViewScheduling.Enabled = false;
});
Or even a simple text exchange of a TextView:
_txtStatus.Text = GetString(Resource.String.app_online);
Do you need to use RunOnUiThread()
in these cases or not?