A (175)

(Tuis.) #1
CHAPTER 16: The Future of Android: The 64-Bit Android 5.0 OS 621

you will learn in this book will not change with Android 5.0 application development. Notice that the
AVD emulator, shown on the right side of Figure 16-26, is now an integral part of the IDE, which will
make the code-design-test work process faster. It’s important to note that how quickly the code is
compiled and run in an AVD is still dependent on CPU speed.


Next, click on the HelloActivity.java tab to see how similar the Java code for a bootstrap Blank
Activity is to 32-bit Android 4 (and earlier) OS versions. I suspect that it will be identical, as the same
core classes used for 64-bit Android 5.0 are used for the Android 1.x, 2.x, 3.x, and 4.x OS versions.


As you can see in Figure 16-27, the Java code that is used for Android 5.0 is identical to what you
have been learning about in the first 15 chapters of this book—essentially making this book an
Android 5 for Absolute Beginners title! The Java code starts with the Java package declaration,
the import statements for the Activity, Bundle, Menu, and MenuItem classes, and the public class
HelloActivity extends Activity class declaration.


Figure 16-27. Exploring the bootstrap Java code created by Android Studio IntelliJ to see how it differs from Android version 4.4.4


Inside of the activity, you have the standard Android protected void onCreate( ) method with its
super.onCreate( ) method that creates the activity passing up the savedInstanceState Bundle object
and setContentView( ) method referencing the R.layout.activity_hello XML user interface design
definition that you saw in the activity_hello.xml tab.

Free download pdf