diff options
author | Chris Wren <cwren@android.com> | 2012-09-18 15:58:46 -0400 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2012-09-19 13:26:30 -0400 |
commit | e38c0c80e3e9b3b835e5c2e014ccf23e29663396 (patch) | |
tree | e2f13ea1a56b9f2c3738c91a2986684a690bacc4 /src/com/android/dreams/phototable/PhotoTableDreamSettings.java | |
parent | c6175b1e065fb544ea3744a991a33304abc2f8ed (diff) | |
download | android_packages_screensavers_PhotoTable-e38c0c80e3e9b3b835e5c2e014ccf23e29663396.tar.gz android_packages_screensavers_PhotoTable-e38c0c80e3e9b3b835e5c2e014ccf23e29663396.tar.bz2 android_packages_screensavers_PhotoTable-e38c0c80e3e9b3b835e5c2e014ccf23e29663396.zip |
Segment album list by account.
Bug: 7162806
Change-Id: I3a7f2c1a9e9d0ff299f4d5a8536013b9ec8f52ba
Diffstat (limited to 'src/com/android/dreams/phototable/PhotoTableDreamSettings.java')
-rw-r--r-- | src/com/android/dreams/phototable/PhotoTableDreamSettings.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/dreams/phototable/PhotoTableDreamSettings.java b/src/com/android/dreams/phototable/PhotoTableDreamSettings.java index e7ba945..7271f3f 100644 --- a/src/com/android/dreams/phototable/PhotoTableDreamSettings.java +++ b/src/com/android/dreams/phototable/PhotoTableDreamSettings.java @@ -18,7 +18,7 @@ package com.android.dreams.phototable; import android.content.SharedPreferences; import android.app.ListActivity; import android.os.Bundle; -import android.widget.ArrayAdapter; +import android.widget.ListAdapter; import java.util.LinkedList; @@ -30,7 +30,7 @@ public class PhotoTableDreamSettings extends ListActivity { public static final String PREFS_NAME = PhotoTableDream.TAG; private PhotoSourcePlexor mPhotoSource; - private ArrayAdapter<PhotoSource.AlbumData> mAdapter; + private ListAdapter mAdapter; private SharedPreferences mSettings; @Override @@ -42,11 +42,11 @@ public class PhotoTableDreamSettings extends ListActivity { mSettings = getSharedPreferences(PREFS_NAME, 0); mPhotoSource = new PhotoSourcePlexor(this, mSettings); - mAdapter = new AlbumDataAdapter(this, + mAdapter = new SectionedAlbumDataAdapter(this, mSettings, + R.layout.header, R.layout.album, new LinkedList<PhotoSource.AlbumData>(mPhotoSource.findAlbums())); - mAdapter.sort(new AlbumDataAdapter.RecencyComparator()); setListAdapter(mAdapter); } } |