L API proposal: Introduce IS_RTL flag
This CL introduces CursorAnchorInfo.FLAG_IS_RTL for better RTL support. This CL also renames *CharacterRect() with *CharacterBounds() so that they can look more consistent with other existing APIs. Rationale: CursorAnchorInfo.FLAG_IS_RTL addresses following issues. 1. There is no way to associate the RTL information with the insertion marker. 2. Returning mirrored (right < left) RectF for RTL in CursorAnchorInfo#getCharacterRect() is turned out to be bug-prone. Such usage of RectF is not fully supported. For example, RectF#isEmpty() always returns false when right < left. 3. There is no reliable to provide the RTL information when CursorAnchorInfo#getCharacterRect() returns an empty (right == left) RectF. Perhaps we could use +0.0 and -0.0, but I'm afraid that it is also bug-prone. BUG: 17365414 BUG: 17335734 Change-Id: Ic8c6fab58c01206872a34e7ee604cdda1581364d
Loading
Please register or sign in to comment