register context menu long click listener on message text. fixes #1614

This commit is contained in:
Daniel Gultsch 2015-12-27 17:28:42 +01:00
parent be91c0741f
commit f49158a44b

View File

@ -38,7 +38,6 @@ import java.util.regex.Matcher;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession;
import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.DownloadableFile; import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.Message;
@ -348,6 +347,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody.setLinkTextColor(this.getMessageTextColor(darkBackground, true)); viewHolder.messageBody.setLinkTextColor(this.getMessageTextColor(darkBackground, true));
viewHolder.messageBody.setHighlightColor(activity.getResources().getColor(darkBackground ? R.color.grey800 : R.color.grey500)); viewHolder.messageBody.setHighlightColor(activity.getResources().getColor(darkBackground ? R.color.grey800 : R.color.grey500));
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL); viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
viewHolder.messageBody.setOnLongClickListener(openContextMenu);
} }
private void displayDownloadableMessage(ViewHolder viewHolder, private void displayDownloadableMessage(ViewHolder viewHolder,