Creating a SeparatorField
is as simple as creating a field can possibly be. All you have to do is create the object and add it to the screen. Most of the time it's not even worth creating a variable to store a reference to the Field
object. Just add the following line to the createFields
method and run the application.
add(new SeparatorField());
When you run the application the screen will look boring and somewhat confusing because the SeparatorField
can hardly be seen. The field is in fact the small black line under the title portion of the screen. Can you see it? It is very easily missed because it almost looks like it is supposed to be there already. Remember, there is a field at the top of the screen, which is the title, and is provided as part of the MainScreen
framework code.
Putting the SeparatorField
first may not have been the best way to show the field, but this is by far the simplest field and so is a good starting point...