2014-05-19 2 views
-1

자바의 프로젝트에서 오류를 표시하려고하지만 ProgressDialog를 찾았지만 진행을 원하지 않습니다. 내가 할 수있는 일은 무엇인가? boxMessage 안드로이드에서 디스플레이 오류

  if(login.getText().toString().length()>=5){ 
       nameValuePairs = new ArrayList<NameValuePair>(3); 
       nameValuePairs.add(new BasicNameValuePair("login", login.getText().toString())); 
       nameValuePairs.add(new BasicNameValuePair("email", email.getText().toString())); 
       nameValuePairs.add(new BasicNameValuePair("password", password.getText().toString())); 

       httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 
       response = httpclient.execute(httppost); 
      }else{ 
       pDialog = new ProgressDialog(Registration.this); 
       pDialog.setMessage("Login must contains more than 5 characters"); 
       pDialog.setIndeterminate(false); 
       pDialog.setCancelable(true); 
       pDialog.show(); 
      } 

+1

는'AlertDialog' – laalto

+0

사용'AlertDialog'을 고려 감사드립니다. –

+0

'AlertDialog'또는 'Toast'를 사용하십시오. – Apoorv

답변

0
AlertDialog.Builder ErrorMSg = new AlertDialog.Builder(this); 
TextView Error = new TextView(this); 
Error.setText("Login must contains more than 5 characters"); 
Error.setGravity(Gravity.CENTER_HORIZONTAL); 
ErrorMSg.setView(Error); 
관련 문제