-
Notifications
You must be signed in to change notification settings - Fork 34
Description
✍️ Issue Description
Please provide a clear and concise description of the issue you are experiencing.
📋 Steps to Reproduce
- Use IterableEmbeddedView and configure Media Url in a campaign
👤 Iterable orgId: play2pay
📦 Iterable SDK version: 3.6.5
📲 Android OS version: all
Observe that the height of the IterableEmbeddedView is 0.

A workaround is to manually set WRAP_CONTENT on the layoutparams of com.iterable.iterableapi.ui.R.id.embedded_message_image, therefore it's proven that the IterableEmbeddedView requires correction to it's xml implementation to match the preview displayed in a campaign. When fixing this issue please also set or allow configuration of a proper scaleType so we can achieve display in the app equivalent to the campaign preview.
Currently the workaround for this defect is the following, which is not optimal:
fragment.childFragmentManager.registerFragmentLifecycleCallbacks(object : FragmentManager.FragmentLifecycleCallbacks() { override fun onFragmentViewCreated(fm: FragmentManager, fragment: Fragment, v: View, savedInstanceState: Bundle?) { if(fragment is IterableEmbeddedView) { val embeddedMessageImageView: ImageView? = fragment.view?.findViewById(com.iterable.iterableapi.ui.R.id.embedded_message_image) embeddedMessageImageView?.layoutParams = ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, fragment.requireActivity().dpToPx(200)) embeddedMessageImageView?.scaleType = ImageView.ScaleType.CENTER_INSIDE embeddedMessageImageView?.adjustViewBounds = true } }}, false )