Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8831689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:22:01+00:00 2026-06-14T08:22:01+00:00

I am creating an webview and I need to force the softkeyboard when any

  • 0

I am creating an webview and I need to force the softkeyboard when any input is focused in the webpage.

I have tried many things that I found and nothing seems to work.

I have tried:
1)

InputMethodManager imm = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); 
 imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

2)

webView.requestFocus(View.FOCUS_DOWN);
 webView.setOnTouchListener(new View.OnTouchListener()
   {
    @Override
     public boolean onTouch(View v, MotionEvent event)
    {
      switch (event.getAction())
      {
        case MotionEvent.ACTION_DOWN:
        case MotionEvent.ACTION_UP:
            if (!v.hasFocus())
            {
                v.requestFocus();
            }
            break;
       }
      return false;
    }
   });

And some other things.

I managed to make it work on a samsung with root but in my nexus 7 also with root i can’t.

Any help would be apreciated.
Thx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:22:02+00:00Added an answer on June 14, 2026 at 8:22 am

    You could detect if there is a keyboard present, and if not show softkeyboard for the needed view/item

    sample code:

    if (getResources().getConfiguration().keyboard == 0)
    {
         InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
         imm.showSoftInput(** view/item **, InputMethodManager.SHOW_IMPLICIT); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webview that I'm creating in an Activity which is a child
I need help creating an object for this declare UIWebView *webView; I thought it
I am trying to attach a UITapGestureRecognizer to a webview that i am creating
I am creating the custom control in android. That custom control should have the
I have a WebView that I want to save as a WebArchive. I just
I'm creating a sample webpage with button..this webpage am calling in Android using webview.
When I build my project (any project, really - I tried creating a new
I'm creating video music search in android WebView and I wanted users can launch
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a JApplet I have 2 Text Fields, a button and a Text Area.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.