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
a517d5bb
Commit
a517d5bb
authored
Jan 02, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add animations.
parent
b5e6e327
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
WebViewActivity.kt
.../main/java/chat/rocket/android/webview/WebViewActivity.kt
+8
-2
hold.xml
app/src/main/res/anim/hold.xml
+7
-0
slide_down.xml
app/src/main/res/anim/slide_down.xml
+7
-0
slide_up.xml
app/src/main/res/anim/slide_up.xml
+7
-0
No files found.
app/src/main/java/chat/rocket/android/webview/WebViewActivity.kt
View file @
a517d5bb
...
@@ -5,6 +5,7 @@ import android.content.Context
...
@@ -5,6 +5,7 @@ import android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.webkit.WebView
import
android.webkit.WebViewClient
import
android.webkit.WebViewClient
import
chat.rocket.android.R
import
chat.rocket.android.R
import
kotlinx.android.synthetic.main.activity_web_view.*
import
kotlinx.android.synthetic.main.activity_web_view.*
...
@@ -40,7 +41,7 @@ class WebViewActivity : AppCompatActivity() {
...
@@ -40,7 +41,7 @@ class WebViewActivity : AppCompatActivity() {
if
(
web_view
.
canGoBack
())
{
if
(
web_view
.
canGoBack
())
{
web_view
.
goBack
()
web_view
.
goBack
()
}
else
{
}
else
{
super
.
onBackPressed
()
finishActivity
()
}
}
}
}
...
@@ -48,7 +49,7 @@ class WebViewActivity : AppCompatActivity() {
...
@@ -48,7 +49,7 @@ class WebViewActivity : AppCompatActivity() {
toolbar
.
title
=
getString
(
R
.
string
.
title_legal_terms
)
toolbar
.
title
=
getString
(
R
.
string
.
title_legal_terms
)
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_close_white_24dp
)
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_close_white_24dp
)
toolbar
.
setNavigationOnClickListener
{
toolbar
.
setNavigationOnClickListener
{
finish
()
finish
Activity
()
}
}
}
}
...
@@ -58,4 +59,9 @@ class WebViewActivity : AppCompatActivity() {
...
@@ -58,4 +59,9 @@ class WebViewActivity : AppCompatActivity() {
web_view
.
webViewClient
=
WebViewClient
()
web_view
.
webViewClient
=
WebViewClient
()
web_view
.
loadUrl
(
webPageUrl
)
web_view
.
loadUrl
(
webPageUrl
)
}
}
private
fun
finishActivity
()
{
super
.
onBackPressed
()
overridePendingTransition
(
R
.
anim
.
hold
,
R
.
anim
.
slide_down
)
}
}
}
\ No newline at end of file
app/src/main/res/anim/hold.xml
0 → 100644
View file @
a517d5bb
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"800"
android:fromYDelta=
"0.0%p"
android:toYDelta=
"0.0%p"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_down.xml
0 → 100644
View file @
a517d5bb
<?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=
"350"
android:fromYDelta=
"0.0%"
android:toYDelta=
"100.0%"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_up.xml
0 → 100644
View file @
a517d5bb
<?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=
"350"
android:fromYDelta=
"100.0%"
android:toYDelta=
"0.0%"
/>
</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