diff --git a/core/src/main/java/org/futo/circles/core/base/fragment/BaseFullscreenDialogFragment.kt b/core/src/main/java/org/futo/circles/core/base/fragment/BaseFullscreenDialogFragment.kt index 9019e7d4e3e7a25cd45303ace473fa2640c027a2..d744f45575062dd8ccaf57e956ba24836882e1e4 100644 --- a/core/src/main/java/org/futo/circles/core/base/fragment/BaseFullscreenDialogFragment.kt +++ b/core/src/main/java/org/futo/circles/core/base/fragment/BaseFullscreenDialogFragment.kt @@ -9,8 +9,8 @@ import android.view.WindowManager import androidx.appcompat.app.AppCompatDialogFragment import androidx.viewbinding.ViewBinding import com.google.android.material.appbar.MaterialToolbar -import org.futo.circles.core.base.NoInternetConnectionViewPresenter import org.futo.circles.core.R +import org.futo.circles.core.base.NoInternetConnectionViewPresenter import org.futo.circles.core.extensions.onBackPressed @@ -32,6 +32,7 @@ abstract class BaseFullscreenDialogFragment( ): View? { _binding = inflate.invoke(inflater, container, false) dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN) + dialog?.window?.attributes?.windowAnimations = R.style.DialogSlideAnimation return _binding?.root } diff --git a/core/src/main/res/anim/alpha_show.xml b/core/src/main/res/anim/alpha_show.xml new file mode 100644 index 0000000000000000000000000000000000000000..8731e7dbc74d84f18bb17c413f05df5b24f632a5 --- /dev/null +++ b/core/src/main/res/anim/alpha_show.xml @@ -0,0 +1,8 @@ +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:shareInterpolator="false"> + <alpha + android:duration="@android:integer/config_shortAnimTime" + android:fromAlpha="0" + android:interpolator="@android:anim/linear_interpolator" + android:toAlpha="1" /> +</set> \ No newline at end of file diff --git a/core/src/main/res/anim/slide_out.xml b/core/src/main/res/anim/slide_out.xml new file mode 100644 index 0000000000000000000000000000000000000000..092cb1ecedd047e38bf2f809ae3523776688a4f5 --- /dev/null +++ b/core/src/main/res/anim/slide_out.xml @@ -0,0 +1,8 @@ +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:shareInterpolator="false"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="0%" + android:interpolator="@android:anim/linear_interpolator" + android:toXDelta="100%" /> +</set> \ No newline at end of file diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index 5fa6d0b130729f2b23b3bd1ec6d48bef3c955eab..abbec47bfc87fc89001c3a34d38596c4837accc3 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -91,4 +91,9 @@ <item name="android:paddingTop">8dp</item> </style> + <style name="DialogSlideAnimation"> + <item name="android:windowEnterAnimation">@anim/alpha_show</item> + <item name="android:windowExitAnimation">@anim/slide_out</item> + </style> + </resources> \ No newline at end of file