ImageView In TableLayout
<p>I want to add a ImageView in TableLayout. I do all things, but it isn't shown anything. How can I fix it?</p>

<p>This is my code:</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.buddy_list);

   TableLayout buddy_list_layout = (TableLayout)findViewById(R.id.buddy_list_layout);

    TableRow tableRow = new TableRow(this);
    TableLayout.LayoutParams layoutParams1 = new TableLayout.LayoutParams(
    TableLayout.LayoutParams.FILL_PARENT,
        50);

    ImageView imageView = new ImageView(this);
    imageView.setImageResource(R.drawable.troll_logo);
    TableLayout.LayoutParams layoutParams2 = new TableLayout.LayoutParams(50, 50);
    tableRow.addView(imageView, layoutParams2);
    buddy_list_layout.addView(tableRow, layoutParams1);
} // end -&gt; method -&gt; onCreate
</code></pre>
