File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
media-placeholders/src/main/java/org/wordpress/aztec/placeholders Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ class PlaceholderManager(
161161 val parentTextViewTopAndBottomOffset = aztecText.scrollY + aztecText.compoundPaddingTop
162162
163163 val adapter = adapters[type]!!
164- val height = adapter.calculateHeight(attrs, parentTextViewRect.right - parentTextViewRect.left - 20 )
164+ val windowWidth = parentTextViewRect.right - parentTextViewRect.left - 20
165+ val height = adapter.calculateHeight(attrs, windowWidth)
165166 parentTextViewRect.top + = parentTextViewTopAndBottomOffset
166167 parentTextViewRect.bottom = parentTextViewRect.top + height
167168
@@ -175,14 +176,14 @@ class PlaceholderManager(
175176 box = adapter.createView(container.context, uuid, attrs)
176177 }
177178 val params = FrameLayout .LayoutParams (
178- adapter.calculateWidth(attrs, parentTextViewRect.right - parentTextViewRect.left - 20 ) ,
179- height
179+ adapter.calculateWidth(attrs, windowWidth) - 20 ,
180+ height - 20
180181 )
181182 val padding = 10
182183 params.setMargins(
183184 parentTextViewRect.left + padding + aztecText.paddingStart,
184185 parentTextViewRect.top + padding,
185- parentTextViewRect.right - padding - aztecText.paddingEnd ,
186+ 0 ,
186187 0
187188 )
188189 box.layoutParams = params
You can’t perform that action at this time.
0 commit comments