Commit 34ca06b7 authored by Christopher League's avatar Christopher League
Browse files

update README

parent 942ac1c6
......@@ -3,3 +3,129 @@
Code and instructions for the 2019 LIU Apps Summer Honors Institute
[[file:etc/lesson-graph.png]]
* Activity object, onClick methods
** Learning objectives
- Know the major areas of the IDE: Project tree, Editor, Layout design
tab, Build output, Log output.
- Be able to create and run Android Virtual Devices (AVD)
- Understand how to add instance variables and simple methods in Java.
- Create live Buttons and TextViews on an Android Activity.
** Tasks
- Start with branch ~lesson1~, which displays a counter and an
Increment button.
- Add a decrement button.
- Add a reset (to zero) button.
- Try disabling the decrement and reset button when the counter is
already zero.
- Try adding a Random button, which sets counter to some number from
zero to one thousand.
* Arrays & loops
** Learning objectives
- Syntax for one- and two-dimensional array creation and indexing in
Java.
- Syntax of (counter-based) for loops in Java.
- Understand how (nested) for loops and (two-dimensional) arrays work
together.
- Understand how to translate two-dimensional grid coordinates into a
one-dimensional index (and vice-versa).
** Tasks
- Scaffolds for this unit are in ~lesson2~ branch.
- Construct methods for initializing, printing, finding min/max within
arrays.
- Use a for loop to initialize a series of TextViews with Strings from
an array.
- Work on a console version of the Flood puzzle!
* Binary, hex, & colors
** Learning objectives
- Convert between binary and decimal, and between binary and
hexadecimal.
- Understand additive color model where red-green-blue can be combined
to convey other hues.
** Tasks
- Demonstrations for this unit are in ~lesson3~ branch.
* Layouts & XML
** Learning objectives
- Construct basic layouts using horizontal and vertical LinearLayout.
- Understand the parameters and options for width, height, weight,
padding, gravity.
- Edit in both Design mode and Text (XML) mode
** Tasks
- Starting from ~lesson4~ branch, build a layout like my FloodGame
options screen, featuring title, play button, two SeekBars
(sliders), and some RadioButtons. (The palettes don't need to show
multiple colors; we'll cover that later in "Custom views.")
[[file:etc/floodgame-options.png]]
* Life cycle & saveInstanceState
** Learning objectives
- Understand the [[https://developer.android.com/guide/components/activities/activity-lifecycle][Android Activity Lifecycle]], and some reasons that an
app screen might be suspended or destroyed.
- Know how to enable and navigate Android developer options on a
device.
- Know how to switch between apps on Android, and kill a running app.
** Tasks
- Start with ~lesson5~ branch (which is essentially a solution to
~lesson1~).
- On your emulator, enable developer options and set "Apps » Don't
keep activities"
- Override ~saveInstanceState~ in the counter app so that we can
maintain the counter between interruptions.
- Illustrate that input widgets maintain their state automatically, as
long as ~super.saveInstanceState~ is invoked.
* Custom views & onDraw
** Learning objectives
- Understand how to use ~Paint~ objects to draw on a canvas, including
fill and stroke styles in different colors.
- Understand the canvas coordinate system, with origin on the upper
left.
- Know how to use a few basic canvas drawing methods, like ~drawRect~
and ~drawCircle~.
** Tasks
- Start with ~lesson6~ branch. The layout includes an object of class
~MyCustomView~.
- The custom view contains a boolean instance variable is controlled
by a checkbox.
- Come up with a simple drawing to put in the box, using basic shapes
like rectangles and circles. It should have at least three shapes
and two colors.
- Make /some/ aspect of the drawing optional, so the check box will
affect the drawing in some way.
* Intents & startActivity
** Learning objectives
- Understand how to invoke a new activity with ~startActivity~ in a
typical way (so the back button works).
- Be able to pass data from the previous activity to the new one,
using the ~Intent~ object.
** Tasks
- Start with the scaffolded app in ~lesson7~ branch. It's the counter,
but this time there is a checkbox and a "Verify" button. The idea is
that the user is supposed to predict whether the displayed number is
prime, and then click Verify to see its factors.
- We will need to create the Intent in onClickVerify in MainActivity,
- And then initialize the values in onCreate in FactorActivity.
* A working FloodGame!
- Check out ~lesson8~ and try the items marked TODO in the
MainActivity class.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment