title: How to set unique TextView text color through Android Theme when multiple Themes are available
body: <p>I have a couple of Themes in an app and it works ok. Now I wanted to set a chat bubble text color to color red when user select <code>BaseTheme.Red</code>, and text color orange when user select <code>BaseTheme.Orange</code> (see code below)</p>
  
  <p><strong>It´s only the chat bubble text right that I want to be like red for the ´Red´ and Orange for the Orange Theme and all other TextView text color in the app will have default Theme color</strong>.</p>
  
  <p>I try to learn Android Themes and got into trouble setting this chat TextView text color to another color then this global:</p>
  
  <pre><code>&lt;item name="android:textColor"&gt;@color/white&lt;/item&gt;
  </code></pre>
  
  <p>I created this: Inside the <code>BaseTheme.Red</code></p>
  
  <pre><code>&lt;item name="chatBubbleTextColor"&gt;@color/material_red_500&lt;/item&gt;
  </code></pre>
  
  <p>and thought I could use it in the TextView xml like</p>
  
  <pre><code>android:textColor="?attr/chatBubbleTextColor"
  </code></pre>
  
  <p>but i cannot get it to work maybe it does not work like that?</p>
  
  <p>How can I with the Themes below make this work?</p>
  
  <p>Here is two Themes <code>Red</code> and <code>Orange</code>:</p>
  
  <pre><code>    &lt;!-- Base Theme --&gt;
  &lt;style name="BaseTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
      &lt;!-- Attributes for all APIs --&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="dialogTheme"&gt;@style/AppTheme.Dialog&lt;/item&gt;
      &lt;item name="alertDialogTheme"&gt;@style/AppTheme.Dialog.Alert&lt;/item&gt;
      &lt;item name="colorControlHighlight"&gt;@color/selector_black_pressed&lt;/item&gt;
      &lt;!-- Theme for the Preferences --&gt;
      &lt;item name="preferenceTheme"&gt;@style/AppPreferenceTheme&lt;/item&gt;
      &lt;!-- Theme for the pacv_placesAutoCompleteTextV --&gt;
      &lt;item name="pacv_placesAutoCompleteTextViewStyle"&gt;@style/Widget.AppCompat.EditText&lt;/item&gt;
  
  
  
  &lt;!-- Default App Theme --&gt;
      &lt;style name="AppTheme" parent="BaseTheme"&gt;
          &lt;!-- API specific attributes 14+ --&gt;
          &lt;item name="selectableRectDrawable"&gt;@drawable/state_list_selectable_rect_black&lt;/item&gt;
          &lt;item name="selectableRectDrawableInverse"&gt;@drawable/state_list_selectable_rect_white&lt;/item&gt;
          &lt;item name="selectableRectDrawableColored"&gt;@drawable/state_list_selectable_rect_black&lt;/item&gt;
          &lt;item name="selectableRoundedRectDrawable"&gt;@drawable/state_list_selectable_rounded_rect_black&lt;/item&gt;
          &lt;item name="selectableRoundedRectDrawableInverse"&gt;@drawable/state_list_selectable_rounded_rect_white&lt;/item&gt;
          &lt;item name="selectableRoundedRectDrawableColored"&gt;@drawable/state_list_selectable_rounded_rect_black&lt;/item&gt;
      &lt;/style&gt;
  
  
  
      &lt;!-- Orange App Theme --&gt;
      &lt;style name="BaseTheme.Orange" parent="AppTheme"&gt;
          &lt;!-- Attributes for all APIs --&gt;
          &lt;item name="colorPrimary"&gt;@color/material_orange_500&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/material_orange_700&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/material_orange_a700&lt;/item&gt;
          &lt;item name="dialogTheme"&gt;@style/AppTheme.Dialog.Orange&lt;/item&gt;
          &lt;item name="alertDialogTheme"&gt;@style/AppTheme.Dialog.Alert.Orange&lt;/item&gt;
          &lt;item name="android:windowBackground"&gt;@color/material_orange_300&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="AppTheme.Orange" parent="BaseTheme.Orange"&gt;
          &lt;!-- API specific attributes 14+ --&gt;
          &lt;item name="selectableRectDrawableColored"&gt;@drawable/state_list_selectable_rect_orange&lt;/item&gt;
          &lt;item name="selectableRoundedRectDrawableColored"&gt;@drawable/state_list_selectable_rounded_rect_orange&lt;/item&gt;
  
          &lt;!-- Add your custom overall styles here --&gt;
      &lt;/style&gt;
  
  
  
  
      &lt;!-- Red App Theme --&gt;
      &lt;style name="BaseTheme.Red" parent="AppTheme"&gt;
          &lt;!-- Attributes for all APIs --&gt;
          &lt;item name="colorPrimary"&gt;@color/material_red_500&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/material_red_700&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/material_red_a700&lt;/item&gt;
          &lt;item name="dialogTheme"&gt;@style/AppTheme.Dialog.Red&lt;/item&gt;
          &lt;item name="alertDialogTheme"&gt;@style/AppTheme.Dialog.Alert.Red&lt;/item&gt;
          &lt;item name="android:windowBackground"&gt;@color/material_red_300&lt;/item&gt;
          &lt;!-- Chat bubble attribute not working--&gt;
          &lt;item name="chatBubbleTextColor"&gt;@color/material_red_500&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="AppTheme.Red" parent="BaseTheme.Red"&gt;
          &lt;!-- API specific attributes 14+ --&gt;
          &lt;item name="selectableRectDrawableColored"&gt;@drawable/state_list_selectable_rect_red&lt;/item&gt;
          &lt;item name="selectableRoundedRectDrawableColored"&gt;@drawable/state_list_selectable_rounded_rect_red&lt;/item&gt;
  
          &lt;!-- Add your custom overall styles here --&gt;
      &lt;/style&gt;
  </code></pre>