diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-03-15 14:38:04 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2013-03-15 15:49:11 -0700 |
commit | 6dc2f6ba41d6a7065ced232cfee5d1013171be34 (patch) | |
tree | 517dc38edda5bf7739379ddb4d233b070378453c | |
parent | b7cc5e99563bc695ec871f897914eb2cb797ad53 (diff) | |
download | android_packages_apps_Snap-6dc2f6ba41d6a7065ced232cfee5d1013171be34.tar.gz android_packages_apps_Snap-6dc2f6ba41d6a7065ced232cfee5d1013171be34.tar.bz2 android_packages_apps_Snap-6dc2f6ba41d6a7065ced232cfee5d1013171be34.zip |
Improve AlbumSet UI in new gallery
Change-Id: I31cbf7cf8c0c7b5f5f3413a59ad94142b13870d2
-rw-r--r-- | src/com/android/photos/adapters/AlbumSetCursorAdapter.java | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/com/android/photos/adapters/AlbumSetCursorAdapter.java b/src/com/android/photos/adapters/AlbumSetCursorAdapter.java index c387f8f47..ab99cde70 100644 --- a/src/com/android/photos/adapters/AlbumSetCursorAdapter.java +++ b/src/com/android/photos/adapters/AlbumSetCursorAdapter.java @@ -41,7 +41,6 @@ public class AlbumSetCursorAdapter extends CursorAdapter { public void setDrawableFactory(LoaderCompatShim<Cursor> factory) { mDrawableFactory = factory; } - private Date mDate = new Date(); // Used for converting timestamps for display public AlbumSetCursorAdapter(Context context) { super(context, null, false); @@ -53,24 +52,11 @@ public class AlbumSetCursorAdapter extends CursorAdapter { R.id.album_set_item_title); titleTextView.setText(cursor.getString(AlbumSetLoader.INDEX_TITLE)); - TextView dateTextView = (TextView) v.findViewById( - R.id.album_set_item_date); - long timestamp = cursor.getLong(AlbumSetLoader.INDEX_TIMESTAMP); - if (timestamp > 0) { - mDate.setTime(timestamp); - dateTextView.setText(DateFormat.getMediumDateFormat(context).format(mDate)); - } else { - dateTextView.setText(null); - } - - ProgressBar uploadProgressBar = (ProgressBar) v.findViewById( - R.id.album_set_item_upload_progress); - if (cursor.getInt(AlbumSetLoader.INDEX_COUNT_PENDING_UPLOAD) > 0) { - uploadProgressBar.setVisibility(View.VISIBLE); - uploadProgressBar.setProgress(50); - } else { - uploadProgressBar.setVisibility(View.INVISIBLE); - } + TextView countTextView = (TextView) v.findViewById( + R.id.album_set_item_count); + int count = cursor.getInt(AlbumSetLoader.INDEX_COUNT); + countTextView.setText(context.getResources().getQuantityString( + R.plurals.number_of_photos, count, count)); ImageView thumbImageView = (ImageView) v.findViewById( R.id.album_set_item_image); |