The fact that you have changed a bit of the question, does not cancel my comment, do everything completely in AsyncTask, if it doesn’t fit, since I didn’t understand something, this is what occurred to me:
Try to implement through a queue, instead of an array of value.properties, and recursion.
This queue is passed to the doSomeThing (...) method.
Accordingly, the current item that comes from the queue will be value.properties [i], and after use, the doSomeThing (...) method is deleted and called again.
And in the last branch, AsyncTask is launched, and after it is executed, doSomeThing (...) is called in onPostExecute (...).
Something like this
public void doSMT(Queue<String> q) { String text = q.peek(); if (text.equals("one")) { // тут что-либо делаем (не поток) //....... //....... doSMT(q); } if (text.equals("two")) { // тут тоже что либо делаем (не поток) //....... //....... doSMT(q); } if (text.equals("thread")) { // а вот тут уже создаем и запускаем поток new CreateSpinner(q).execute(); } } class CreateSpinner extens AsyncTask<Void,Void,Void> { private Queue<String> q public CreateSpinner(Queue<String> q) { this.q = q; } @Override public Void doinbackgroudn(Void... p) { // тут тоже что либо делаем //....... //....... } @Override public void onPostExecute() { // тут тоже что либо делаем //....... //....... doSMT(q); } }
The decision does not pull on elegance, but should work as you need.