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
1e4d95a0
Commit
1e4d95a0
authored
Sep 04, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update RoomFragment.java
parent
db7f265f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
1 deletion
+47
-1
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+47
-1
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
1e4d95a0
...
...
@@ -21,6 +21,8 @@ import android.support.v7.widget.LinearLayoutManager;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
chat.rocket.android.fragment.sidebar.SidebarMainFragment
;
import
chat.rocket.android.widget.RoomToolbar
;
import
chat.rocket.core.models.User
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
...
...
@@ -125,6 +127,8 @@ public class RoomFragment extends AbstractChatRoomFragment implements
private
Message
edittingMessage
=
null
;
private
SlidingPaneLayout
pane
;
public
RoomFragment
()
{}
/**
...
...
@@ -189,6 +193,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
@Override
protected
void
onSetupView
()
{
pane
=
getActivity
().
findViewById
(
R
.
id
.
sliding_pane
);
messageRecyclerView
=
rootView
.
findViewById
(
R
.
id
.
messageRecyclerView
);
messageListAdapter
=
new
MessageListAdapter
(
getContext
(),
hostname
);
...
...
@@ -235,6 +240,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
};
setupSidebar
();
setupSideMenu
();
setupMessageComposer
();
setupMessageActions
();
...
...
@@ -305,7 +311,6 @@ public class RoomFragment extends AbstractChatRoomFragment implements
});
DrawerLayout
drawerLayout
=
rootView
.
findViewById
(
R
.
id
.
drawer_layout
);
SlidingPaneLayout
pane
=
getActivity
().
findViewById
(
R
.
id
.
sliding_pane
);
if
(
drawerLayout
!=
null
&&
pane
!=
null
)
{
compositeDisposable
.
add
(
RxDrawerLayout
.
drawerOpen
(
drawerLayout
,
GravityCompat
.
END
)
.
compose
(
bindToLifecycle
())
...
...
@@ -325,6 +330,47 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
}
private
void
setupSidebar
()
{
SlidingPaneLayout
subPane
=
getActivity
().
findViewById
(
R
.
id
.
sub_sliding_pane
);
RoomToolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
activity_main_toolbar
);
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
@Override
public
void
onPanelSlide
(
View
view
,
float
v
)
{
messageFormManager
.
enableComposingText
(
false
);
//Ref: ActionBarDrawerToggle#setProgress
toolbar
.
setNavigationIconProgress
(
v
);
}
@Override
public
void
onPanelOpened
(
View
view
)
{
toolbar
.
setNavigationIconVerticalMirror
(
true
);
}
@Override
public
void
onPanelClosed
(
View
view
)
{
messageFormManager
.
enableComposingText
(
true
);
toolbar
.
setNavigationIconVerticalMirror
(
false
);
subPane
.
closePane
();
closeUserActionContainer
();
}
});
toolbar
.
setNavigationOnClickListener
(
view
->
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
pane
.
openPane
();
}
});
}
public
void
closeUserActionContainer
()
{
SidebarMainFragment
sidebarFragment
=
(
SidebarMainFragment
)
getActivity
().
getSupportFragmentManager
()
.
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
if
(
sidebarFragment
!=
null
)
{
sidebarFragment
.
closeUserActionContainer
();
}
}
private
boolean
closeSideMenuIfNeeded
()
{
DrawerLayout
drawerLayout
=
rootView
.
findViewById
(
R
.
id
.
drawer_layout
);
if
(
drawerLayout
!=
null
&&
drawerLayout
.
isDrawerOpen
(
GravityCompat
.
END
))
{
...
...
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