Toast 메세지 띄우기
Android 2015. 1. 2. 10:12public static Toast makeText (Context context, int resId, int duration)
Make a standard toast that just contains a text view with the text from a resource.
context The context to use. Usually your Application or Activity object.
resId The resource id of the string resource to use. Can be formatted text.
duration How long to display the message. Either LENGTH_SHORT or LENGTH_LONG
ex)
Toast.makeText(this, "Toast Test", Toast.LENGTH_SHORT).show();
로 쓸수 있당. 뒤에 .show(); 를 꼭 붙여야지 안그럼 이클립스에서 안붙인거 아니냐고 묻는다.
Toast.LENGTH_SHORT - 3초 가량 보여줌
Toast.LENGTH_LONG - 5초 가량 보여줌