사용자가 장치에서 뒤로 버튼을 클릭 할 때 호출되는 경고 대화 상자가 있지만이 경고가 너무 짧고 사용자가 그 안에 아무것도 읽지 않거나 아무 것도 읽을 수없는 경우 호출됩니다.알림 대화 상자의 길이가 짧음
AlertDialog alertDialog = new AlertDialog.Builder(birthDate.this).create();
// Setting Dialog Title
alertDialog.setTitle("Alert Dialog");
// Setting Dialog Message
alertDialog.setMessage("Welcome to AndroidHive.info");
// Setting OK Button
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Write your code here to execute after dialog closed
Toast.makeText(getApplicationContext(), "You clicked on OK", Toast.LENGTH_LONG).show();
}
나는 더 이상이 경고 대화
당신은 토스트 나 alertDialog의 기간을 의미합니까? alertdialog는 여기에서 코드를 닫지 않으므로 (dismiss() 메소드를 호출하지 않았 음), 축배에 대해 duration의 param을 10000ms (10 초)로 지정할 수 있습니다. – Houcine
이것을 살펴보십시오 http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long – user1840039
경고 대화 또는 토스트에 대해 말하는 날씨를 설명 할 수 있습니까? – Sameer