This chapter will discuss how to incorporate multimedia elements inside a project and handle several screens in an app. The readers will be shown how to add images, sounds and an HTML page in the project. We will discuss the following topics with the help of a project called SimpleNumb3r5
:
- Forming the layout
- Adding the image resources
- Inserting ImageView
- Inserting ImageButtons
- ImageButton and handling events
- Adding audio and multiple screen support
- Inserting HTML in a WebView
- Using Intent and Activity
- Adding a new activity in the manifest file
- The final product – run, deploy, and test app
For this chapter, we need a new project that will cover the Android devices from Version 2.1 (API level 7) to the latest version. So set android:minSdkVersion
to 7, and android:targetSdkVersion
to 16.
The icon and other resources are available in a downloadable source code (refer to the download tip mentioned in the Preface of this book). Download these...