diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-06-02 21:27:40 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-06-02 21:27:40 +0200 |
commit | 5b6140dc645200fbc4d63c65cb8c28e824b2b6d0 (patch) | |
tree | fbe5c4a0cc6d495299e06628c6ce3b05d3a922b2 /src/eu/siacs/conversations | |
parent | 236453295c7016473a34526e7230c57135331e9d (diff) |
long press on images revails share with intent
Diffstat (limited to 'src/eu/siacs/conversations')
-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 def76b90..b51d8e0a 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 |