Stelios Papamichail
Stelios Papamichail

Reputation: 1290

How to rotate a TextView in a ConstraintLayout along with its constraint bounds

I would love to know if it is possible to rotate a TextView inside of a ConstraintLayout but at the same time rotate its Constraint Bounds (i don't know if that's what they're called). As you can see in the image below, i've rotated the TextView using android:rotation="-90" to rotate it vertically but its bounds don't follow the rotation thus making positioning it correctly impossible. Does anybody have any idea on how to go about doing that? All stack posts so far just refer to rotating the TextView.

result

Upvotes: 3

Views: 1837

Answers (1)

Cheticamp
Cheticamp

Reputation: 62851

It seems that this answer should work which refers to this answer but this solution doesn't seem to work with ConstraintLayout. I haven't looked into why not.

I have had better success with this GitHub project that writes text along paths. The text does not show up in the layout designer, but it will appear in an emulator and on a device.

Upvotes: 2

Related Questions