Hey people,
I have a Static google map that I want to come after a progress bar (this runs till the gmap loads completely). Below is my code that shows progress bar for some times and nothing happens afterwards. I expect Gmap to show.
progressDialog = ProgressDialog.show(this, "","Loading...");
new Thread() {
public void run() {
initial();
try
{
showmap();
}
catch (Exception e)
{
Log.e("tag", e.getMessage());
}
progressDialog.dismiss();
}
}.start();
----------
showmap() function:::
public void showmap()
{
try {
URL thumb_u = new URL(image_URL);
thumb_d = Drawable.createFromStream(thumb_u.openStream(),
"src");
image.setImageDrawable(thumb_d);
} catch (Exception e) {
Toast.makeText(this, "Error", Toast.LENGTH_SHORT).show();
}
}
Where have I gone wrong ? Hope I will get some suggestions.
TIA.
I have a Static google map that I want to come after a progress bar (this runs till the gmap loads completely). Below is my code that shows progress bar for some times and nothing happens afterwards. I expect Gmap to show.
progressDialog = ProgressDialog.show(this, "","Loading...");
new Thread() {
public void run() {
initial();
try
{
showmap();
}
catch (Exception e)
{
Log.e("tag", e.getMessage());
}
progressDialog.dismiss();
}
}.start();
----------
showmap() function:::
public void showmap()
{
try {
URL thumb_u = new URL(image_URL);
thumb_d = Drawable.createFromStream(thumb_u.openStream(),
"src");
image.setImageDrawable(thumb_d);
} catch (Exception e) {
Toast.makeText(this, "Error", Toast.LENGTH_SHORT).show();
}
}
Where have I gone wrong ? Hope I will get some suggestions.
TIA.