title: TextView not showing up when I add it to LinearLayout
body: <p>I try to create a cardView that contains an image and beside that image I want to add two lines of text (vertically stacked on each other). Below is the code I have written to do this (the function returns a cardView). However, in my cardView nothing is appearing. If I remove the linearLayout and the textViews than I get a card which shows the imageView. So I assume I'm doing something wrong with the way I set the linearLayout on my textViews or the way I add my linearLayout to my tableRow.</p>
  
  
  
  <pre><code> private fun constructCardView(header: String, info: String) : CardView {
      val cardView = CardView(this)
  
      cardView.setPaddingRelative(5,0,0,0)
      cardView.radius = 10F
  
      val tableLayout = TableLayout(this)
      val layoutParams = TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.MATCH_PARENT, 1.0f)
      tableLayout.layoutParams = layoutParams
  
      val tableRow = TableRow(this)
      val tableRowParams = TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT, 1.0f)
      tableRow.layoutParams = tableRowParams
  
  
      val imageView = ImageView(this)
      imageView.setImageResource(R.drawable.ic_restaurant_black_24dp)
      imageView.minimumHeight = 10
      imageView.minimumWidth = 10
  
      val linearLayout = LinearLayout(this)
      val linearLayoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
      linearLayoutParams.setMargins(3,3,3,3)
      linearLayout.layoutParams = linearLayoutParams
      linearLayout.orientation = LinearLayout.VERTICAL
  
      val textViewHeader = TextView(this)
      val textViewHeaderLayoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
      textViewHeaderLayoutParams.setMargins(0, 0, 5, 0)
      textViewHeader.layoutParams = textViewHeaderLayoutParams
      textViewHeader.text = header
      textViewHeader.textSize = 20F
  
      val textViewInfo = TextView(this)
      val textViewInfoLayoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
      textViewInfoLayoutParams.setMargins(5, 0, 5, 0)
      textViewInfo.text = info
      textViewInfo.textSize = 12F
      textViewInfo.layoutParams = textViewInfoLayoutParams
  
      linearLayout.addView(textViewHeader)
      linearLayout.addView(textViewInfo)
  
      tableRow.addView(imageView)
      tableRow.addView(linearLayout)
  
  
      tableLayout.addView(tableRow)
      cardView.addView(tableLayout)
      cardView.requestLayout()
  
      return cardView
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>