Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PaymentSheet] Fix issue opening the keyboard with small form #4961

Merged
merged 2 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.stripe.android.paymentsheet.ui

import android.animation.LayoutTransition
import android.content.pm.ActivityInfo
import android.content.res.ColorStateList
import android.graphics.Insets
Expand Down Expand Up @@ -95,9 +94,6 @@ internal abstract class BaseSheetActivity<ResultType> : AppCompatActivity() {
}
}

bottomSheet.layoutTransition.enableTransitionType(LayoutTransition.CHANGING)
fragmentContainerParent.layoutTransition.enableTransitionType(LayoutTransition.CHANGING)

bottomSheetController.setup()

bottomSheetController.shouldFinish.observe(this) { shouldFinish ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.stripe.android.paymentsheet

import android.animation.LayoutTransition
import android.content.Context
import androidx.activity.result.ActivityResultLauncher
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
Expand Down Expand Up @@ -399,28 +398,6 @@ internal class PaymentSheetActivityTest {
}
}

@Test
fun `Verify animation is enabled for layout transition changes`() {
val scenario = activityScenario()
scenario.launch(intent).onActivity { activity ->
// wait for bottom sheet to animate in
idleLooper()

assertThat(
activity.viewBinding.bottomSheet.layoutTransition.isTransitionTypeEnabled(
LayoutTransition.CHANGING
)
).isTrue()

assertThat(
activity.viewBinding.fragmentContainerParent.layoutTransition
.isTransitionTypeEnabled(
LayoutTransition.CHANGING
)
).isTrue()
}
}

@Test
fun `Verify Ready state updates the buy button label`() {
val scenario = activityScenario()
Expand Down