Starting from:
$30

$24

MP 4 Programming with Android Solution

Introduction



In this machine problem you will learn the basics of programming in Android. You’ll learn how to create an Android project and run a debuggable version of the app. You’ll learn some of the basic principles of Android app design, handling user input as well as build a simple user interface. You must create your own git repository (eg. on TAMU GitHub), and push your code onto it.




Pre-requisite



Before you start this assignment, make sure that you have installed Android SDK. It is recommended that you use Android Studio to build your app. If you are using a physical device, you might have to install device drivers in order to connect your phone to a computer in developer mode. You can also use Android Virtual Device Manager to create a virtual device. It is recommended that you develop your application for Android versions 4 and above.




Problem statement



This problem has two parts. The basic part simply consists of experimenting with the user interface. The second part involves le handling and using multimedia functionality.




Part I: Android Basics




In this part, you will learn how to use the user interface. You should read the rst few sections of [1]. Create a new Android project and familiarize yourself with the contents of the various folders in the project.




XML: Add three components to the layout, namely, a Button, an EditText, and a TextView. Place the Button on the top, the EditText below it, and the TextView at the bottom. When the application is started the TextView should display the text \Hello World". Name button as \Display."




JAVA: Create a new activity in your application. Give it a name (eg. MainActivity). The functionality is as follows. The EditText component should take input from the keyboard and on pressing the \Display" button, should display the input text in the TextView component instead of \Hello World". Also when the \Display" button is pressed, the EditText component should be cleared for new input.




Part II: The Calculator




In this part you will modify the calculator that you created in MP1 to incorporate a graphical user interface on Android. As in the Java version of MP1, you should enable addition, subtraction and multiplication. Look at the ListView class which can be used to implement this. However feel free to use any other classes or UI elements that provide the same functionality. Your GUI can incorporate buttons for entering numerals, or you can use an EditText to do the same. Be creative!



















1









Evaluation Guidelines



Check operation using test values.



Creativity carries bonus points.



Your application must run on either a physical or a virtual device.



References




Android developer: Building Your First App http://developer.android.com/training/basics/firstapp/index.html



Head First Android Chapters 1-3.













































































































































2

More products