how to find out if device keypad is expanded or not.

sidharthgautamsidharthgautam USMember ✭✭

how to find out if device keypad is expanded or not.
I know about DismissKeyBoard() method to minimize keyboard but it's return type is void so can not figure out if the keypad is/was expanded or not

Answers

  • CharwakaCharwaka INMember ✭✭✭✭✭

    Hi @sidharthgautam

    you can check this by putting a bool property ,From InputMethodManager you can know keyboard is open or not like this

    InputMethodManager imm = (InputMethodManager)GetSystemService(Context.InputMethodService);
     if (imm.isAcceptingText()) {
            Log("Software Keyboard was shown"); 
        } else {
            Log("Software Keyboard was not shown");
        }
    
  • sidharthgautamsidharthgautam USMember ✭✭

    Hi Charwaka,
    Actually I am looking for the solution in UITest, You might be talking from Dev. perspective. Do you have any idea how to verify this using REPL?

Sign In or Register to comment.