i am trying to set request focus to edittext of my alertdialog box but it didnt show me the keyboard i have added the code follow. I have also set the requestFocus() to the edittext But it didnt display anything.
 mHolder.txt_lName.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    getmenuname = firstName.get(pos);
                    AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);
                    alertDialog.setTitle("Select Quantity");
                    alertDialog.setMessage("Enter Quantity");
                    final EditText input = new EditText(mContext);
                    input.setInputType(InputType.TYPE_CLASS_NUMBER);
                    input.setKeyListener(DigitsKeyListener.getInstance("0123456789."));
                    input.requestFocus();
                    input.setFocusable(true);
                    int maxLength = 4;
                    InputFilter[] fArray = new InputFilter[1];
                    fArray[0] = new InputFilter.LengthFilter(maxLength);
                    input.setFilters(fArray);
                    LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
                            LinearLayout.LayoutParams.MATCH_PARENT,
                            LinearLayout.LayoutParams.MATCH_PARENT);
                    input.setLayoutParams(lp);
                    alertDialog.setView(input);
                    alertDialog.setPositiveButton("YES",
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int which) {
                                  /*  int a = Integer.parseInt(mHolder.txt_lName.getText().toString());
                                    int b = Integer.parseInt(input.getText().toString());
                                    //int c = Integer.parseInt(taxEditText.getText().toString().toTrim());
                                    int result = a + b ;*/
                                    updatedquantity = input.getText().toString();
                                    if (updatedquantity.matches("")) {
                                        //Toast.makeText(mContext, "You did not enter a quantitiy", Toast.LENGTH_SHORT).show();
                                        input.setError("You did not enter a quantitiy");
                                        return;
                                    } else {
                                        //mHolder.txt_lName.setText(updatedquantity);
                                        getupdateQuantity(getmenuname);
                                        ((DisplayActivity) mContext).displayData();
                                        dialog.cancel();
                                    }
                                }
                            });
                    alertDialog.setNegativeButton("NO",
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int which) {
                                    dialog.cancel();
                                }
                            });
                    alertDialog.show();
                }
            });
        } else {
            mHolder = (Holder) child.getTag();
        }
        //mHolder.txt_id.setText(id.get(pos));
        mHolder.txt_fName.setText(firstName.get(pos));
        mHolder.txt_lName.setText(lastName.get(pos));
        return child;
    }
 
    