O'Reilly logo

Hello, Android, 4th Edition by Ed Burnette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an About Box

Many apps have a button where you can get more information or help on the program. You may want to display credits about all the people who helped with the program, open source packages you used, or other legal information. For this example, we want to display a couple of paragraphs about how to play the game when the user presses the About button. The following screenshot shows what it will look like:

images/fig.tictactoe.about.png

To implement this, we need to add a few lines to the fragment’s onCreateView() method. Before returning the rootView, add this code:

ticTacToev1/src/main/java/org/example/tictactoe/MainFragment.java
Line 1 
// Handle buttons ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required