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
611fe792
Commit
611fe792
authored
Sep 21, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set LoginActivity and AddServerActivity flag to Intent.FLAG_ACTIVITY_SINGLE_TOP
parent
f049544e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-1
LaunchUtil.java
app/src/main/java/chat/rocket/android/LaunchUtil.java
+2
-2
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
611fe792
...
...
@@ -35,7 +35,8 @@
<activity
android:name=
".activity.AddServerActivity"
android:configChanges=
"orientation|screenSize"
android:windowSoftInputMode=
"adjustResize"
/>
android:windowSoftInputMode=
"adjustResize"
android:launchMode=
"singleTop"
/>
<activity
android:name=
".activity.LoginActivity"
...
...
app/src/main/java/chat/rocket/android/LaunchUtil.java
View file @
611fe792
...
...
@@ -26,7 +26,7 @@ public class LaunchUtil {
*/
public
static
void
showAddServerActivity
(
Context
context
)
{
Intent
intent
=
new
Intent
(
context
,
AddServerActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
|
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
context
.
startActivity
(
intent
);
}
...
...
@@ -35,7 +35,7 @@ public class LaunchUtil {
*/
public
static
void
showLoginActivity
(
Context
context
,
String
hostname
)
{
Intent
intent
=
new
Intent
(
context
,
LoginActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
|
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
intent
.
putExtra
(
LoginActivity
.
KEY_HOSTNAME
,
hostname
);
context
.
startActivity
(
intent
);
}
...
...
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
611fe792
...
...
@@ -90,6 +90,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
private
void
showAddServerActivity
()
{
Intent
intent
=
new
Intent
(
this
,
AddServerActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
|
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
intent
.
putExtra
(
AddServerActivity
.
EXTRA_FINISH_ON_BACK_PRESS
,
true
);
startActivity
(
intent
);
}
...
...
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