Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b6f32a03
authored
Apr 06, 2018
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Added bottom scroll in chat screen.
parent
57deba6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
app/src/main/java/com/vsoft/servicenow/ui/ChatActivity.java
app/src/main/java/com/vsoft/servicenow/ui/ChatActivity.java
View file @
b6f32a03
...
...
@@ -111,15 +111,6 @@ public class ChatActivity extends HandleNotificationActivity implements OnDSList
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
List
<
ChatBotHistory
>
chatBotHistoryList
=
ChatBotHistoryManager
.
getAllChatBotHistory
();
for
(
int
i
=
0
;
i
<
chatBotHistoryList
.
size
();
i
++)
{
ChatBotHistory
chatBotHistory
=
chatBotHistoryList
.
get
(
i
);
mMessages
.
add
(
new
Message
.
Builder
(
Message
.
TYPE_MESSAGE
)
.
username
(
chatBotHistory
.
getUserName
()).
message
(
chatBotHistory
.
getMessage
()).
build
());
}
mAdapter
=
new
MessageAdapter
(
this
,
mMessages
);
CatalogueApplication
app
=
(
CatalogueApplication
)
getApplication
();
mSocket
=
app
.
getSocket
();
mSocket
.
on
(
Socket
.
EVENT_CONNECT
,
onConnect
);
...
...
@@ -138,7 +129,17 @@ public class ChatActivity extends HandleNotificationActivity implements OnDSList
mMessagesView
=
(
RecyclerView
)
findViewById
(
R
.
id
.
messages
);
mMessagesView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
List
<
ChatBotHistory
>
chatBotHistoryList
=
ChatBotHistoryManager
.
getAllChatBotHistory
();
for
(
int
i
=
0
;
i
<
chatBotHistoryList
.
size
();
i
++)
{
ChatBotHistory
chatBotHistory
=
chatBotHistoryList
.
get
(
i
);
mMessages
.
add
(
new
Message
.
Builder
(
Message
.
TYPE_MESSAGE
)
.
username
(
chatBotHistory
.
getUserName
()).
message
(
chatBotHistory
.
getMessage
()).
build
());
}
mAdapter
=
new
MessageAdapter
(
this
,
mMessages
);
mMessagesView
.
setAdapter
(
mAdapter
);
scrollToBottom
();
mInputMessageView
=
(
EditText
)
findViewById
(
R
.
id
.
message_input
);
mInputMessageView
.
setOnEditorActionListener
(
new
TextView
.
OnEditorActionListener
()
{
...
...
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