title: Setting textSize in custom view results in huge text
body: <p>I'm calling the following in the constructor of my custom view:</p>
  
  <pre><code>private void style(Resources.Theme theme, AttributeSet attrs) {
      TypedArray a = theme.obtainStyledAttributes(
              attrs,
              R.styleable.StackedTextView,
              0, 0);
  
      try {
          DebugTool.assertTrue(holdr != null, "View holder has not been properly intialized.");
          String line1 = a.getString(R.styleable.StackedTextView_line1);
          setLine1(line1);
          String line2 = a.getString(R.styleable.StackedTextView_line2);
          setLine2(line2);
  
          line1Size = a.getDimension(R.styleable.StackedTextView_line1_textSize, 20);
          line2Size = a.getDimension(R.styleable.StackedTextView_line2_textSize, 20);
          if (line1Size &gt; 0) {
              holdr.textLine1.setTextSize(line1Size);
          }
          if (line2Size &gt; 0) {
              holdr.textLine2.setTextSize(line2Size);
          }
  
      } finally {
          a.recycle();
      }
  }
  </code></pre>
  
  <p>It's supposed to set text and text size for 2 textfields.</p>
  
  <p>I have the following in my attr.xml in addition to the string formats for the text content (which works fine).</p>
  
  <pre><code>    &lt;attr name="line1_textSize" format="dimension" /&gt;
      &lt;attr name="line2_textSize" format="dimension" /&gt;
  </code></pre>
  
  <p>When I use this view and set the text size using a dimension via xml, </p>
  
  <pre><code>        &lt;com.me.app.view.component.StackedTextView
              android:id="@+id/overview_total_reviews"
              app:line1="40"
              app:line2="Rating"
              style="@style/OverviewStackedText"
              app:line1_textSize="10sp"
              app:line2_textSize="12sp"
              /&gt;
  </code></pre>
  
  <p>the text ends up being significantly larger than expected. I'm only setting 10 and 12sp respectively, and the text sizes are closer to like 30sp.</p>
  
  <p>Can anyone see what I'm doing wrong? Do I need to do something with DisplayMetrics to make sure things are scaled properly?</p>
  
  <p><strong>Edit: Adding some clarification</strong> </p>
  
  <p>The dimension IS getting picked up. The text does change when I set the different text sizes using my custom attribute (in xml). I've also tried using <code>getDimensionPixelSize</code>.</p>
  
  <p>It's as if the calculation/dimension retrieval is wrong. 1sp (or dp) change results in a significant change. </p>