Created: 2014-05-19 14:23
Updated: 2014-06-05 22:12

The projects throughout the Android basics course in SU.

A short description of what each one contains.


  • example of how to use a ScrollView
  • shows attaching an event listener to a button
  • adding a view dynamically
  • displaying a Toast


  • switching between activities through options menu
  • shows how to start activities without multiple stacking /intent flag: Intent.FLAG_ACTIVITY_REORDER_TO_FRONT

LogIn/LoggedIn Activity

  • an example for a login page which is skipped (the user is redirected) if already logged
  • shows usage of shared preferences
  • passing data between intents
  • creating/reading a/from text file and parsing it (onto external storage)
  • checking external storage state

Calculator Activity:

  • an example for relative layout positioning of buttons (note that relative layout is not the best option for designing a calculator!)
  • not a working calculator
  • shows usage of styles (and style inheritance);
  • usage of different resource folders for layouts and styles: proper rendering for different device dimensions and DPIs

Mail Client Activity:

  • an example for using a Chooser for sending a mail


  • an example for a custom list adapter and interaction with its data through its ListView
  • support for older devices using the support library: ActionBarActivity instead Activity, @style/Theme.AppCompat.Light for a base theme
  • the ViewHolder pattern
  • overriding back button behavior
  • retaining list data and position after rotation
  • retrieving existing drawables from the resources


Shall Crash Activity

  • example why we better not modify views directly from a different thread; whether this activity will crash varies by manufacturer (it's a bad thing for sure)

AsyncTask Demo Activity

  • an example of using an AsyncTask for long running operation
  • canceling AsyncTask
  • the AsyncTask is not retained accross configuration change - for the correct implementation of this a Fragment must be involved


  • uses the public Stackoverflow API to display the answers of a user by ID in a ListView (title and score)
  • executing a GET request via HTTPClient
  • uses the support library
  • accessing external API
  • parsing JSON via the GSON library
  • uses the StringEscapeUtils (from org.apache.commons) to unescape html entities for TextView;
    /as the answer body is retrieved in markdown format it is suitable for visualisation in a TextView - the only thing to touch is the unescaped html entities such as < and > /
    Another way would be to use WebView for rendering pure html or using another library for converting markdown to html.
  • loading more items when the bottom of the list is reached
  • creating and adding a ProgressBar bar dynamically


  • a simple fragments demo
  • uses NavigationDrawer from the support library (which is also a Fragment);


  • an example of a simple SQLite Database interaction
  • vanilla android SQLite example
  • executing queries over a database
  • the DBAdapter pattern is used, providing abstraction over database functionality


  • a simple WebView example;
  • loading .html pages
  • handling WebView events through WebViewClient
  • executing Javascript from Java and vice versa



  • shows the usage of built-in functionality towards preferences (uses PreferenceFragment)
  • shows a way to set a fragment on activity start (if no other is currently set)


  • custom buttons demo
  • composition of multiple drawables
  • usage of selectors, shapes, layer lists, 9-patch drawables


  • the activity has a layout that demonstrates uses of selectors



  • simplest camera demo


  • a demo for a BroadcastReceiver
  • using custom a intent filter and a system intent filter
  • executing a long operation in the Receiver (through service with AsyncTask)
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more