KB-20071128-020

From Triled Wiki

Jump to: navigation, search

Define sizes in different physical dimensions (millimeters and inches).

Here is example of view definition (taken from original post).

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >

  <Button android:layout_width="fill_parent"
          android:layout_height="1in"
          android:text="1 Inch" />

  <Button android:layout_width="fill_parent"
          android:layout_height="25mm"
          android:text="25 Millimeters" />

  <Button android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Button3" />

</LinearLayout> 

Both buttons are expected to be almost equal heights (1 Inch = 25,4 millimeters), but differ too much.

Personal tools