Creating an ImageView with a certain style programatically
<p>I want to do this programatically:</p>

<pre><code>&lt;ImageView style="@style/TitleBarSeparator" /&gt;
</code></pre>

<p>Where <code>TitleBarSeparator</code> is:</p>

<pre><code>&lt;style name="TitleBarSeparator"&gt;
    &lt;item name="android:layout_width"&gt;1px&lt;/item&gt;
    &lt;item name="android:layout_height"&gt;fill_parent&lt;/item&gt;
    &lt;item name="android:background"&gt;@color/title_separator&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>I've tried:</p>

<pre><code>new ImageView(getContext(), null, R.style.TitleBarSeparator);
</code></pre>

<p>but it doesn't work.
I guess the error comes from passing null as <code>AttributeSet</code> but I am not completely sure.</p>
