Adjust screen transitions (#8707)

* Fade transition between main navigation tabs
* Shared axis X between screen stacks

Activity transition is using a "close enough" shared axis X xml animation
This commit is contained in:
Ivan Iskandar
2022-12-10 05:23:00 +07:00
committed by GitHub
parent d97eab0328
commit 82a3a98a5a
17 changed files with 151 additions and 62 deletions
@@ -30,6 +30,7 @@ class WebViewActivity : BaseActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
overridePendingTransition(R.anim.shared_axis_x_push_enter, R.anim.shared_axis_x_push_exit)
super.onCreate(savedInstanceState)
if (!WebViewUtil.supportsWebView(this)) {
@@ -58,6 +59,11 @@ class WebViewActivity : BaseActivity() {
}
}
override fun finish() {
super.finish()
overridePendingTransition(R.anim.shared_axis_x_pop_enter, R.anim.shared_axis_x_pop_exit)
}
private fun shareWebpage(url: String) {
try {
startActivity(url.toUri().toShareIntent(this, type = "text/plain"))