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
b2b81a0f
Commit
b2b81a0f
authored
Aug 25, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close status panel when hiding sidebar
parent
624934ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+10
-0
SidebarMainFragment.java
.../rocket/android/fragment/sidebar/SidebarMainFragment.java
+7
-3
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
b2b81a0f
...
...
@@ -3,6 +3,7 @@ package chat.rocket.android.activity;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.design.widget.Snackbar
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.support.v7.graphics.drawable.DrawerArrowDrawable
;
import
android.support.v7.widget.Toolbar
;
...
...
@@ -107,6 +108,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override
public
void
onPanelClosed
(
View
panel
)
{
drawerArrowDrawable
.
setVerticalMirror
(
false
);
closeUserActionContainer
();
}
});
}
...
...
@@ -161,6 +163,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
.
commit
();
}
private
void
closeUserActionContainer
()
{
SidebarMainFragment
sidebarFragment
=
(
SidebarMainFragment
)
getSupportFragmentManager
()
.
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
if
(
sidebarFragment
!=
null
)
{
sidebarFragment
.
closeUserActionContainer
();
}
}
@Override
protected
void
onRoomIdUpdated
()
{
super
.
onRoomIdUpdated
();
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/SidebarMainFragment.java
View file @
b2b81a0f
...
...
@@ -166,12 +166,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
RxCompoundButton
.
checkedChanges
(
toggleUserAction
)
.
compose
(
bindToLifecycle
())
.
subscribe
(
aBoolean
->
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
.
setVisibility
(
aBoolean
?
View
.
VISIBLE
:
View
.
GONE
),
this
::
showUserActionContainer
,
Logger:
:
report
);
}
private
void
showUserActionContainer
(
boolean
show
)
{
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
.
setVisibility
(
show
?
View
.
VISIBLE
:
View
.
GONE
);
}
@Override
public
void
showScreen
()
{
rootView
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -256,7 +260,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
});
}
p
rivate
void
closeUserActionContainer
()
{
p
ublic
void
closeUserActionContainer
()
{
final
CompoundButton
toggleUserAction
=
rootView
.
findViewById
(
R
.
id
.
toggle_user_action
);
if
(
toggleUserAction
!=
null
&&
toggleUserAction
.
isChecked
())
{
toggleUserAction
.
setChecked
(
false
);
...
...
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