ImageView Width And Height Programmatically In TableLayout
<p>Actullay all I want is in question title. I want to set fix width and height for ImageView in TableLayout. How can I do 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);
    tableRow.setLayoutParams(new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));


    ImageView imageView = new ImageView(this);
    imageView.setImageResource(R.drawable.troll_logo);
    //imageView.setLayoutParams(new TableLayout.LayoutParams(100, 100));

    tableRow.addView(imageView);
    buddy_list_layout.addView(tableRow);
} // end -&gt; method -&gt; onCreate
</code></pre>
