# TIP: Don't Put Text Fields in Dialogs

DevFeed: [TIP: Don't Put Text Fields in Dialogs](<https://devfeed.tech/articles/tip-don-t-put-text-fields-in-dialogs-19573.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/tip-dont-put-text-fields-in-dialogs/>)

Author: Shai Almog

Published: 2017-06-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [dialog](<https://devfeed.tech/topics/dialog.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [simulator](<https://devfeed.tech/topics/simulator.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [native](<https://devfeed.tech/tags/native.md>), [simulator](<https://devfeed.tech/tags/simulator.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This tutorial explains why text fields in dialogs can behave poorly when the virtual keyboard appears. Dialogs may not resize, move, or scroll adequately, leaving fields unreachable, especially on Android. It recommends testing by rotating a phone simulator and suggests using a deeper form instead of a dialog for editing groups of fields.

## Source excerpt

Text input is a very special case. Besides mixing the native and Java code we also need to deal with the appearance of the virtual keyboard which doesn't act consistently across platforms. This creates many complex edge cases that are just as problematic on native OS platforms as they are in Codename One. When we show a virtual keyboard there are two main scenarios that can take place: