title: Android UnsupportedOperationException: Can't convert to color: type=0x2
body: <p>This is the crashlog from Android Market:</p>
  
  <pre><code>android.view.InflateException: Binary XML file line #8: Error inflating class &lt;unknown&gt;
  at android.view.LayoutInflater.createView(LayoutInflater.java:596)
  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:644)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
  at com.designfuture.music.ui.dialog.MXMDialog.&lt;init&gt;(MXMDialog.java:73)
  at com.designfuture.music.ui.dialog.MXMDialog.&lt;init&gt;(MXMDialog.java:58)
  at com.designfuture.music.model.MXMStoreBuy.getBuyDialog(MXMStoreBuy.java:70)
  at com.designfuture.music.ui.fragment.plbl.XLBLFragment$ViewHolder$3.onClick(XLBLFragment.java:290)
  at android.view.View.performClick(View.java:3110)
  at android.view.View$PerformClick.run(View.java:11934)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:132)
  at android.app.ActivityThread.main(ActivityThread.java:4123)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:491)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: java.lang.reflect.InvocationTargetException
  at java.lang.reflect.Constructor.constructNative(Native Method)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
  at android.view.LayoutInflater.createView(LayoutInflater.java:576)
  ... 22 more
  Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2
  at android.content.res.TypedArray.getColor(TypedArray.java:326)
  at android.widget.TextView.&lt;init&gt;(TextView.java:422)
  at android.widget.TextView.&lt;init&gt;(TextView.java:364)
  ... 25 more
  </code></pre>
  
  <p>So for what I can see the problem is in </p>
  
  <pre><code>at com.designfuture.music.ui.dialog.MXMDialog.&lt;init&gt;(MXMDialog.java:73)
  </code></pre>
  
  <p>Where I have this line of code:</p>
  
  <pre><code>mHolder = new ViewHolder((ViewGroup) inflater.inflate(R.layout.dialog_mxm, null));
  </code></pre>
  
  <p>This is the complete function</p>
  
  <pre><code>public MXMDialog(Context context, String title) {
          super( context, R.style.Dialog_MXM );
  
          //getWindow()
          LayoutParams lp= getWindow().getAttributes();
          lp.gravity = Gravity.CENTER;
          lp.dimAmount = 0.5f;
          lp.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL;
  
          if(inflater == null)
              inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          mHolder = new ViewHolder((ViewGroup) inflater.inflate(R.layout.dialog_mxm, null));
          super.setContentView(mHolder.root);
  
          if(title != null)
              setTitle(title);
      }
  </code></pre>
  
  <p>This is the content of the R.layout.dialog_mxm</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@android:id/title"
          android:background="@drawable/tabwidget"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:gravity="left"
          android:paddingLeft="10dp"
          android:textStyle="bold"
          android:textColor="@color/orange_mxm"
          style="@android:style/TextAppearance.Large"/&gt;
  
      &lt;FrameLayout
          android:id="@android:id/content"
          android:background="@drawable/tabwidget"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I think that the problem is in the TextView.
  The style of that textview cannot be a problem because comes directly from Android so I don't think this will be a problem.</p>
  
  <p>The android:textColor="@color/orange_mxm" is this in my colors.xml</p>
  
  <pre><code>&lt;color name="orange_mxm"&gt;#FFff6500&lt;/color&gt;
  </code></pre>
  
  <p>This is the Dialog.MXM style</p>
  
  <pre><code>&lt;!-- DIALOG --&gt;
  
      &lt;style name="Dialog.MXM" parent="@android:style/Theme.DeviceDefault.Dialog"&gt;
          &lt;item name="android:layout_width"&gt;wrap_content&lt;/item&gt;
          &lt;item name="android:background"&gt;@android:color/transparent&lt;/item&gt;
          &lt;item name="android:windowAnimationStyle"&gt;@style/Dialog.MXM.FadeAnimation&lt;/item&gt;
          &lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="android:gravity"&gt;center&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="Dialog.MXM.FadeAnimation"&gt;
          &lt;item name="android:windowEnterAnimation"&gt;@android:anim/fade_in&lt;/item&gt;
          &lt;item name="android:windowExitAnimation"&gt;@android:anim/fade_out&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>And I don't think this is a so not-standard color... </p>
  
  <p>Where's the problem? How can I solve this?</p>