Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

Why not try to add a ScrollView to wrap whatever it is you want to scroll. Here is how I have done it, where I actually leave a header on top which does not scroll, while the dialog widgets (in particular the EditTexts) scroll when you open soft keypad.

<LinearLayout android:id="@+id/HeaderLayout" > <!-- Here add a header or whatever will not be scrolled. --> </LinearLayout> <ScrollView android:id="@+id/MainForm" > <!-- Here add your edittexts or whatever will scroll. --> </LinearLayout>ScrollView> 

I would typically have a LinearLayout inside the ScrollView, but that is up to you. Also, setting Scrollbar style to outsideInset helps, at least on my devices.

Why not try to add a ScrollView to wrap whatever it is you want to scroll. Here is how I have done it, where I actually leave a header on top which does not scroll, while the dialog widgets (in particular the EditTexts) scroll when you open soft keypad.

<LinearLayout android:id="@+id/HeaderLayout" > <!-- Here add a header or whatever will not be scrolled. --> </LinearLayout> <ScrollView android:id="@+id/MainForm" > <!-- Here add your edittexts or whatever will scroll. --> </LinearLayout> 

I would typically have a LinearLayout inside the ScrollView, but that is up to you. Also, setting Scrollbar style to outsideInset helps, at least on my devices.

Why not try to add a ScrollView to wrap whatever it is you want to scroll. Here is how I have done it, where I actually leave a header on top which does not scroll, while the dialog widgets (in particular the EditTexts) scroll when you open soft keypad.

<LinearLayout android:id="@+id/HeaderLayout" > <!-- Here add a header or whatever will not be scrolled. --> </LinearLayout> <ScrollView android:id="@+id/MainForm" > <!-- Here add your edittexts or whatever will scroll. --> </ScrollView> 

I would typically have a LinearLayout inside the ScrollView, but that is up to you. Also, setting Scrollbar style to outsideInset helps, at least on my devices.

Source Link
zmilojko
  • 2.1k
  • 17
  • 27

Why not try to add a ScrollView to wrap whatever it is you want to scroll. Here is how I have done it, where I actually leave a header on top which does not scroll, while the dialog widgets (in particular the EditTexts) scroll when you open soft keypad.

<LinearLayout android:id="@+id/HeaderLayout" > <!-- Here add a header or whatever will not be scrolled. --> </LinearLayout> <ScrollView android:id="@+id/MainForm" > <!-- Here add your edittexts or whatever will scroll. --> </LinearLayout> 

I would typically have a LinearLayout inside the ScrollView, but that is up to you. Also, setting Scrollbar style to outsideInset helps, at least on my devices.