Dialog on Android KitKat seems to be cut

android, android-4.4-kitkat, dialog

Solution

You can solve the problem to be cut from below code.

dialog.getWindow().setFlags(
    WindowManager.LayoutParams.FLAG_FULLSCREEN, 
    WindowManager.LayoutParams.FLAG_FULLSCREEN);

Problem

I used dialog theme for an Activity and it works fine on Android <= 4.3 but not on the latest KitKat 4.4. Here's a screenshot of the problem: Top of the layout is missing. You can see that the bounds seems to be cut. I'm using an Android emulator to test the app, so I don't know if the problem is due to the virtual machine or due to some other reason.

Original source