How to keep header when the soft keyboard comes in with full screen?

360 Views Asked by At

I have a header on a chat that move up every time you click on EditText, and disappear,

To fix this problem, I added on Oncreate this

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

that works perfect, but when I add this one UIt doesnt work

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

That line make the activity full screen, I tryed to add in the manifest instead but It doesnt work, It sound like if you use one, you cant use the other...

Any ideas how to solve this?

P.D: I tested with adjustPan, and some many things...

1

There are 1 best solutions below

1
On

Please Edit your Manifest.xml file and add this to your Chat Activity's Tag:

<activity
 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
 ...
</activity>


By using this, you will not need to use getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); and this will solve your problem.