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 8047383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:04:41+00:00 2026-06-05T06:04:41+00:00

I have an OpenGL SurfaceView in my activity and I’m using keyboard to enter

  • 0

I have an OpenGL SurfaceView in my activity and I’m using keyboard to enter some text (send it over the wire). There is no EditText present, so I am forcing the keyboard to be shown using:

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

The activity has defined attribute android:windowSoftInputMode="adjustResize" and this works great in portrait mode, where when keyboard is shown, layout is being resized (and hence the surfaceview as well). It is not happening in landscape mode though, which makes part of the surfaceview (actually, most of it) obscured. The surfaceview implements panning and zooming, so it would be great if I could at least know the size of the keyboard being displayed and reposition the surfaceview accordingly.

Is there a way to make softkeyboard behave in landscape the same way as it does in portrait mode (meaning that it will resize my layout)? If not, is there a way to get the height of the keyboard (apparently in full screen)?

  • 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-05T06:04:43+00:00Added an answer on June 5, 2026 at 6:04 am

    With the help of android-developers newsgorup, I was able to solve this problem by using an override on the view (onCreateInputConnection). See original thread.

    @Override
    public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
      InputConnection connection = super.onCreateInputConnection(outAttrs);
      outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_FULLSCREEN;
      return connection;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an opengl scene rendering on an EAGLView layer and some other elements
So I have some openGL code (such code for example) /* FUNCTION: YCamera ::
i have made a small opengl program using the d programming language. what i
I have an OpenGL view of which I am recording a video using what
I have some OpenGL code that behaves inconsistently across different hardware. I've got some
I have an opengl game for iPhone/iPad (universal). I added the ability to send
I have a strange situation. I'm using NexPlayer to render streaming video in openGL
I have a question with alpha blending in openGL... I've tried some stuff for
I have simple OpenGL C program (from NeHe lesson 2 ). There is initialization
I have an opengl program and I am using SDL for the window creating

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.