Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make my TextView wrapping content and respect a maximum width

I have a constraintLayout with three views (ImageView, TextView, TextView) like this : my constraintLayout layout

I want the green TextView to be wrap_content and have also a maximum width, I don't have the exact value of the maximum with but my TextView should respect the minimum margin of 16dp. otherwise it will be multilines. Can you please help me out with this? Regards

like image 293
Othmandroid Avatar asked Jan 03 '23 05:01

Othmandroid


1 Answers

From version 1.1.0 of ConstraintLayout. This issue is resolved by using

app:layout_constrainedWidth=”true”

like image 124
pop Avatar answered Feb 22 '23 17:02

pop