... Trung tâm Tin học – ĐH KHTN
Game đếm số
Project name: GameSoundCuaDac
Build Target: Android 2.3.3
Application name: GameSoundCuaDac
Package name: com.dac
Create Activity: GameSoundCuaDacActivity
Trong ... xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fil...
... thư mục đó, đều có
đoạn này:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=“@string/hello"
/>
Cấu trúc ... xoay màn hình
• Các bạn sửa cái nội dung android:text trong đoạn
xml đó lại, để cho 2 file main đó có 2 nội dung
text khác nhau là được.
• Chạy chương trình, sau khi màn hình hiển thị,
các ....
... hình. Vì thế,
khai báo trong manifest như sau:
<activity android:name=".HelloBootActivity"
android:theme="@android:style/Theme.Dialog">
</activity>
• Còn ... kiện này
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
• Khai báo receiver bên trong thẻ application
<receiver android:name=".BootReceiver...
...
với lập trình xử lý âm thanh, chúng ta có thể can thiệp đến từng giá trị của âm thanh và xử lý nó trước khi cho thực thi.
addSoundSourceFromMemory(): hàm dùng với quá trình xử lý âm thanh ... huống âm thanh:
isFinished(): Dùng để kiểm tra việc đã thực thi xong tệp tin âm thanh
isCurrentlyPlaying(): Kiểm tra tệp tin âm thanh đang được thực thi
Khi viết cá...
... super.handleMessage(msg);
}
};
public int getGameSize() {
return x;
}
public Game( Context context) {
super(context);
Lập trình Android – http://laptrinhdidong.vn Page 7
Trung tâm Tin học – ĐH KHTN
handler.sendMessage(Message.obtain(handler, ... (this.getHeight() / y));
drawimage(x_aux, y_aux);
Lập trình Android – http://laptrinhdidong.vn Page 9
Trung tâm Tin học – ĐH KHTN
GAME...
... android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_height="0dip"
android:layout_weight="1" />
Lập trình Android – http://laptrinhdidong.vn Page 1
Trung tâm ... xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"...
... màn hình đen
có 2 Button, bạn chọn Add gesture và tự định nghĩa :
Lập trình Android – http://laptrinhdidong.vn Page 1
Trung tâm Tin học – ĐH KHTN
Tạo xong thư viện bạn tạo tiếp ứng dụng như sau:
1/ ... Activity: MainActivity
2/Trong file main.xml các bạn thiết kế như sau:
Lập trình Android – http://laptrinhdidong.vn Page 3
Trung tâm Tin học – ĐH KHTN
Mọi ý kiến đóng góp các bạn vui lò...
... từ các bạn.
Lập trình Android – http://laptrinhdidong.vn Page 11
Trung tâm Tin học – ĐH KHTN
Game đếm số
Project name: GameHinhCuaDac
Build Target: Android 2.3.3
Application name: GameHinhCuaDac
Package ... null){
return;
Lập trình Android – http://laptrinhdidong.vn Page 6
Trung tâm Tin học – ĐH KHTN
android:paddingTop="30px"
android:layout_width="match_parent"
a...
... file hình ảnh, âm thanh khác các bạn download Project để tìm hiểu
thêm.
Lập trình Android – http://laptrinhdidong.vn Page 10
Trung tâm Tin học – ĐH KHTN
Game đếm số
Project name: GameDemSoCuaDac
Build ... }
Lập trình Android – http://laptrinhdidong.vn Page 8
Trung tâm Tin học – ĐH KHTN
android:layout_marginLeft="10px"
android:text="1"
android:textSize=&qu...