GithubHelp home page GithubHelp logo

lab-01's Introduction

Lab-01

Instructions for Inclass Lab 01

Problem

This lab will have you creating a simple countdown timer. Android comes with a built-in class for constructing CountDownTimers.

Purpose

This lab will introduce some basic features that are not present in a basic HelloWorld project, such as TableLayout, TextView items, Buttons, and OnClickListeners. Use of the values resource files will also be demonstrated.

Steps

  • Open Android Studio and create a basic project. Name the project whatever you like, SimpleTimer is a good candidate. Choose API 23: Android 6.0 (Marshmallow). Next choose just an Empty Activity.
  • Edit the MainActivity.java file to implement the OnClickListener interface. Implement the required methods. (NOTE: This can easily be done by clicking Code -> Implement then choose the method for OnClickListner)
  • Create a subclass of CountDownTimer. This will be a public class inside of ActivityMain class. This class class does not allow for default constructor. You will need to implement a constructor (and call the super constructor) that takes in two arguments CountDownTimer(long millisInFuture, long countDownInterval). (NOTE: This can easily done by clicking Code -> Generate -> Constructor). You will also need to implement a couple of methods. This can be accomplished in the same fashion as the privious step.
  • Fill in methods with code provided in java.txt. Fix any errors that may occur, ie variable names are different.
  • Replace all of the XML inside of res/layout/activity_main.xml with code from the view.xml file in the lab repository.
  • Create a virtual device (or use a real device if you are able) to run the lab on. This virtual device will need to have API 23 or greater.
  • AFter you have code running on a device properly, refactor "hard coded" strings to be read from res/values/strings.xml
  • Share, commit, and push lab to your GitHub account

lab-01's People

Contributors

kabriggs991 avatar pamons12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.