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
d7286585
Commit
d7286585
authored
Nov 07, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add transition animation when changing servers
parent
ea0eee80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
AbstractAuthedActivity.java
.../chat/rocket/android/activity/AbstractAuthedActivity.java
+5
-1
slide_in.xml
app/src/main/res/anim/slide_in.xml
+10
-0
slide_out.xml
app/src/main/res/anim/slide_out.xml
+9
-0
No files found.
app/src/main/java/chat/rocket/android/activity/AbstractAuthedActivity.java
View file @
d7286585
...
@@ -9,6 +9,7 @@ import com.hadisatrio.optional.Optional;
...
@@ -9,6 +9,7 @@ import com.hadisatrio.optional.Optional;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.LaunchUtil
;
import
chat.rocket.android.LaunchUtil
;
import
chat.rocket.android.R
;
import
chat.rocket.android.RocketChatCache
;
import
chat.rocket.android.RocketChatCache
;
import
chat.rocket.android.helper.Logger
;
import
chat.rocket.android.helper.Logger
;
import
chat.rocket.android.push.PushManager
;
import
chat.rocket.android.push.PushManager
;
...
@@ -104,7 +105,10 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
...
@@ -104,7 +105,10 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
}
}
if
(
assertServerRealmStoreExists
(
newHostname
))
{
if
(
assertServerRealmStoreExists
(
newHostname
))
{
recreate
();
Intent
intent
=
new
Intent
(
this
,
MainActivity
.
class
);
startActivity
(
intent
);
finish
();
overridePendingTransition
(
R
.
anim
.
slide_in
,
R
.
anim
.
slide_out
);
}
else
{
}
else
{
recoverFromHostnameError
();
recoverFromHostnameError
();
}
}
...
...
app/src/main/res/anim/slide_in.xml
0 → 100644
View file @
d7286585
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shareInterpolator=
"true"
android:interpolator=
"@android:anim/decelerate_interpolator"
>
<translate
android:duration=
"@android:integer/config_mediumAnimTime"
android:fromYDelta=
"100%p"
android:toYDelta=
"0"
>
</translate>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_out.xml
0 → 100644
View file @
d7286585
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"@android:integer/config_mediumAnimTime"
android:fromYDelta=
"0%p"
android:toYDelta=
"0"
>
</translate>
</set>
\ No newline at end of file
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