nuka_cola nuka_cola - 6 months ago 35
Android Question

Update view - Reactive Extensions

I've got following code:

t => SendCounter(t),
e => HandleException(e));

Where XXX, YYY are

Inside SendCounter(t) I set a text with t value.

The problem is that when I run the code I got this error:

'only the original thread that created a view hierarchy can touch its views'

I'm using this component:

Answer Source
var uiThread = SynchronizationContext.Current;

    .Subscribe( t => SendCounter(t), e => HandleException(e));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download