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); } }
The first thing you should notice is the extends AppCompatActivity
class (or ActionBarActivity
) for the built-in Android action bar. We do not need this. We will rather define the...