Đêm khuya lặng lẽ
Mưa rơi khe khẽ
Tay cầm chuột...
Ta vẽ ...
Những đường kẽ ...
.........Xong hình cần vẽ
Bỗng ...
Chấm sáng... đốm sáng...
Nghĩ đến ma...
sờ sợ. tắt máy đi ngủ. hết ngày cũ....
AlertDialog.Builder myAlertDialog = new AlertDialog.Builder(AndroidAlertDialog.this);
myAlertDialog.setTitle("--- Title ---");
myAlertDialog.setMessage("Alert Dialog Message");
myAlertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
// do something when the OK button is clicked
}});
myAlertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
// do something when the Cancel button is clicked
}});
myAlertDialog.show();(Suu tam).
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8dp" >
<Button
android:id="@+id/buttonViewContacts"
android:text="View Contacts"
android:layout_width="fill_parent"
android:layout_height="40px" >
</Button>
<Button
android:id="@+id/buttonViewCallLog"
android:text="View Call Log"
android:layout_width="fill_parent"
android:layout_height="40px" >
</Button>
<Button
android:id="@+id/buttonViewGallery"
android:text="View Gallery"
android:layout_width="fill_parent"
android:layout_height="40px" >
</Button>
<Button
android:id="@+id/buttonViewPhone"
android:text="View Phone Call"
android:layout_width="fill_parent"
android:layout_height="40px" >
</Button>
</LinearLayout>
package com.example.intends;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class Intends extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button buttonContacts = (Button) findViewById(R.id.buttonViewContacts);
buttonContacts.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setData(android.provider.Contacts.People.CONTENT_URI);
startActivity(i);
}
});
Button buttonCallLog = (Button) findViewById(R.id.buttonViewCallLog);
buttonCallLog.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent();
i.setAction(Intent.ACTION_CALL_BUTTON);
startActivity(i);
}
});
Button buttonGallery = (Button) findViewById(R.id.buttonViewGallery);
buttonGallery.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setData(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);
startActivity(i);
}
});
Button buttonPhone = (Button) findViewById(R.id.buttonViewPhone);
buttonPhone.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent();
i.setAction(Intent.ACTION_DIAL);
startActivity(i);
}
});
}
}
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. ...