diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 5 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/GeoHelper.java | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index e196f4e65..1914df278 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -471,7 +471,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie viewHolder.aw_player.setVisibility(View.GONE); viewHolder.messageBody.setVisibility(View.GONE); String url = GeoHelper.MapPreviewUri(message); - Log.d(Config.LOGTAG, "Map preview = " + url); viewHolder.image.setVisibility(View.VISIBLE); viewHolder.image.setOnClickListener(new OnClickListener() { @@ -483,13 +482,13 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie Glide .with(activity) .load(Uri.parse(url)) + .asBitmap() .diskCacheStrategy(DiskCacheStrategy.ALL) .fitCenter() .placeholder(R.drawable.ic_map_marker_grey600_48dp) .error(R.drawable.ic_map_marker_grey600_48dp) .into(viewHolder.image); - viewHolder.image.getLayoutParams().width = 400; - viewHolder.image.getLayoutParams().height = 400; + viewHolder.image.setMaxWidth(500); viewHolder.image.setAdjustViewBounds(true); viewHolder.download_button.setVisibility(View.GONE); viewHolder.download_button.setText(R.string.show_location); diff --git a/src/main/java/de/pixart/messenger/utils/GeoHelper.java b/src/main/java/de/pixart/messenger/utils/GeoHelper.java index a524c1356..0fe63e095 100644 --- a/src/main/java/de/pixart/messenger/utils/GeoHelper.java +++ b/src/main/java/de/pixart/messenger/utils/GeoHelper.java @@ -39,7 +39,7 @@ public class GeoHelper { } catch (NumberFormatException nfe) { return null; } - return "https://maps.google.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&size=400x400&scale=2&format=jpg&markers=" + latitude + "," + longitude + "&sensor=false"; + return "https://maps.google.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&size=500x500&scale=2&format=jpg&markers=" + latitude + "," + longitude + "&sensor=false"; } public static ArrayList<Intent> createGeoIntentsFromMessage(Message message) { |