Fixed bug with MapFragment sets image in wrong thread.
This commit is contained in:
parent
0bdb0ba7ac
commit
238b886ea6
1 changed files with 9 additions and 3 deletions
|
@ -78,10 +78,16 @@ public class DashMapFragment extends DashBaseFragment implements IMapDownloaderC
|
|||
if (view == null) {
|
||||
return;
|
||||
}
|
||||
Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
|
||||
ImageView map = (ImageView) view.findViewById(R.id.map_image);
|
||||
final Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
|
||||
final ImageView map = (ImageView) view.findViewById(R.id.map_image);
|
||||
if (image != null) {
|
||||
map.setImageBitmap(image);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
map.setImageBitmap(image);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue