title: How to set a different theme to a Layout
body: <p>I've set a default theme for the whole app. It's defined in styles.xml as follows:</p>
  
  <pre><code>    &lt;style name="DefaultTheme" parent="@android:style/Theme.Holo.Light"&gt;
          &lt;!-- Customization here --&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>I've also defined a dark theme:</p>
  
  <pre><code>    &lt;style name="DarkTheme" parent="@android:style/Theme.Holo"&gt;
          &lt;!-- Customization here --&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>In the manifest it is declared the light theme as the main theme for the app:</p>
  
  <pre><code>    &lt;application
      ...
      android:theme="@style/DefaultTheme" &gt;
  </code></pre>
  
  <p>Now this is working fine, but in an activity, I need to set a different theme for a single Layout. Something like this:</p>
  
  <pre><code>    +--------------------------------------------------+
      |         Parent Linear layout (default theme)     |
      |                                                  |
      | +------------------------------------+ +-------+ |
      | |                                    | |       | |
      | |     Left linear layout             | |       | |
      | |     (default theme)                | |       | |
      | |                                    | |       | |
      | |                                    | |       | |
      | |                                    | |    ·&lt;----------- Right Linear Layout
      | |                                    | |       | |        (Need it in dark theme)
      | |                                    | |       | |
      | |                                    | |       | |
      | +------------------------------------+ +-------+ |
      +--------------------------------------------------+
  </code></pre>
  
  <p>In the layout xml file I'm trying to set a theme for the rightmost child LinearLayout:</p>
  
  <pre><code>    &lt;LinearLayout
      style="@style/DarkTheme"&gt;
      ...
  </code></pre>
  
  <p>I'd expect this to work just fine, and to apply the dark theme to the right layout only (and its child views), but it is not working. I've tried replacing the @style with a built-in @android:style to no avail. I've tested this in the layout editor and on real device/simulator.</p>
  
  <p>Is it possible to apply a custom theme or style to a single layout?</p>