I'm trying to set style to programmatically created LinearLayout this way:
(Reference: Android: set view style programmatically)
LinearLayout linearLayout = new LinearLayout(this, null, R.style.linear_container);
And styles.xml
<style name="linear_container">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">20dp</item>
<item name="android:background">#9B1212</item>
<item name="android:orientation">vertical</item>
</style>
But style is not applied how to make it work?