0

I have a layout something like this -

<Relativelayout

<ScrollView
           <LinearLayout>
            </LinearLayout>
</ScrollView>

<LinearLayout>
</LinearLayout>

</Relative>

If you want to look at full code it is here

The problem is that whenever soft keyboard is visible on screen the linear layout below ScrollView lifts up and blocks the view inside of ScrollView .

What I want is that if soft keyboard is visible nothing lifts up but I can still scroll through ScrollView.

EDIT

May be i was not clear before ....as everybody is saying to change this

android:windowSoftInputMode to

adjustPan | adjustResize or combnation of state and adjust values

I already did this ..this prevents lifting up of LinearLayout below the ScrollView but it also blocks scrolling feature of ScrollView .

EDIT 2

as @WritingForAnroid suggests in answer i made ScrollView parent view in layout and that solved my problem but then as scrollview always takes height in wrap_content manner so bottom view that was previously aligned with the bottom of screen is not aligned now so how do i align bottom view with bottom of screen if ScrollView is parent view .

ScreenShot - ScreenShot

Please help ! Thanks in advance.

Devansh Kumar
  • 1,364
  • 1
  • 13
  • 26

2 Answers2

0

Make Scrollview as parent view and add this line to your activity in manifest file

android:windowSoftInputMode="adjustResize"

  • ok your method works...but now this happened - [this](http://imgur.com/a/xJX8X)....How do i make bottom view to be aligned with bottom of screen – Devansh Kumar Sep 09 '16 at 12:32
0

Change this

android:windowSoftInputMode="adjustResize"

To

android:windowSoftInputMode="adjustPan"

Rahul
  • 139
  • 8