Sometimes I've got situations that I want to make "light" operation like showing UI view and after that I want to show large set of UI views. I make it this way:
smallView.setVisibility(View.VISIBLE);
largeSetOfViews.setVisibility(View.VISIBLE);
the result is that smallView and largeSetOfViews become visible at the same moment.
I want to make:
smallView.setVisibility(View.VISIBLE);
FLUSH_UI
largeSetOfViews.setVisibility(View.VISIBLE);
to have smallView visible before largeSetOfViews will be visible.
To make flush I do:
smallView.setVisibility(View.VISIBLE);
Handler handler = new Handler();
handler.post(new Runnable() {
@Override
public void run() {
largeSetOfViews.setVisibility(View.VISIBLE);
}
});
Is there any better solution for making Flush UI?