Amending the code to use the full screen and the best Android class
Find the following line of code near the top of the BulletHellActivity.java
file:
import androidx.appcompat.app.AppCompatActivity;
Change the preceding line of code to this:
import android.app.Activity;
Immediately after the preceding line of code, add this new line of code:
import android.view.Window;
The line of code we changed enables us to use a more efficient version of the Android API, Activity
instead of AppCompatActivity
, and the new line of code allows us to use the Window
class, which we will do in a moment.
At this point, there are errors in our code. This next step will remove the errors. Find the following line of code in the BulletHellActivity.java
file:
public class BulletHellActivity extends AppCompatActivity {
Change the preceding line of code to the same as this next line of code:
public class BulletHellActivity extends Activity {
All the errors are gone at this point...