Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> Android開發 >> 初級開發 >> Android Dimension Resources

Android Dimension Resources

編輯:初級開發

Pixels, inches, and points are all examples of dimensions that can play a part in XML layouts or Java code. You can use these dimension resources to style and localize android UIs without changing the source code. The following shows how you can use dimension resources in XML.
NOTE:  The Java method call uses Dimension (full Word) whereas the R.Java namespace usesthe shortened version dimen to represent “dimension.”

 Using Dimension Resources in XML  
<TextVIEw android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:textSize="@dimen/medium_size"/>

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved