Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
e09068ec
Commit
e09068ec
authored
Feb 03, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add message actions popup menu
parent
2c9576af
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
1 deletion
+40
-1
ChatRoomAdapter.kt
...n/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
+7
-1
message_actions.xml
app/src/main/res/menu/message_actions.xml
+19
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+7
-0
strings.xml
app/src/main/res/values/strings.xml
+7
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
View file @
e09068ec
...
@@ -5,6 +5,7 @@ import android.text.method.LinkMovementMethod
...
@@ -5,6 +5,7 @@ import android.text.method.LinkMovementMethod
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.ImageView
import
android.widget.PopupMenu
import
android.widget.TextView
import
android.widget.TextView
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.viewmodel.AttachmentType
import
chat.rocket.android.chatroom.viewmodel.AttachmentType
...
@@ -13,7 +14,6 @@ import chat.rocket.android.player.PlayerActivity
...
@@ -13,7 +14,6 @@ import chat.rocket.android.player.PlayerActivity
import
chat.rocket.android.util.content
import
chat.rocket.android.util.content
import
chat.rocket.android.util.inflate
import
chat.rocket.android.util.inflate
import
chat.rocket.android.util.setVisible
import
chat.rocket.android.util.setVisible
import
chat.rocket.android.util.textContent
import
chat.rocket.common.util.ifNull
import
chat.rocket.common.util.ifNull
import
com.facebook.drawee.view.SimpleDraweeView
import
com.facebook.drawee.view.SimpleDraweeView
import
com.stfalcon.frescoimageviewer.ImageViewer
import
com.stfalcon.frescoimageviewer.ImageViewer
...
@@ -73,6 +73,12 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
...
@@ -73,6 +73,12 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
bindAttachment
(
message
,
message_attachment
,
image_attachment
,
audio_video_attachment
,
bindAttachment
(
message
,
message_attachment
,
image_attachment
,
audio_video_attachment
,
file_name
)
file_name
)
itemView
.
setOnClickListener
{
val
popup
=
PopupMenu
(
it
.
context
,
it
)
popup
.
menuInflater
.
inflate
(
R
.
menu
.
message_actions
,
popup
.
menu
)
popup
.
show
()
}
}
}
private
fun
bindAttachment
(
message
:
MessageViewModel
,
private
fun
bindAttachment
(
message
:
MessageViewModel
,
...
...
app/src/main/res/menu/message_actions.xml
0 → 100644
View file @
e09068ec
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--<item-->
<!--android:id="@+id/action_menu_msg_reply"-->
<!--android:title="@string/action_msg_reply" />-->
<!--<item-->
<!--android:id="@+id/action_menu_msg_edit"-->
<!--android:title="@string/action_msg_edit" />-->
<!--<item-->
<!--android:id="@+id/action_menu_msg_copy"-->
<!--android:title="@string/action_msg_copy" />-->
<!--<item-->
<!--android:id="@+id/action_menu_msg_quote"-->
<!--android:title="@string/action_msg_quote" />-->
<item
android:id=
"@+id/action_menu_msg_delete"
android:title=
"@string/action_msg_delete"
/>
</menu>
\ No newline at end of file
app/src/main/res/values-pt-rBR/strings.xml
View file @
e09068ec
...
@@ -50,4 +50,11 @@
...
@@ -50,4 +50,11 @@
<string
name=
"message_welcome"
>
Bem-vindo, %s
</string>
<string
name=
"message_welcome"
>
Bem-vindo, %s
</string>
<string
name=
"message_removed"
>
Mensagem removida
</string>
<string
name=
"message_removed"
>
Mensagem removida
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Responder
</string>
<string
name=
"action_msg_edit"
>
Editar
</string>
<string
name=
"action_msg_copy"
>
Copiar
</string>
<string
name=
"action_msg_quote"
>
Citar
</string>
<string
name=
"action_msg_delete"
>
Remover
</string>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
e09068ec
...
@@ -52,4 +52,11 @@
...
@@ -52,4 +52,11 @@
<string
name=
"message_welcome"
>
Welcome %s
</string>
<string
name=
"message_welcome"
>
Welcome %s
</string>
<string
name=
"message_removed"
>
Message removed
</string>
<string
name=
"message_removed"
>
Message removed
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Reply
</string>
<string
name=
"action_msg_edit"
>
Edit
</string>
<string
name=
"action_msg_copy"
>
Copy
</string>
<string
name=
"action_msg_quote"
>
Quote
</string>
<string
name=
"action_msg_delete"
>
Delete
</string>
</resources>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment