Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-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
xabber-android
Commits
5987da76
Commit
5987da76
authored
Apr 24, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewerFragment: toolbar updated correctly on chat update.
parent
b3a7271c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+6
-5
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
5987da76
...
@@ -81,6 +81,8 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
...
@@ -81,6 +81,8 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
private
Animation
shakeAnimation
=
null
;
private
Animation
shakeAnimation
=
null
;
private
int
contextMenuItemPosition
;
private
int
contextMenuItemPosition
;
private
RecyclerView
recyclerView
;
private
RecyclerView
recyclerView
;
private
View
contactTitleView
;
private
AbstractContact
abstractContact
;
public
static
ChatViewerFragment
newInstance
(
String
account
,
String
user
)
{
public
static
ChatViewerFragment
newInstance
(
String
account
,
String
user
)
{
ChatViewerFragment
fragment
=
new
ChatViewerFragment
();
ChatViewerFragment
fragment
=
new
ChatViewerFragment
();
...
@@ -120,11 +122,10 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
...
@@ -120,11 +122,10 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
View
view
=
inflater
.
inflate
(
R
.
layout
.
chat_fragment
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
chat_fragment
,
container
,
false
);
View
contactTitle
=
view
.
findViewById
(
R
.
id
.
contact_title
);
contactTitleView
=
view
.
findViewById
(
R
.
id
.
contact_title
);
final
AbstractContact
abstractContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
user
);
abstractContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
user
);
ContactTitleInflater
.
updateTitle
(
contactTitle
,
getActivity
(),
abstractContact
);
contactTitleView
.
findViewById
(
R
.
id
.
avatar
).
setOnClickListener
(
this
);
contactTitle
.
findViewById
(
R
.
id
.
avatar
).
setOnClickListener
(
this
);
ActionBarPainter
actionBarPainter
=
new
ActionBarPainter
((
ActionBarActivity
)
getActivity
());
ActionBarPainter
actionBarPainter
=
new
ActionBarPainter
((
ActionBarActivity
)
getActivity
());
...
@@ -412,9 +413,9 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
...
@@ -412,9 +413,9 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
}
}
public
void
updateChat
()
{
public
void
updateChat
()
{
ContactTitleInflater
.
updateTitle
(
contactTitleView
,
getActivity
(),
abstractContact
);
chatMessageAdapter
.
onChange
();
chatMessageAdapter
.
onChange
();
recyclerView
.
scrollToPosition
(
chatMessageAdapter
.
getItemCount
()
-
1
);
recyclerView
.
scrollToPosition
(
chatMessageAdapter
.
getItemCount
()
-
1
);
setUpOptionsMenu
(
toolbar
.
getMenu
());
setUpOptionsMenu
(
toolbar
.
getMenu
());
updateSecurityButton
();
updateSecurityButton
();
}
}
...
...
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