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
7c2fa9dc
Commit
7c2fa9dc
authored
May 21, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hardware menu button fixed in chat screen #456
parent
92489a7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+20
-0
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
7c2fa9dc
...
...
@@ -15,6 +15,7 @@ import android.text.TextWatcher;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.Menu
;
import
android.view.MenuInflater
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -131,6 +132,8 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
}
});
setHasOptionsMenu
(
true
);
AccountPainter
accountPainter
=
new
AccountPainter
(
getActivity
());
toolbar
.
setBackgroundColor
(
accountPainter
.
getAccountMainColor
(
account
));
...
...
@@ -326,6 +329,23 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
updateChat
();
}
/**
* This method used for hardware menu button
*/
@Override
public
void
onCreateOptionsMenu
(
Menu
menu
,
MenuInflater
inflater
)
{
inflater
.
inflate
(
R
.
menu
.
chat
,
menu
);
setUpOptionsMenu
(
menu
);
}
/**
* This method used for hardware menu button
*/
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
return
onMenuItemClick
(
item
);
}
private
void
setUpOptionsMenu
(
Menu
menu
)
{
AbstractChat
abstractChat
=
MessageManager
.
getInstance
().
getChat
(
account
,
user
);
...
...
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