title: Android TextView span full width programmatically
body: <p>I've created a TextView within a LinearLayout programmatically:</p>
  
  <pre><code>LinearLayout filmTitleContainer = new LinearLayout(ctx);
  TextView filmName = new TextView(ctx);
  filmName.setBackgroundColor(Color.rgb(Color.YELLOW));
  filmName.setText(this.screeningTime+" "+this.name);
  </code></pre>
  
  <p>The text view is shrunk:</p>
  
  <p><img src="https://i.stack.imgur.com/iFMec.png" alt="enter image description here"></p>
  
  <p>How do I set the text to the occupy the full width of the screen? When I use the XML layout file, I'd set <code>android:layout_width="match_parent"</code>. What's the equivalent Java code?</p>
  
  <hr>