AuthUI вставляется снизу

Когда я представляю экран входа Firebase UI/AuthUI, он дает мне анимацию слайд-ина-сбоку, но я хочу анимацию слайд-ина-снизу.

Следуя информации, найденной по адресу: https://github.com/firebase/FirebaseUI-Android/issues/229#issuecomment-310042468 , я все еще не могу заставить это работать. Анимация, показывающая, что швы входа в Firebase не затрагиваются ActivityOptionsCompat.makeCustomAnimation(applicationContext, R.anim.slide_in_bottom, R.anim.slide_out_to_bot) ?

Это код для запуска активности входа:

         fun askSignIn_(askForHighBreak: Boolean, isReLoginForDelete: Boolean, onFailure: (Exception?) -> Unit = {}, onSuccess: () -> Unit = {}) {
        // Choose authentication providers
        val providers = arrayListOf(
            AuthUI.IdpConfig.EmailBuilder().build(),
            AuthUI.IdpConfig.GoogleBuilder().build(),
            AuthUI.IdpConfig.FacebookBuilder().build()
        )
        //my custom layout
        val customLayout = AuthMethodPickerLayout.Builder(R.layout.activity_firebaseui_picker_login)
            .setGoogleButtonId(R.id.googleBtn)
            .setEmailButtonId(R.id.emailBtn)
            .setFacebookButtonId(R.id.facebookBtn)
            .build()
        // Create and launch sign-in intent
        val signInIntent = AuthUI.getInstance()
            .createSignInIntentBuilder()
            .enableAnonymousUsersAutoUpgrade()
            .setAuthMethodPickerLayout(customLayout)
            .setIsSmartLockEnabled(false)
            .setAvailableProviders(providers)
            .setTheme(R.style.FirebaseUIPicker)
            .setTosAndPrivacyPolicyUrls(FirebaseRemoteConfigParameter.privacyPolicyUrl.stringValue.subsituteLanguage(), FirebaseRemoteConfigParameter.privacyPolicyUrl.stringValue.subsituteLanguage())
            .build()
-??->   val options = ActivityOptionsCompat.makeCustomAnimation(applicationContext, R.anim.slide_in_bottom, R.anim.slide_out_to_bot)
        signInLauncher.launch(signInIntent, options)
    }

это мой собственный макет, который я использую для экрана входа в систему (на всякий случай, если это будет иметь какой-либо эффект):

      <?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <include
            android:id="@+id/backgroundImage"
            layout="@layout/imageview_background" />

    <net.hixfield.snookercoach.common.ViewPaintCode
            android:id="@+id/background"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="24dp"
            android:layout_marginEnd="24dp"
            app:layout_constraintBottom_toBottomOf="@+id/disclaimer"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/description3"
            app:view_type="view_whiterounded" />

    <TextView
            android:id="@+id/description3"
            style="@style/FormTextRegular"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="16dp"
            android:paddingVertical="20dp"
            android:text="@string/VCLogin.Social.Title"
            android:textAlignment="center"
            app:layout_constraintBottom_toTopOf="@+id/facebookBtn"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintStart_toStartOf="@+id/background" />

    <net.hixfield.snookercoach.common.BtnPaintCode
            android:id="@+id/facebookBtn"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_marginStart="8dp"
            android:layout_marginBottom="24dp"
            app:button_type="facebook"
            app:layout_constraintBottom_toTopOf="@+id/or"
            app:layout_constraintEnd_toStartOf="@+id/googleBtn"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="@+id/background" />

    <net.hixfield.snookercoach.common.BtnPaintCode
            android:id="@+id/googleBtn"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="24dp"
            app:button_type="google"
            app:layout_constraintBottom_toTopOf="@+id/or"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toEndOf="@+id/facebookBtn"
            app:layout_constraintTop_toTopOf="@+id/facebookBtn" />

    <TextView
            android:id="@+id/or"
            style="@style/FormTextRegular"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="8dp"
            android:text="@string/VCLogin.Or"
            android:textAlignment="center"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintStart_toStartOf="@+id/background"
            app:layout_constraintTop_toTopOf="parent" />

    <net.hixfield.snookercoach.common.BtnPaintCode
            android:id="@+id/emailBtn"
            android:layout_width="200dp"
            android:layout_height="40dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="24dp"
            android:text="@string/fui_sign_in_with_email"
            app:button_type="fillBlue"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintStart_toStartOf="@+id/background"
            app:layout_constraintTop_toBottomOf="@+id/or" />

    <TextView
            android:id="@+id/disclaimer"
            style="@style/FormFootnote"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="16dp"
            android:paddingVertical="20dp"
            android:text="@string/VCLogin.Disclaimer"
            android:textAlignment="center"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintStart_toStartOf="@+id/background"
            app:layout_constraintTop_toBottomOf="@+id/emailBtn" />

    <View
            android:id="@+id/view"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="32dp"
            android:layout_marginBottom="8dp"
            android:background="@color/mainOrange"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="@+id/background"
            app:layout_constraintStart_toEndOf="@+id/or"
            app:layout_constraintTop_toTopOf="parent" />

    <View
            android:id="@+id/view2"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_marginStart="32dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="8dp"
            android:background="@color/mainOrange"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/or"
            app:layout_constraintStart_toStartOf="@+id/background"
            app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

анимация / slide_in_bottom

      <?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="500"
    android:fromYDelta="100%p" />

анимация / slide_out_to_bot

      <?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <translate
            android:duration="@android:integer/config_mediumAnimTime"
            android:fromYDelta="0%p"
            android:toYDelta="100%p" />
</set>

0 ответов

Другие вопросы по тегам