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
d0dadb24
Commit
d0dadb24
authored
Sep 11, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close use action container on sidebar panel close
parent
c19f139e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+9
-1
SidebarMainFragment.java
.../rocket/android/fragment/sidebar/SidebarMainFragment.java
+6
-1
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
d0dadb24
...
@@ -4,6 +4,7 @@ import android.content.Intent;
...
@@ -4,6 +4,7 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.annotation.Nullable
;
import
android.support.design.widget.Snackbar
;
import
android.support.design.widget.Snackbar
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
...
@@ -101,6 +102,13 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
...
@@ -101,6 +102,13 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override
@Override
public
void
onPanelClosed
(
View
view
)
{
public
void
onPanelClosed
(
View
view
)
{
toolbar
.
setNavigationIconVerticalMirror
(
false
);
toolbar
.
setNavigationIconVerticalMirror
(
false
);
Fragment
fragment
=
getSupportFragmentManager
()
.
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
if
(
fragment
!=
null
&&
fragment
instanceof
SidebarMainFragment
)
{
SidebarMainFragment
sidebarMainFragment
=
(
SidebarMainFragment
)
fragment
;
sidebarMainFragment
.
toggleUserActionContainer
(
false
);
sidebarMainFragment
.
showUserActionContainer
(
false
);
}
}
}
});
});
...
@@ -158,6 +166,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
...
@@ -158,6 +166,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
}
}
private
void
updateSidebarMainFragment
()
{
private
void
updateSidebarMainFragment
()
{
closeSidebarIfNeeded
();
getSupportFragmentManager
().
beginTransaction
()
getSupportFragmentManager
().
beginTransaction
()
.
replace
(
R
.
id
.
sidebar_fragment_container
,
SidebarMainFragment
.
create
(
hostname
))
.
replace
(
R
.
id
.
sidebar_fragment_container
,
SidebarMainFragment
.
create
(
hostname
))
.
commit
();
.
commit
();
...
@@ -264,7 +273,6 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
...
@@ -264,7 +273,6 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
private
void
changeServerIfNeeded
(
String
serverHostname
)
{
private
void
changeServerIfNeeded
(
String
serverHostname
)
{
if
(!
hostname
.
equalsIgnoreCase
(
serverHostname
))
{
if
(!
hostname
.
equalsIgnoreCase
(
serverHostname
))
{
closeSidebarIfNeeded
();
RocketChatCache
rocketChatCache
=
new
RocketChatCache
(
getApplicationContext
());
RocketChatCache
rocketChatCache
=
new
RocketChatCache
(
getApplicationContext
());
rocketChatCache
.
setSelectedServerHostname
(
serverHostname
);
rocketChatCache
.
setSelectedServerHostname
(
serverHostname
);
recreate
();
recreate
();
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/SidebarMainFragment.java
View file @
d0dadb24
...
@@ -219,11 +219,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
...
@@ -219,11 +219,16 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
);
);
}
}
p
rivate
void
showUserActionContainer
(
boolean
show
)
{
p
ublic
void
showUserActionContainer
(
boolean
show
)
{
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
.
setVisibility
(
show
?
View
.
VISIBLE
:
View
.
GONE
);
.
setVisibility
(
show
?
View
.
VISIBLE
:
View
.
GONE
);
}
}
public
void
toggleUserActionContainer
(
boolean
checked
)
{
CompoundButton
toggleUserAction
=
rootView
.
findViewById
(
R
.
id
.
toggle_user_action
);
toggleUserAction
.
setChecked
(
checked
);
}
@Override
@Override
public
void
showScreen
()
{
public
void
showScreen
()
{
rootView
.
setVisibility
(
View
.
VISIBLE
);
rootView
.
setVisibility
(
View
.
VISIBLE
);
...
...
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