Is it possible to get exact offset from `TextLayou...
# compose
o
Is it possible to get exact offset from
TextLayoutResult
, kinda like
getOffsetForPosition
but returning null, if there is no text at coordinates? E.g. if text is wrapped and second line is shorter, I would like to know if coordinates are over real text, or over blank part here ->
h
You can run a
getBoundingBox(offset)
at the returned offset from
getOffsetForPosition
and check whether this boundingbox contains the original position.
s
Sounds like a good feature request, can you please file one?
getLine(Start/End/Right/Left) might help
o