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
5ca73afb
Commit
5ca73afb
authored
Aug 26, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MainActivity.java
parent
4eeeae4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
20 deletions
+1
-20
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+1
-20
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
5ca73afb
...
@@ -5,6 +5,7 @@ import android.support.annotation.Nullable;
...
@@ -5,6 +5,7 @@ import android.support.annotation.Nullable;
import
android.support.design.widget.Snackbar
;
import
android.support.design.widget.Snackbar
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.support.v7.graphics.drawable.DrawerArrowDrawable
;
import
android.support.v7.graphics.drawable.DrawerArrowDrawable
;
import
android.support.v7.widget.Toolbar
;
import
android.view.View
;
import
android.view.View
;
import
chat.rocket.android.LaunchUtil
;
import
chat.rocket.android.LaunchUtil
;
...
@@ -81,31 +82,11 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
...
@@ -81,31 +82,11 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
}
}
});
});
final
DrawerArrowDrawable
drawerArrowDrawable
=
new
DrawerArrowDrawable
(
this
);
toolbar
.
setNavigationIcon
(
drawerArrowDrawable
);
toolbar
.
setNavigationOnClickListener
(
view
->
{
toolbar
.
setNavigationOnClickListener
(
view
->
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
pane
.
openPane
();
pane
.
openPane
();
}
}
});
});
//ref: ActionBarDrawerToggle#setProgress
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
@Override
public
void
onPanelSlide
(
View
panel
,
float
slideOffset
)
{
drawerArrowDrawable
.
setProgress
(
slideOffset
);
}
@Override
public
void
onPanelOpened
(
View
panel
)
{
drawerArrowDrawable
.
setVerticalMirror
(
true
);
}
@Override
public
void
onPanelClosed
(
View
panel
)
{
drawerArrowDrawable
.
setVerticalMirror
(
false
);
}
});
}
}
private
boolean
closeSidebarIfNeeded
()
{
private
boolean
closeSidebarIfNeeded
()
{
...
...
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