diff options
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationFragment.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index def76b907..b51d8e0aa 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -38,6 +38,7 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; +import android.view.View.OnLongClickListener; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; @@ -331,6 +332,18 @@ public class ConversationFragment extends Fragment { startActivity(intent); } }); + viewHolder.image.setOnLongClickListener(new OnLongClickListener() { + + @Override + public boolean onLongClick(View v) { + Intent shareIntent = new Intent(); + shareIntent.setAction(Intent.ACTION_SEND); + shareIntent.putExtra(Intent.EXTRA_STREAM, ImageProvider.getContentUri(message)); + shareIntent.setType("image/*"); + startActivity(Intent.createChooser(shareIntent, getText(R.string.share_with))); + return true; + } + }); } @Override |