Android Adapter Toolbar after windowsoftinputmode= "Adjustresize" does not take effect

Source: Internet
Author: User

First, the discovery of the problem of the project is suitable for the latest Android Materialdesign, one of the most important changes is to replace the Actionbar toolbar, if you do not understand the toolbar can refer to this article for toolbar, please see This article because we want to replace Actionbar with toolbar, so the first thing we want to do is to hide actionbar, we declare in theme
<style name= "Apptheme" parent= "Theme.AppCompat.Light.NoActionBar" >
....
After toolbar, we have an interface like this

That is, there is a menu bar at the bottom, the keyboard pops up when the menu bar is on the top, normally, we only need to androidmanifest the corresponding activity under the declaration:
            
Can take care of it.
However, after the adaptation of the toolbar, the fact that it does not come into effect ...
Second, solve the problem Google, the simple solution said is this, plus a property
Android:fitssystemwindows= "true"

Although it can take effect, but. Toolbar the height of the statusbar, which means the statusbar is all white. It seems that this is not going to continue Google.
Found this http://stackoverflow.com/questions/7417123/. Android-how-to-adjust-layout-in-full-screen-mode-when-softkeyboard-is-visible
The solution with the highest score
It can be solved perfectly on Samsung, but the bottom menu bar and keyboard on the 5.0 system and Meizu phone have a height of about 50px, not perfect fit ... Nima
Continue Google to find this http://stackoverflow.com/questions/21092888/ Windowsoftinputmode-adjustresize-not-working-with-translucent-action-navbar customizes a layout to inherit your root layout. Overrides the Fitsystemwindows method and declares fitsystemwindows= "true" in the root layout
It's a bit of a hassle, but the 4.3-5.0 system in Samsung and Meizu and Nexus 5 can be perfectly adapted.

Android Adapter Toolbar after windowsoftinputmode= "Adjustresize" does not take effect

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.