fix: correct IterableEmbeddedView image height and scaleType (#997)#1040
Closed
franco-zalamena-iterable wants to merge 1 commit intomasterfrom
Closed
fix: correct IterableEmbeddedView image height and scaleType (#997)#1040franco-zalamena-iterable wants to merge 1 commit intomasterfrom
franco-zalamena-iterable wants to merge 1 commit intomasterfrom
Conversation
Fix embedded_message_image ImageView having zero height when Media URL is configured. Set layout_height to wrap_content, add adjustViewBounds=true and scaleType=fitCenter to match campaign preview appearance. Also add missing top constraint on embedded_message_text_container in card_view.xml so it correctly positions below the image in ConstraintLayout. Made-with: Cursor
Contributor
Author
PR AnalysisProblem: The Ideal fix plan:
What the PR did:
Assessment:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
embedded_message_imageImageView in theIterableEmbeddedViewlayout had a height of 0, causing images not to display when a Media URL was configured in a campaign.Changes
android:layout_height="wrap_content"on the embedded message image view (was0dpin card_view.xml)android:adjustViewBounds="true"to maintain image aspect ratioandroid:scaleType="fitCenter"for proper scaling that matches campaign previewapp:layout_constraintTop_toBottomOf="@id/embedded_message_image"onembedded_message_text_containerin card_view.xml so it correctly positions below the imageApplied to all four layout files:
layout/card_view.xml,layout-v21/card_view.xml,layout/banner_view.xml, andlayout-v21/banner_view.xml.Test plan
Made with Cursor