Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show keyboard on PopupWindow?

I am using PopupWindow class and on PopupWindow I have one EditText, my problem is that when PopupWindow is visible and I click on EditText at that time the soft keyboard is not visible and I am not able to enter Input. Can anybody tell me how to solve this problem?

like image 271
user446366 Avatar asked Nov 27 '22 23:11

user446366


1 Answers

When you create a new PopupWindow, use another constructor method, you must set the focusable = true; only the view could be focusable, the soft keyboard will show .

public PopupWindow(View contentView, int width, int height, boolean focusable) {}

The Default focusable is 'false'

like image 66
Xianfeng.Cai Avatar answered Dec 13 '22 17:12

Xianfeng.Cai