简体   繁体   中英

Issues with Android soft-keyboard interaction

I am designing an Android app and I'm having a couple of layout issues.

I have a screen with 3 EditTexts on it in a row, and I would like for the 'next' key on the soft keyboard to cycle between the EditText fields. As for now, the 'next' key has no effect.

Also, when the soft keyboard is displayed, it covers up the third of the EditTexts. Is there any way to push up the layout in the event that the soft keyboard is drawn?

Thanks!

For the second problem, on your <activity> element of the AndroidManifest.xml use android:windowSoftInputMode="adjustResize" :

<activity android:name=".YourActivity"
          android:windowSoftInputMode="adjustResize">
</activity>

Make sure you have wrapped the content of your layout into a ScrollView , so that it will be easily browsable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM