Reader small image

You're reading from  Learning Java by Building Android Games - Third Edition

Product typeBook
Published inMar 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800565869
Edition3rd Edition
Languages
Right arrow
Author (1)
John Horton
John Horton
author image
John Horton

John Horton is a programming and gaming enthusiast based in the UK. He has a passion for writing apps, games, books, and blog articles. He is the founder of Game Code School.
Read more about John Horton

Right arrow

Refactoring MainActivity to BulletHellActivity

As in the previous projects, MainActivity is a bit vague, so let's refactor MainActivity to BulletHellActivity.

In the project panel, right-click the MainActivity file and select Refactor | Rename. In the pop-up window, change MainActivity to BulletHellActivity. Leave all the other options as the defaults and left-click the Refactor button.

Notice the filename in the project panel has changed, as expected, but also multiple occurrences of MainActivity have been changed to BulletHellActivity in the AndroidManifest.xml file, as well as an instance in the BulletHellActivity.java file.

Let's set the screen orientation.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Java by Building Android Games - Third Edition
Published in: Mar 2021Publisher: PacktISBN-13: 9781800565869

Author (1)

author image
John Horton

John Horton is a programming and gaming enthusiast based in the UK. He has a passion for writing apps, games, books, and blog articles. He is the founder of Game Code School.
Read more about John Horton