title: How to use dimens.xml in Android?
body: <p>When I design a layout, I centralize all dimensions in dimens.xml because of topics of maintainability. My question is if this is correct or not. What would it be the best good practice? There is very little information about this, nothing. I know it's good idea to centralize all strings of a layout on strings.xml, colors on colors.xml. But about dimensions?</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;TableLayout
      android:id="@+id/history_detail_rows_submitted"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/cebroker_history_detail_rows_border"
      android:collapseColumns="*"&gt;
  
      &lt;TableRow
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="@dimen/history_detail_rows_margin_vertical"
          android:background="@color/cebroker_history_detail_rows_background"
          android:gravity="center"
          android:paddingBottom="@dimen/history_detail_rows_padding_vertical"
          android:paddingLeft="@dimen/history_detail_rows_padding_horizontal"
          android:paddingRight="@dimen/history_detail_rows_padding_horizontal"
          android:paddingTop="@dimen/history_detail_rows_padding_vertical"&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:drawableLeft="@mipmap/ic_history_detail_submitted_by"
              android:drawablePadding="@dimen/history_detail_rows_textviews_padding_drawable"
              android:gravity="left|center"
              android:paddingRight="@dimen/history_detail_rows_textviews_padding"
              android:text="@string/history_detail_textview_submitted_by"
              android:textColor="@color/cebroker_history_detail_rows_textviews"
              android:textSize="@dimen/history_detail_rows_textviews_text_size" /&gt;
  </code></pre>