Please enable JavaScript to view this site.

Code on the Go

Navigation: » No topics above this level «

Tutorial: Build a weight converter app

Scroll Prev Top Next More

Introduction

Welcome to Code on the Go! This tutorial helps you write, build, and test an Android app using Java. This tutorial contains:

•A specification for the app

•An overview of the app's code

•Step-by-step instructions for building the app in Code on the Go

This tutorial assumes that you have some experience with programming and are familiar with common features found in other IDEs. In the tutorial, sections that begin with a lightbulb icon (lightbulb) contain information about navigating the Code on the Go interface.

You will build a tool that converts kilograms to pounds and pounds to kilograms, depending on the user’s selection. When the user enters or changes a numerical value, the app will instantly display the converted measurement.

If you are new to Android development, some instructions may be difficult to follow. Complete text for main_activity.xml and MainActivity.java are provided in the tutorial so you can view the code. The standalone files are available in the CodeOnTheGoProjects/Tutorials folder. Using your file manager, you can move these files to your project directory.