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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:41:46+00:00 2026-05-16T03:41:46+00:00

I have a layout which has one large EditText view at the top +

  • 0

I have a layout which has one large EditText view at the top + a bunch of buttons at the bottom. The EditText is made to shrink and expand when the ime is activated/deactivated by using adjust_resize. The buttons at the bottom are pushed up above the ime.

I would like to hide these buttons when the ime displays, to provide enough space for the EditText view.

I have so far tried the following:

  • subclassed EditText and provided the activity the option to register a callback on the view’s OnSizeChanged.

  • Used this callback to change the visibility of the buttons (actually the layout container) to GONE.

This work OK and does hide the buttons when the ime pops up.
However, the EditText does not expand into the new available space.
Furthermore, when the ime is disposed off, the EditText field is now bigger than it was originally, pushing (the now showing) buttons outside the screen.

I should also add that when typing the first letter into the view, and the ime displays the word options, the screen is redrawn and the EditText fills the vacant space.

Any ideas on how to get this to work?
Or even better, is there a simpler solution to my requirement?

Thanks…

NB: In my view, scrolling is not a good option.

  • 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-05-16T03:41:47+00:00Added an answer on May 16, 2026 at 3:41 am

    I got this to work by changing the above method a bit:

    • Wrapped the entire layout with a FrameLayout

    • subclassed the FrameLayout and provided the activity the option to register a callback on the layout’s OnMeasure

    This gives the activity a chance to change visibility of views before these are measured.

    I would still be very happy to hear about simpler solutions, especially in regards to figuring out whether the keyboard is currently visible or not.
    (dumpsys window shows this information. Can we easily get to it?)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a XML layout which has two edit text fields, one for title
I have created following layout.which has two relative layouts and one scrollview ,following code
I have a layout which it has two partial views, one for LogIn and
I have a vertical LinearLayout which has a list view and one ImageView at
I have in my layout a button, which is has to change image when
I have an alternate homepage template, homepage.pt, which has a different layout. When I
I have a layout setup which can be view here: http://jsfiddle.net/Pn3ts/ It all works
I need to have a single <li> element which has two buttons inside of
We have a large ASP.Net website that has a single css stylesheet which is
I have a layout that is working, but it has one very annoying problem..

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.