Implement album grid layout

Album list layout is now selectable between the existing list view and a new
grid view. The grid view organizes the albums in a grid, and uses larger
artwork.

The selection is done from the options menu. The existing menu entry for
choosing the sort order of the albums, is renamed to "View", and the resulting
dialog is used for both selecting the layout and the sort order. This is
modelled after the view selection on the LMS web interface (and other android
apps). The selected layout is stored in preferences and used in all subsequent
displays of the album list. Like the sort order strings, the strings for
selecting the layout is fetched from the server.

The default layout (i.e. when not previously selected by the user), is based on
the screen size, on the assumption that the artwork grid is preferred on larger
screens.

To implement this the item_list layout is extended with an optional GridView.
To avoid too many setVisibility(GONE/VISIBLE), the optional views (ListView/
GridView/Loading) are put in a ViewAnimator. The BaseListActivity now takes
an extra parameter in its intent, which chooses the current list view.

To support the larger artwork, the image fetcher used in the item lists can now
be overridden. This is accomplished by making the createImageFetcher method
protected, and make it return the newly created image fetcher. This is the same
way the item view can be specified for an item list.

To make it easier to implement the grid item view, the
SqueezerAlbumArtView.getAdapterView method got an overridden method with an
ekstra parameter, layoutId, which specifies the layout to use. Now we just need
to create a new layout resource for the grid items, and specify it in the new
item view logic.

On a side note the image fetcher should be embedded in the item view logic,
since the item view inflates the layout, and therefore already knows about the
image size. Also they are both created from the item list activity. This will
also eliminate the need for all adapters to have an image fetcher.

This new implementation revealed a problem when switching the orientation in the
album list. Using a ViewAnimator caused views to be drawn in onCreate (measure),
which is before the service is connected, so we cant load images.

To fix this the adapter is not set on the listview until after the service is
connected (onServiceConnected/onResume). But that caused the list to scroll to
top, so the current position in the list is retained.

The item view is referenced from the adapter, so it is indirectly retained, so
is removed from the retain fragment.
Rename savePosition to saveVisiblePosition, and add javadoc

to new fields and methods.
Do not use the Squeezer prefix for new files/classes
Use spaces (instead of tabs) for indentation

Signed-off-by: Kurt Aaholst <kaaholst@gmail.com>
Merge branch 'actionbar' into album-grid
Merge branch 'actionbar' into album-grid
Merge branch 'album-grid' into actionbar

Use the getContentView pattern instead of a ViewAnimator.
This means that a new layout, item_grid, is introduced, which
duplicates some views from the item_list layout, but it is better than
item_list needing to know about all item lists.
To dynamically change the layout, when the user changes the list view
preference, the preference is saved, and the activity restarts itself.
This causes the retained adapter to be lost, so the items are reordered
and the list scrolls to top. The alternative to to call setContentView
again causes problems with the NowPlayingFragment, and would also be
errorprone, cause every findViewById would have to called again.
To retain the adapter, figure out how Android recreates the activity
on a configuration change. Maybe call Activity.recreate for API level
>= 11.

Conflicts:
	res/values/dimensions.xml
	src/uk/org/ngo/squeezer/SqueezerHomeActivity.java
	src/uk/org/ngo/squeezer/framework/SqueezerBaseListActivity.java
	src/uk/org/ngo/squeezer/itemlists/SqueezerAlbumArtView.java
	src/uk/org/ngo/squeezer/itemlists/SqueezerAlbumListActivity.java
Fix header lost after orientation change

Update views with the retained item adapters count, and create a new
item view logic which refers to the new activity (this also releases
the reference to the old view logic, and hence the old activity).

Signed-off-by: Kurt Aaholst <kaaholst@gmail.com>
Fix item list problems with orientation change

The adapter is retained in onCreate so the list view will start generating the
views. This causes various problems, because the service is not yet connected.

To fix this the adapter is not set on the listview until after the service is
connected (onServiceConnected/onResume). But that caused the list to scroll to
top, so the current position in the list is retained.
Merge remote-tracking branch 'nik/actionbar' into actionbar
Fix crash on orientation change when volume panel is showing

- In volume panel do not post to handler when the panel is dismissed.
  Posting caused an "Activity has leaked window that was originally
  added ..." error in the log, and an "IllegalArgumentException: View
  not attached to window manager" exception when the dialog was closed
  by the message handler.
- In now playing fragment, do not post to the UI thread, when showing
  a volume message from LMS, as the volume panel internally does that.
- Correctly unregister the volume callback in onPause in the now
  playing fragment. Failing to do that, caused an exception when
  rotating the device for the second time, cause the no longer active
  fragment receives a volume message from the LMS, which is passed on
  to its volume panel. When the not activy volume panel receives a
  timeout, it gets an exception when trying to dismiss the dialog.

Signed-off-by: Kurt Aaholst <kaaholst@gmail.com>
ActionBarCompat: Support action bar items setEnabled/setVisibility

from onCreateOptionsMenu
Merge remote-tracking branch 'kaaholst/actionbar' into actionbar

* kaaholst/actionbar:
  ActionBarCompat: Support action bar items setEnabled/setVisibility
  Fix crash on orientation change when volume panel is showing
  Fix item list problems with orientation change
  Fix header lost after orientation change
  Use spaces (instead of tabs) for indentation
  Do not use the Squeezer prefix for new files/classes
  Rename savePosition to saveVisiblePosition, and add javadoc
  Implement album grid layout
Show the NowPlayingFragment in the album grid view.

The GridView was consuming all available space, leaving none for the
NowPlayingFragment.  Set the GridView's height to 0dip with a weight of
1 to force it consume only spare space.
Simplify the per-item grid layout.

grid_item.xml:

- Use a RelativeLayout instead of a series of nested LinearLayouts.

- Remove the marquee effect from the TextViews, it dramatically slows down
  scrolling performance.

- Adjust padding for consistency.

item_grid.xml:

- Adjust padding for consistency.

- Add a weight to the ProgressBar, so that it also pushes NowPlayingFragment
  to the bottom of the screen, preventing an awkward transition if it takes
  a while to load content.

AlbumGridView.java:

- Remove marquee related code.