0

i have a edittext which is successfully positioned above the sofware-keyboard when it is open. The Problem is that when the keyboard opens, the keyboard is visible and after about 2 sec the edittext is positioned. How kann i make that the edittext, which is displayed at the bottom of the page until the keyboard opens, is animated with the keyboard up?

1 Answers1

0

Use ScrollView in your Parent Container of Edittext

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <LinearLayout
            android:layout_width="match_parent" 
            android:layout_height="match_parent">
        <EditText 
                android:layout_width="match_parent" 
                android:layout_height="match_parent"/>
    </LinearLayout>

</ScrollView>

and add this to your activity in AndroidManifest

android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden|adjustResize"
Rashid
  • 1,465
  • 16
  • 47