Question

Well problem is similar that Keyboard is hiding my edit text but is there some way to handle the virtual keyboard setting from my layout xml file or fragment class rather that from android manifest file.

For example: we use android:windowSoftInputMode="adjustPan" from manifest file. What can we do if we want to change it from my layout xml file or from my fragment java class file. This requirement is simply because I need different behavior on different screens. an d above code adjust complete activity.

Note: In my app each screen is divided into two part with one part changing and is fragment, and other part menu. I don't want menu part to be disturbed only fragment portion can shift when keyboard appears. I have already used getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); from my fragment class. And result is same i.e. for complete activity.

Please help. Thanks in advance.

Was it helpful?

Solution 2

What I can suggest you is to use "adjustPan" as it is, how you are using it, so that Your entire layout shift upwards, and editText comes to focus. And put your menu portion into scrollview, so that user can scroll that also, when he wants any info from your menu part. This Will overcome both your problem. I know this not the solution you wanted and this is a workaround. but hope this helps.

OTHER TIPS

May be this is useful for you..

http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions


set in edittext in layout.xml file

android:imeOptions="flagNoExtractUi"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top