this is android source code of dialog box. but their is an problem that another case (from 0 and 1)  is not working properly.