<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button android:id="@+id/pixelsBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pixels"
android:layout_y="50px"
android:layout_x="80px">
</Button>
<Button android:id="@+id/scaledBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scaled"
android:layout_y="100px"
android:layout_x="80sp">
</Button>
<Button android:id="@+id/inchesBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Inches"
android:layout_y="150px"
android:layout_x="0.5in">
</Button>
<Button android:id="@+id/millimetersBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Milli Meters"
android:layout_y="200px"
android:layout_x="8mm">
</Button>
</AbsoluteLayout>Quick Explanation
Here we just specify the x and y, by looking at this you would logically understand what they mean.
Here is how you can set this as your layout in your java code
0 comments:
Post a Comment