A (175)

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

Now you can close the AndroidManifest.xml tab or leave it open and click on the activity_hello.xml tab,
which will open the Preview pane shown on the right side of Figure 1 6-6 0. Use the drop-down selector
to select the TV (720p) preview mode selection, and you will see the HelloAndroid5 application running
in a TV 720p preview.


Figure 16-60. Select the TV (720p) option from the Preview area drop-down menu to see your app in Android TV


Now you’ll take some Android 4.1 code that you wrote earlier and drop it into the Android 5.0
Studio environment and run it—just to prove my point that 32-bit Android 4.x code and assets run
identically in 64-bit Android 5.0. You will port the EarthTime application to run in IntelliJ IDEA next
and run it in a TV 720p AVD.


Porting the EarthTime App to Android TV


Copy your EarthTime drawable assets into the /app/src/main/res/drawable-mdpi folder, as
shown in Figure 16-61.

Free download pdf