I'm trying to achieve this result:
What I have right now it is ConstraintLayout which includes three Views: TextView, ImageView, ImageView
Design requirements:
- Text centered inside TextView;
- TextView has fixed size 80dp
- Size of text should be AutoSizeable;
- ImageViews should change position horizontally depending on text position inside TextView; (check images with case #1/#2)
The main problem here it is item #4. And my question is - Is it possible to do it in XML? Or how to do it programmatically?
[Additional info] Autosizing doesn't work properly with width wrap_content. From documentation Autosizing:
Note: If you set autosizing in an XML file, it is not recommended to use the value "wrap_content" for the layout_width or layout_height attributes of a TextView. It may produce unexpected results.
from How to align View vertically to the text inside TextView?

No comments:
Post a Comment