how to make the setError() method diplay the error message for long time period?
<p>When i validate the EditText in adialog and displaying an error message for the user to enter his/here name in case of not entering the name by using setError() method the error message displayed for very short time and then the dialog closed .
I have been used the custom dialog  to solve the peroblem but i dont like its appearance i prefer using the normal dialog  , my question is that when the user click the ok button without entering his name there is a way to make the error message display for long time then the dialog closed   using the normal dialog? </p>

<p>this is my code     </p>

<pre><code>name_btn.setOnClickListener(new View.OnClickListener() {    
    public void onClick(View v) {       

    }
});  

protected Dialog onCreateDialog(int id)
{
    switch (id) {
        case Name_Dialog_ID:
        LayoutInflater factory = LayoutInflater.from(this);
        final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null);
        name = (EditText) textEntryView.findViewById(R.id.nameETDialog);

        return new AlertDialog.Builder(this)
            .setTitle(" please enter your name ")
            .setView(textEntryView)
            .setPositiveButton("ok", new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {

                    //validate the name 
                    if( name.getText().toString().length() == 0)     
                        name.setError( " your name is requiered" );
                    else
                    { 
                        EditText nametext=(EditText)findViewById(R.id.name_text);
                        nametext.setText(name.getText().toString());
                        Toast.makeText(getBaseContext(), 
                            "your name has been entered                  ", 
                            Toast.LENGTH_SHORT).show();                           
                    }
                }
                })

        .setNegativeButton("cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                Toast.makeText(getBaseContext(), "Cancel Clicked", Toast.LENGTH_SHORT).show();
            }
        })
        .create();
    }
    return null;
}
</code></pre>
