diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 13 | ||||
-rw-r--r-- | src/main/res/layout/message_received.xml | 3 | ||||
-rw-r--r-- | src/main/res/layout/message_sent.xml | 3 |
3 files changed, 6 insertions, 13 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 258cbba07..b53622984 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -82,14 +82,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { private OnContactPictureClicked mOnContactPictureClickedListener; private OnContactPictureLongClicked mOnContactPictureLongClickedListener; - private OnLongClickListener openContextMenu = new OnLongClickListener() { - - @Override - public boolean onLongClick(View v) { - v.showContextMenu(); - return true; - } - }; private boolean mIndicateReceived = false; private HashMap<Integer, AudioWife> audioPlayer; private boolean mUseWhiteBackground = false; @@ -381,7 +373,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { viewHolder.messageBody.setLinkTextColor(this.getMessageTextColor(darkBackground, true)); viewHolder.messageBody.setHighlightColor(activity.getResources().getColor(darkBackground ? R.color.grey800 : R.color.grey500)); viewHolder.messageBody.setTypeface(null, Typeface.NORMAL); - viewHolder.messageBody.setOnLongClickListener(openContextMenu); } private void displayDownloadableMessage(ViewHolder viewHolder, final Message message, String text) { @@ -398,7 +389,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { activity.startDownloadable(message); } }); - viewHolder.download_button.setOnLongClickListener(openContextMenu); } private void displayAudioMessage(ViewHolder viewHolder, final Message message, int position) { @@ -451,7 +441,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { openDownloadable(message); } }); - viewHolder.download_button.setOnLongClickListener(openContextMenu); } private void displayLocationMessage(ViewHolder viewHolder, final Message message) { @@ -475,7 +464,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { showLocation(message); } }); - viewHolder.download_button.setOnLongClickListener(openContextMenu); } private void displayImageMessage(ViewHolder viewHolder, @@ -514,7 +502,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { openDownloadable(message); } }); - viewHolder.image.setOnLongClickListener(openContextMenu); } private void loadMoreMessages(Conversation conversation) { diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml index 2f47dabb4..155a2bbc2 100644 --- a/src/main/res/layout/message_received.xml +++ b/src/main/res/layout/message_received.xml @@ -52,6 +52,7 @@ app:riv_border_color="@color/black12" app:riv_corner_radius="5dp" android:scaleType="centerCrop" + android:longClickable="true" android:maxHeight="400dp" android:maxWidth="400dp" /> @@ -61,6 +62,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:autoLink="web" + android:longClickable="true" android:textColorLink="@color/dark" android:textColor="@color/dark" android:textColorHighlight="@color/grey800" @@ -70,6 +72,7 @@ android:id="@+id/download_button" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:longClickable="true" android:visibility="gone" /> <RelativeLayout diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml index 6db84df96..7dcf0932b 100644 --- a/src/main/res/layout/message_sent.xml +++ b/src/main/res/layout/message_sent.xml @@ -49,6 +49,7 @@ android:layout_marginTop="8dp" android:layout_marginBottom="4dp" android:adjustViewBounds="true" + android:longClickable="true" app:riv_border_width="1dp" app:riv_border_color="@color/black12" app:riv_corner_radius="5dp" @@ -62,6 +63,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:autoLink="web" + android:longClickable="true" android:textColorLink="@color/black54" android:textColor="@color/black54" android:textColorHighlight="@color/grey500" @@ -71,6 +73,7 @@ android:id="@+id/download_button" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:longClickable="true" android:visibility="gone" /> <RelativeLayout |