P
P
Pavel2017-07-29 01:24:26
Java
Pavel, 2017-07-29 01:24:26

How to output data received asynchronously by TextView to UI thread?

First question.
How to parse JSON. How to display this data. For example, in a table, so that each user is a separate cell ... well, you understand ...
22b3a6ffef7945129f88d8135d904434.png

And actually, how can this data be driven into the UI stream. Because if I try to push them into a TextView in the onResponse method, then the application crashes and an error like: "Bro, you probably made a mistake with the flow"
bdef5d0e51a34c568568e2347a96cce8.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twobomb, 2017-07-29
@twobomb

Maybe something like that. Google in general

Display.getDefault().asyncExec(new Runnable() {
    public void run() {
        someSwtLabel.setText("Complete!");
    }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question