You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@OverridefinalpublicvoidcheckForMapbook() {
mPath = mFileManager.fileExists();
if (mPath != null){
loadMapbook(newDataManagerCallbacks.MapbookCallback() {
/** * If successfully loaded, populate view * @param mobileMapPackage - MobileMapPackage */@OverridefinalpublicvoidonMapbookLoaded(finalMobileMapPackagemobileMapPackage) {
finalList<ArcGISMap> maps = mobileMapPackage.getMaps();
mView.setMaps(maps);
finalItemitem = mobileMapPackage.getItem();
mView.populateMapbookLayout(item);
// Get the file size and datefinallongmapbookSize = mFileManager.getSize();
finallongmapbookModified = mFileManager.getModifiedDate();
mView.setMapbookMetatdata(mapbookSize, mapbookModified, maps.size());
finalbyte[] thumbnailData = item.getThumbnailData();
if (thumbnailData != null && thumbnailData.length > 0) {
mView.setThumbnailBitmap(thumbnailData);
}else{
finalListenableFuture<byte[]> futureThumbnail = item.fetchThumbnailAsync();
futureThumbnail.addDoneListener(newRunnable() {
@Overridepublicvoidrun() {
try {
finalbyte[] itemThumbnailData = futureThumbnail.get();
mView.setThumbnailBitmap(itemThumbnailData);
} catch (finalExceptione) {
Log.e(TAG,e.getMessage());
mView.showMessage("There were problems obtaining thumbnail images for maps in mapbook.");
}
}
});
}
}
/** * If the mapbook fails to load, show a message * @param error - Throwable */@OverridefinalpublicvoidonMapbookNotLoaded(finalThrowableerror) {
Log.e(TAG, "Problem loading map book " + error.getMessage());
mView.showMapbookNotFound();
mView.showMessage("There was a problem loading the mapbook");
}
});
Was thinking the presenter can determine which string resource to provide and the view handles loading the resource. Have to think about this a bit more so we can handle this through a separate issue if we want to dig deeper.
The text was updated successfully, but these errors were encountered:
Was thinking the presenter can determine which string resource to provide and the view handles loading the resource. Have to think about this a bit more so we can handle this through a separate issue if we want to dig deeper.
The text was updated successfully, but these errors were encountered: