1. ProgressDialog

setMessage로 세팅하고,

show로 보여주고 dismiss로 안보여주고...


1
2
3
4
5
6
7
8
9
10
static ProgressDialog dialog;
 
dialog = new ProgressDialog(this);
        dialog.setMessage(string);
        dialog.show();
    }
)
 
dialog.dismiss();
   
cs


2. Toast

Toast는 첫번째 매개변수에 Context를 넣어야하는데 GetApplicationContext()를 사용하여 해당 Context를 받아 오도록하자

Toast.LENGTH_SHORT와 LONG가 있는데 취향에 맞춰 골라 쓰세요.


1
2
 Toast.makeText(getApplicationContext(), "Test",Toast.LENGTH_SHORT).show();
 
cs


'Programming > Android' 카테고리의 다른 글

Intent와 Intent Filter  (0) 2016.08.26
어플 패키지명  (0) 2016.08.25
HttpURLConnection  (0) 2016.08.25
SharedPreferences  (0) 2016.08.24
Context  (0) 2016.08.24

+ Recent posts