diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-07 20:05:45 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-07 20:05:45 +0200 |
commit | 3f403fb8a976f6cc7d135cf1eb6dd6f0789c312a (patch) | |
tree | 69fb1e80e9380b337b775910798870b04c5e4037 /src/eu/siacs/conversations/ui | |
parent | c30bf75a5d77fab21480e04ce18b46d6b2826295 (diff) |
jingle connection and manager. able to trigger dialog in gajim
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index a9bde53d..ab0259e1 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -33,6 +33,7 @@ import android.graphics.Typeface; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; +import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -148,6 +149,8 @@ public class ConversationFragment extends Fragment { public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + final DisplayMetrics metrics = getResources().getDisplayMetrics(); + this.inflater = inflater; final View view = inflater.inflate(R.layout.fragment_conversation, @@ -264,7 +267,7 @@ public class ConversationFragment extends Fragment { } if (item.getType() == Message.TYPE_IMAGE) { viewHolder.image.setVisibility(View.VISIBLE); - viewHolder.image.setImageBitmap(activity.xmppConnectionService.getFileBackend().getImageFromMessage(item)); + viewHolder.image.setImageBitmap(activity.xmppConnectionService.getFileBackend().getThumbnailFromMessage(item,(int) (metrics.density * 288))); viewHolder.messageBody.setVisibility(View.GONE); } else { if (viewHolder.image != null) viewHolder.image.setVisibility(View.GONE); |