Add android:windowSoftInputMode="adjustResize"
to the <activity>
tag in your AndroidManifest.xml. This will cause the screen to be resized to the space left over after the software keyboard is shown. As a result, you will be able to scroll, since the screen will not be covered by the keyboard in any way.
EDIT:
I have written a minimal example and tested it. Unless there is a huge misunderstanding, try this code and then figure out why yours doesn't work:
xml layout:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_height="2000dp"
android:layout_width="wrap_content"
android:gravity="top"
android:text="Scroll Down!"/>
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:hint="Enter Text"
/>
</LinearLayout>
</ScrollView>
manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="15"/>
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="MyActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…