3 thg 5, 2011
Bài 2_Ralative Layout
Bài này các bạn cũng làm tương tự như bài 1 mình đã giới thiệu.
Mục tiêu của bài này là tạo 1 Editbox và 2 Button OK và Cancle.
File main.xml như sau :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Type here:"/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/label"/>
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/entry"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:text="OK" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/ok"
android:layout_alignTop="@id/ok"
android:text="Cancel" />
</RelativeLayout>
Chú ý : ở đây mình dùng version 2.0.1 của Android.
Chúc bạn vui vẻ.
Đăng ký:
Đăng Nhận xét (Atom)
Bản beta đầu tiên
Sau 6 tháng cả team cặm cụi làm việc điên cuồng, bản alpha cũng được giới thiệu ra toàn bộ công ty và được testing nội bộ công ty mà thôi. ...
-
Language : Java. Version 1.0.0 Write by Sungha References code on the internet Source code : http://www.mediafire.com/?ec7632r731me7vv...
-
Code : http://www.mediafire.com/?z24113j1jzn8kaf
-
Sau 6 tháng cả team cặm cụi làm việc điên cuồng, bản alpha cũng được giới thiệu ra toàn bộ công ty và được testing nội bộ công ty mà thôi. ...
Không có nhận xét nào:
Đăng nhận xét