问题
I am using this link! for cropping an image and after getting the cropped image somehow whole layout moves about 20dp upwards and hides behind the status bar (this is random behaviour i.e happens sometimes) I tried many things to fix this problem but couldn't get to the solution, mainly because I dont know what is causing the problem.
This is a device specific problem, occurs occasionally in galaxy s and htc desire but frequently on samsung Ace. I tested app on samsung note and htc desire HD it works fine no such problem in these devices.
There is one more thing I should mention here that is: when layout hides under the status bar if I popup the keyboard by clicking on textfield layout gets back to normal i.e hidden area gets visible again.
I cannot attach the image but found similar question Android - Status bar hides part of view sometimes exactly this is the behaviour of my layout.
Note:Recently i found out that camera activity is causing the layout to move upwards. To verify this start camera in samsung Galaxy Ace and just press back and note the layout movement in icons of home screen.
回答1:
I have fixed the problem by using crop method inside the camera activity check this Set Camera Size - Parameters vs Intent? last answer of the post helped me to solve the issue.
来源:https://stackoverflow.com/questions/15600450/androidlayout-move-upwards-about-20dp-area-from-the-top-hides-behind-the-stat