wordpress-mobile / AztecEditor-Android

A reusable native Android rich text editor component.
Mozilla Public License 2.0
675 stars 112 forks source link

Use adapter height when drawing a placeholder #998

Closed planarvoid closed 1 year ago

planarvoid commented 1 year ago

Fix

This PR fixes an issue when the placeholder size was different (by a little bit) than what was defined in the adapter. This was mostly visible on smaller placeholders. I think only the last placeholder of the document was affected.

In addition it fixes the width so that the cursor doesn't overlap the placeholder

Test (it's better to test this with the PR where it's used)

  1. Setup placeholders
  2. Add 2 placeholders to the EXAMPLE
  3. Add logging of actual height to the code
  4. Check the height is fixed

Review

@khaykov

Make sure strings will be translated: