Open Emeshey opened 11 months ago
Hi @Emeshey, I will take a look at it :)
I cannot reproduce this crash using your steps 🤔
What do you do with the Fragment between steps 1/2? I've tried:
All three scenarios resulted in no crash and normal behaviour...
Did you do something differently or could you share with me a minimal repository, where this Issue exists? :)
Hello :) I have the following structure:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/fintec_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:visibility="@{viewModel.fintecVisibility}" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:visibility="@{!viewModel.fintecVisibility}">
<Button...../>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
When I press the button, the fintec flow will start:
requireActivity().supportFragmentManager.beginTransaction()
.let { fragmentTransaction ->
fragmentTransaction.add(
R.id.fintec_layout,
prepareFintecFragment(it.token)
)
fragmentTransaction.commit()
}
The prepare method:
private fun prepareFintecFragment(token: String): XS2AWizardFragment {
val theme = XS2ATheme(
tintColor = XS2AColor(requireContext().getColor(R.color.colorPrimary)),
submitButtonStyle = ButtonStyle(
backgroundColor = XS2AColor(requireContext().getColor(R.color.colorPrimary)),
textColor = XS2AColor(requireContext().getColor(R.color.white))
)
)
return XS2AWizardFragment(
sessionKey = token,
theme = theme
)
}
If I get an error (which is not the testmode_error
), I change the fintecVisibility
to false.
With your example I'm still not able to reproduce this 🤔 I tested in on a API-Level 23 and 33 Emulator.
Does this still occur when you manually set the visibility instead of using a data binding?
Hm, this seems to solve the problem. So note for other devs in the future: don't use data binding for this one :) Thank you for your fast answers.
Glad to hear you found the cause of this Issue :)
I will try to get data binding to work for my test environment, so I can maybe find a fix on our end, so projects with data binding enabled can use the sdk without any workarounds :)
I will keep this Issue open for the further investigation of this :)
@maik-mursall Is this still needed? or can we close this issue?
Hello @maik-mursall !
TLDR: I am having a crash when I tap on the "Next" button on the first screen of the sdk, while leaving the Bank name field empty, the second time I enter the screen. I'm using 5.1.4 version of the sdk.
Full stacktrace:
Steps to reproduce:
My problem is that I don't use compose in my app at all, and still get this crash. I reproduced it on:
What I've tried so far:
replace
instead ofadd
I saw online that setting
isTransitionGroup = true
on the ComposeView helps, but I do not have access to it.