LayoutInflater ignoring parameters?
<p>I have the following xml object representing a ImageButton </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;ImageButton
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/genreCellItemId" android:layout_weight="1"
  android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"
  android:paddingLeft="5.0dip" android:paddingRight="5.0dip"&gt;
&lt;/ImageButton&gt;
</code></pre>

<p>I try to inflate it and add it to a TableRow with the following code :</p>

<pre><code>LayoutInflater inflater= this.getLayoutInflater();
TableLayout grid = (TableLayout)findViewById(R.id.bodyTableLayout);
TableRow row = (TableRow)inflater.inflate(R.layout.genre_row, null);
View myButton = (View)inflater.inflate(R.layout.genre_cell, null);
row.addView(tempButton, new TableRow.LayoutParams());
grid.addView(row, new TableLayout.LayoutParams());
</code></pre>

<p>Ok so I noticed that it didn't look as expected, so I fire up the Hierarchy Viewere and noticed that the ImageButton's actually have an layout_width = FILL_PARENT instead of WRAP_CONTENT, also the layout_gravity is NONE and there is no padding to be seen...</p>

<p>Do, am I inflating it wrongly ? Or is maybe the new TableRow.LayoutParams() part doins omething wrong ?</p>
