Making Simple Toast Notification
Senin, 04 April 2011
0
komentar
In .java file, put the following code:-
import android.widget.Toast;
public class activityTestToast extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//this line will pop up the message when the application is created
Toast.makeText(this, "Cikucak!!", Toast.LENGTH_SHORT).show();
}
}
NOTE:-
1. Replace the work "Cikucak" with any message you prefer.
2. Try LENGTH_SHORT or LENGTH_LONG and see the difference
It's quite simple, right?
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Making Simple Toast Notification
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://androidemoticonss.blogspot.com/2011/04/making-simple-toast-notification.html. Terima kasih sudah singgah membaca artikel ini.Ditulis oleh Unknown
Rating Blog 5 dari 5
0 komentar:
Posting Komentar