The following is the first few sections of a chapter from Exploring Android, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
Next up is to configure the action bar to our ToDo application. The action bar is that bar at the top of your activity UI, showing your app’s title. It can also have toolbar-style buttons and an “overflow menu”, each holding what are known as action items. In this tutorial, we will add an action bar item to launch an “about” page, though we will not actually show that page until a later tutorial.
This is a continuation of the work we did in the previous tutorial. The book’s GitHub repository contains the results of the previous tutorial as well as the results of completing the work in this tutorial.
Starting in this tutorial, we will begin editing Java source files. Some useful Android Studio shortcut key combinations are:
importstatements, including removing unused imports.
NOTE: Copying and pasting Java code from this book may or may not work, depending on what you are using to read the book. For the PDF, some PDF viewers (e.g., Adobe Reader) should copy the code fairly well; others may do a much worse job. Reformatting the code with Ctrl-Alt-L (Command-Option-L on macOS) after pasting it in sometimes helps.
This tutorial assumes that you have learned the basics of the action bar elsewhere. That could be:
The preview of this section is being chased by zombies.
The preview of this section is en route to Mars.
The preview of this section was eaten by a grue.
The preview of this section took that left turn at Albuquerque.
The preview of this section will not appear here for a while, due to a time machine mishap.
The preview of this section is presently indisposed.