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