simple code to display AlertDialog with multipleLines in a singlerow..in Android

cardBillingAddressEditText.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
                  if(mArrayList.size()>0)
                     {
                  System.out.println("-------onClick(cardBillingAddressEditText)-----");
                  builder = new AlertDialog.Builder(DummyProject.this);
                  builder.setTitle("Select BillingAddrs from List");
                  builder.setSingleChoiceItems(carBillingAdrsStringArr, -1, new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int item) {
                         // AddressID=Integer.parseInt(addressArrayList.get(item));
                          nameAddressID=carBillingAdrsStringArr[item];                           
                          //cardBillingAddressEditText.setError("",d);
                          cardBillingAddressEditText.setText(nameAddressID);
                          dialog.cancel();//to Hide the list
                      }
                  });
                  alert = builder.create();
                     alert.show();
              // }//if...
              }
         });

Comments

Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android