The MainActivity class

The default project generated with Empty Activity also created a default MainActivity.java file. In the hierarchy pane, locate the app/java/ directory that contains a subdirectory named com.cardbookvr.skeleton.

Note

Note, this is different than the androidTest version of the directory, we're not using that one! (Your name may vary based on the actual project and domain names given when you created the project.)

In this folder, double-click on the MainActivity.java file to open it for editing. The default file looks like this:

package com.cardbookvr.skeleton; import ... public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ...

Get Cardboard VR Projects for Android now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.