Landscape resource not picked up via LayoutInflater
<p>I am trying to dynamically add buttons to table rows, but need to alter the style of the buttons based on screen orientation.  I have the following "game_answer_button.xml" layout file in both "layout" and "layout-land" folders.</p>

<p><strong>res/layout:</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Button xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    /&gt;
</code></pre>

<p><strong>res/layout-land:</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Button xmlns:android="http://schemas.android.com/apk/res/android"
    style="@android:style/Widget.Button.Small"
    /&gt;
</code></pre>

<p>The button layout is being inflated in my activity as follows:</p>

<pre><code>LayoutInflater inflater = getLayoutInflater();
Button button = (Button)inflater.inflate(R.layout.game_answer_button, null);
button.setText(image.getDescription());
</code></pre>

<p>However, it seems the default (portrait) layout is selected every time.  If the contents of the default layout are replaced with the landscape layout, then the landscape layout is finally rendered.  It doesn't seem to be correctly selecting the landscape layout resource via LayoutInflater.</p>

<p>Any ideas on this?</p>
