title: TextView: wrap content in multiple lines
body: <p>I have the following TextView:</p>
  
  <pre><code>&lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:minLines="2"
      android:text="Lorem ipsum dolor sit amet"/&gt;
  
  </code></pre>
  
  <p>This is the behavior I get:</p>
  
  <p><a href="https://i.stack.imgur.com/sXa7N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sXa7N.png" alt=""></a></p>
  
  <p>This is the behavior I expected:</p>
  
  <p><a href="https://i.stack.imgur.com/HQa5h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQa5h.png" alt=""></a></p>
  
  <p>I'd like to get this behavior without having to set a hardcoded width, because the text is different for each language. Is there any way to do it?</p>
  
  <p><strong>EDIT:</strong> I'd also like to avoid binding the width of the TextView to the width of the parent. It doesn't matter if there's enough space to display the whole text in a single line, I want it displayed in two lines. Given that, I'd like the TextView to have the minimum possible width.</p>