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
67c5a4cf
Commit
67c5a4cf
authored
Sep 11, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update RoomFragment.java
parent
ae42f7ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+38
-7
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
67c5a4cf
...
...
@@ -19,6 +19,8 @@ import android.support.v4.widget.SlidingPaneLayout;
import
android.support.v7.app.AlertDialog
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.Menu
;
import
android.view.MenuInflater
;
import
android.view.View
;
import
chat.rocket.android.fragment.sidebar.SidebarMainFragment
;
...
...
@@ -127,6 +129,8 @@ public class RoomFragment extends AbstractChatRoomFragment implements
private
Message
edittingMessage
=
null
;
private
RoomToolbar
toolbar
;
private
SlidingPaneLayout
pane
;
private
SidebarMainFragment
sidebarFragment
;
...
...
@@ -149,6 +153,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setHasOptionsMenu
(
true
);
Bundle
args
=
getArguments
();
hostname
=
args
.
getString
(
HOSTNAME
);
...
...
@@ -241,6 +246,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
};
setupToolbar
();
setupSidebar
();
setupSideMenu
();
setupMessageComposer
();
...
...
@@ -331,9 +337,40 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
}
private
void
setupToolbar
()
{
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
activity_main_toolbar
);
toolbar
.
getMenu
().
clear
();
toolbar
.
inflateMenu
(
R
.
menu
.
menu_room
);
toolbar
.
setNavigationOnClickListener
(
view
->
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
pane
.
openPane
();
}
});
toolbar
.
setOnMenuItemClickListener
(
menuItem
->
{
switch
(
menuItem
.
getItemId
())
{
case
R
.
id
.
action_pinned_messages
:
// TODO
break
;
case
R
.
id
.
action_favorite_messages
:
// TODO
break
;
case
R
.
id
.
action_file_list
:
// TODO
break
;
case
R
.
id
.
action_member_list
:
// TODO
break
;
default
:
return
super
.
onOptionsItemSelected
(
menuItem
);
}
return
true
;
});
}
private
void
setupSidebar
()
{
SlidingPaneLayout
subPane
=
getActivity
().
findViewById
(
R
.
id
.
sub_sliding_pane
);
RoomToolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
activity_main_toolbar
);
sidebarFragment
=
(
SidebarMainFragment
)
getActivity
().
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
...
...
@@ -358,12 +395,6 @@ public class RoomFragment extends AbstractChatRoomFragment implements
closeUserActionContainer
();
}
});
toolbar
.
setNavigationOnClickListener
(
view
->
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
pane
.
openPane
();
}
});
}
public
void
closeUserActionContainer
()
{
...
...
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