Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (99.44 KB, 3 trang )
Trung tâm Tin học – ĐH KHTN
Cách chèn hình tự chọn làm hình nền
Sau đây mình sẽ demo cách bạn chọn 1 hình bất kỳ làm hình nền cho ứng dụng:
1/ Bạn tạo 1 project như sau:
Project name: Global
Build Target: Android 2.3.3
Application name: Global
Package name: org.example.GlobalExample
Create Activity: GlobalExample
2/ Trong phần main.xml bạn chỉnh lại như sau:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" /> android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" /> android:id="@+id/iclLayout">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/info_text"
android:layout_alignParentBottom="true"
android:textColor="@color/Orange"
android:textSize="24dip" android:layout_centerHorizontal="true"
android:id="@+id/infotext"></TextView>
<ImageView android:layout_height="wrap_content"