diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-11 20:48:15 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-11 20:48:15 +0100 |
commit | 6e386623bf248c658bbb4ad8ae30c18724213072 (patch) | |
tree | 332f12765509c8333eb76562c54012232ed154e9 /src/main | |
parent | 6b90375f671367c32aa047839619e3e7f40cfd21 (diff) |
increase map preview size
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) { |