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
ceb4d34f
Commit
ceb4d34f
authored
Nov 25, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the behavior of back-press on SlidingPane is opened.
parent
6c21d19c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+7
-3
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
ceb4d34f
...
...
@@ -49,12 +49,14 @@ public class MainActivity extends AbstractAuthedActivity {
}
}
private
void
closeSidebarIfNeeded
()
{
private
boolean
closeSidebarIfNeeded
()
{
// REMARK: Tablet UI doesn't have SlidingPane!
SlidingPaneLayout
pane
=
(
SlidingPaneLayout
)
findViewById
(
R
.
id
.
sliding_pane
);
if
(
pane
!=
null
)
{
if
(
pane
!=
null
&&
pane
.
isOpen
()
)
{
pane
.
closePane
();
return
true
;
}
return
false
;
}
@DebugLog
...
...
@@ -105,5 +107,7 @@ public class MainActivity extends AbstractAuthedActivity {
}
}
@Override
protected
boolean
onBackPress
()
{
return
closeSidebarIfNeeded
()
||
super
.
onBackPress
();
}
}
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