Modify the tree

a ContextMenu an AlertDialog

Modify the tree we created here.

Source code in Tree.zip

  1. TreeActivity.java
  2. R.java

ArrayList

Class ArrayList<E> implements the interface List<E>, which implements the interface Collection<E>. An ArrayList is basically an array that allows us to do insertions and deletions.

ContextMenu and AlertDialog

We created a ContextMenu here, and an AlertDialog here. This time, our AlertDialog has an EditText in addition to the buttons.

The title bar

stack.peek() is the Item at the top of the stack, i.e., the item that we are currently displaying. The name, level, and size of this item is displayed in the gray title bar at the top of the screen.