I have an activity which is basically a form. When the user selects an edittext, the activity either obscures part of the form (including the submit butt开发者_如何学运维on) or tries to readjust which doesnt work because the only scrollable area is the form itself - everything else is pretty tightly bound with weights. I have used "android:windowSoftInputMode" to try and adjust it to either resize or panning but both don't work due to the outcome above.
What I am looking for is that the keyboard is shown and whether the activity is hidden or not - the user can still scroll up and down in the activity to see other parts of the form while the keyboard is showing. Is this possible?
Thanks in advance.
ya that should be possible, i have an activity that does the same thing as what you seem to be trying. all i have is a ScrollView with a bunch of children layouts and widgets. and any time the keyboard comes up, i dont have a problem.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent" android:id="@+id/abstractWorkOrderParentLayout" android:layout_height="match_parent" android:orientation="vertical">
****ALL WIDGETS GO HERE****
</LinearLayout>
</ScrollView>
i have at least 20 more widgets aligned vertically in abstractWorkOrderParentlayout and the scrolling works as i think you want it to
精彩评论