Btw, do I need to make this if-check while the whole XML is being loaded and this would mean that I would have to use a do-while loop. Because if I firstly check whether the state is 200 (and wait about 5 seconds if it is not to recheck again) and then after the state = 200, do all the XML loading and parsing? I think that wouldn't make the app freeze but it still would take a lot of time to display the data.
I still don't get why the app freezes? I mean, if there is any problem with the XML loading or parsing I've added the code to display it, but instead it freezes. Or is it the fact that I am loading a form while another one is still in the process of being completely loaded?