liguofeng29’s blog

個人勉強用ブログだっす。

AndroidのUI - AbsoluteLayout

      

 
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="20dp"
android:layout_y="20dp"
android:text="ACCOUNT:" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="100dp"
android:layout_y="10dp"
android:width="400px" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="20dp"
android:layout_y="80dp"
android:text="PASSWORD:" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="100dp"
android:layout_y="80dp"
android:width="400px" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="150dp"
android:layout_y="150dp"
android:text="Login"
/>
</AbsoluteLayout>