Is is it possible to make custom Text Fields in corona? How is this done?
Jump to content
To be honest with you, I have yet to test my app on a physical device, so unfortunately, I don't really know what the text fields look like across platforms, other than the way they look in the simulator. What I mean by "custom" is just changing the way the text fields look, so "custom" aesthetics/presentation really, e.g. rounded corners, labels inside of the text field... That sort of thing.
At the end of the day, native.newTextField() is going to give you a rectangle that you can type in to. You can change the color of the box and the font and size and they are always on top of your display objects.
If you want a rounded rectangle, or some decor on the shape of the box, you have to make the background invisible and have your art underneath the box. On OS X you are going to get a blue border around the active text field, but this does not show up on devices.
Here is an example using rounded rectangles as Rob mentioned. You can elaborate on this by using images or whatever you want to do.
Screenshot (Android device):
(Note: You can't test this on the Windows Simulator because it doesn't support the 'hasBackground' option).
Community Forum Software by IP.Board