title: Android CheckBox text not displaying
body: <p>I'm trying to dynamically create some CheckBoxes in one of my Android activities, but it's not rendering the text.</p>
  
  <p>Here is my simplified code...</p>
  
  <ol>
  <li><p>Layout XML:</p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:padding="10dip"&gt;
  
      ...
      &lt;LinearLayout
          android:id="@+id/register_attracted_to"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" /&gt;
      ...
  &lt;/LinearLayout&gt;
  </code></pre></li>
  <li><p>Activity code:</p>
  
  <pre><code>final LinearLayout attractedTo = (LinearLayout) findViewById(R.id.register_attracted_to);
  
  final CheckBox male = new CheckBox(this);
  male.setText("Male");
  attractedTo.addView(male);
  
  final CheckBox female = new CheckBox(this);
  female.setText("Female");
  attractedTo.addView(female);
  </code></pre></li>
  </ol>
  
  <p>My "real" code is a little more complex (any dynamic) than this, which is why I haven't simply included the checkboxes in the layout itself.  However, even dumbing down my code still doesn't render the checkbox text properly.</p>
  
  <p>Here's a screenshot to demonstrate (see the "Attracted To" section), with a little extra to demonstrate that my vertical layout appears to be working properly otherwise:</p>
  
  <p><img src="https://i.stack.imgur.com/2kNsV.png" alt="Android checkboxes missing text"></p>