1

I have created custom popup with edittext on it, while i am trying to write something in edittext soft keyboard is not appearing,

my code,

public void popUpCreateList(final View v) {

    View popupView;

    final EditText et_list_name;
    Button b_add;

    LayoutInflater layoutInflater = (LayoutInflater) mContext
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    popupView = layoutInflater.inflate(R.layout.dialog_create_list, null);
    popup_create_list = new PopupWindow(popupView,
            WindowManager.LayoutParams.FILL_PARENT,
            WindowManager.LayoutParams.FILL_PARENT, false);

    et_list_name = (EditText) popupView
            .findViewById(R.id.dialog_friend_create_list_edt_list_name);
    b_add = (Button) popupView
            .findViewById(R.id.dialog_friend_create_list_btn_add_list);


    new Handler().postDelayed(new Runnable() {

        public void run() {
            popup_create_list.showAtLocation(v, Gravity.NO_GRAVITY, 0, 0);
            popup_create_list.update();
            popup_create_list.setFocusable(true);
        }

    }, 100L);



}

Help me to resolve the problem, Thanks in advance.

Rajesh Panchal
  • 1,140
  • 3
  • 20
  • 39

1 Answers1

2

You can try this .

  1. Your_EditText_Obj.requestFocus();

  2. Your_EditText_Obj.setFocusable(true);

  3. Did you set android:windowSoftInputMode="stateVisible

Soft keyboard doesn't appear

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198