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
1d95a892
Commit
1d95a892
authored
Dec 14, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MessageFragment.kt
parent
1671adf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
MessageFragment.kt
.../java/chat/rocket/android/app/chatroom/MessageFragment.kt
+20
-6
No files found.
app/src/main/java/chat/rocket/android/app/chatroom/MessageFragment.kt
View file @
1d95a892
...
...
@@ -22,17 +22,31 @@ class MessageFragment : Fragment() {
// This is just a sample showing 2 messages in the chat room. We need to get it rid in a real word. REMARK: remove this comment and this method.
private
fun
createDumpData
():
List
<
Message
>
{
val
user1
=
User
(
"1"
,
"Filipe Brito"
,
"filipe.brito"
,
"online"
,
"https://open.rocket.chat/avatar/filipe.brito"
)
val
user2
=
User
(
"2"
,
"Lucio Maciel"
,
"Lucio Maciel"
,
"busy"
,
"https://open.rocket.chat/avatar/lucio.maciel"
)
val
user1
=
User
(
"1"
,
"Filipe Brito"
,
"filipe.brito"
,
"online"
,
"https://open.rocket.chat/avatar/filipe.brito"
)
val
user2
=
User
(
"2"
,
"Lucio Maciel"
,
"Lucio Maciel"
,
"busy"
,
"https://open.rocket.chat/avatar/lucio.maciel"
)
val
message1
=
Message
(
user1
,
"This is a multiline chat message from Bertie that will take more than just one line of text. I have sure that everything is amazing!"
,
LocalDateTime
.
now
())
val
message2
=
Message
(
user2
,
"Great!"
,
LocalDateTime
.
now
().
plusHours
(
1
))
val
message1
=
Message
(
user1
,
"This is a multiline chat message from Bertie that will take more than just one line of text. I have sure that everything is amazing!"
,
"https://rocket.chat/images/index/community.svg"
,
LocalDateTime
.
now
())
val
message2
=
Message
(
user2
,
"Great!"
,
"https://rocket.chat/images/index/screenshot.png"
,
LocalDateTime
.
now
().
plusHours
(
1
))
return
listOf
(
message1
,
message2
)
}
// REMARK: The presenter should call this method.
private
fun
showMessageList
(
dataSet
:
List
<
Message
>)
{
recycler_view
.
layoutManager
=
LinearLayoutManager
(
activity
.
applicationContext
,
LinearLayoutManager
.
VERTICAL
,
false
)
recycler_view
.
adapter
=
MessageListAdapter
(
dataSet
.
toMutableList
())
val
context
=
activity
recycler_view
.
layoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
VERTICAL
,
false
)
recycler_view
.
adapter
=
MessageListAdapter
(
activity
,
dataSet
.
toMutableList
())
}
}
\ 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