i have some threads in which i create some views and prepare them to be displayed. Among them i also have a WebView. This code is executed in thread:
WebView lGraphWebView = null;
try{
lGraphWebView = new WebView(AppController.getAppController());
}catch (Exception e) {
Log.d("info", "error: " +e );
}
and it throws the following exception:
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
This is a bit strange, because when i create a simple button all is OK. So, can anyone explane to me why on creation of a WebView i get this exception and if Looper.prepare()
can help here?
Thanks in advance!