title: Add dimen resource to layout using Android Binding Library
body: <p>I'm using Android's binding library and I'm trying to add or remove the margin on a TextView depending on the value of a boolean. If it's true, I want the TextView to have a margin on the right and no margin on the left and if not then the opposite. All the other resources work fine but when I compile the code I get this error about the margins on the TextView: Cannot find the setter for attribute 'android:layout_marginRight' with parameter type float. </p>
  
  <p>Can anyone spot the error?</p>
  
  <p>This is my xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;data&gt;
          &lt;variable name="comment" type="mx.com.corpogas.dataModels.FeedbackComment"/&gt;
          &lt;import type="android.view.View"/&gt;
      &lt;/data&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@{comment.isMine ? @drawable/comment_background_white : @drawable/comment_background_green}"
              android:textSize="15sp"
              android:textColor="@{comment.isSent ? (comment.isMine ? @color/colorPrimaryDark : @android:color/white) : @color/unsent_text}"
              android:layout_marginRight="@{comment.isMine ? @dimen/feedback_comment_margin : @dimen/feedback_comment_no_margin}"
              android:layout_marginLeft="@{comment.isMine ? @dimen/feedback_comment_no_margin : @dimen/feedback_comment_margin}"
              android:text="@{comment.content}"/&gt;
  
  
  &lt;/layout&gt;
  </code></pre>
  
  <p>And this are my margins:</p>
  
  <pre><code>&lt;dimen name="feedback_comment_margin"&gt;16dp&lt;/dimen&gt;
  &lt;dimen name="feedback_comment_no_margin"&gt;0dp&lt;/dimen&gt;
  </code></pre>
  
  <p>When I remove the margins the program compiles and runs perfectly.</p>