Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6604] Android: Titanium.UI.AttributedString with Ti.UI.ATTRIBUTE_BASELINE_OFFSET

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, attributedString, label
ReporterJose Enrique
AssigneeJoshua Quick
Created2020-09-21T14:31:02.000+0000
Updated2020-09-21T21:20:07.000+0000

Description

When using the AttributedString on a label with the attribute ATTRIBUTE_BASELINE_OFFSET and a range only or a certain part of the text to modify in Android all the text in the label is modified, or is not applying the range. In iOS this work correctly.

Attachments

FileDateSize
Screenshot_1600698544.png2020-09-21T14:29:11.000+000032974
Simulator Screen Shot - iPhone X - 2020-09-21 at 16.15.06.png2020-09-21T14:28:51.000+000077275
test-as.zip2020-09-21T14:27:24.000+00008662313

Comments

  1. Joshua Quick 2020-09-21

    [~jogios], I recommend that you use the superscript/subscript styles instead. That will work on both platforms... with the only limitation being you can't control the offset. Currently, Android's baseline offset sets the entire "line" height/padding.

JSON Source