title: Can someone fix my CalledFromWrongThreadException?
body: <p>I have an activity that starts and then creates a new instance of NetworkHandler, in NetworkHandler i run it on a new thread so that the UI thread doesn't get stuck. The NetworkHandler has a run() method that sits on while((message = reader.readLine())!=null). reader is a BufferedReader and message is a String. Then the UI thread goes and does the layout. When the user navigates to the login screen and clicks the login button, the client sends a message to the server and receives information back, ie wither or not the username/password combination was correct. Then the thread that does the stream reading (the while loop) goes and tries to change the layout so that the game screen pops up if the login was successful or the oops you screwed something up screen. It gives me this annoying exception and it doesn't change the layout. Ive had this issue before in android, I don't understand why you have to call a View change from the UI Thread. It doesn't make sense to me. In Java i know that you can do that, i have make probably a hundred applications for my computer and i know that java doesn't have this issue. Can someone explain? All relevant answers are appreciated!</p>