I have a layout with scroll view as root layout with one linear layout as child with vertical orientation. I add a list of edit text dynamically in linear layout onCreate of ac
In your Manifest file add the following code for this particular activity
<activity android:windowSoftInputMode="adjustPan">
or
Activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
<activity
android:name=".ActivityName"
android:screenOrientation="nosensor"
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
Use nosensor if you want to use the app only for portrait modes. Use stateAlwaysHidden in the if you don't want android to pop that keyboard up everytime your activity opens.
Check out this link the official documentation and check other stackoverflow answers.