diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-03-15 22:56:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-03-15 22:56:03 +0000 |
commit | 372368a941a38d74ea4671a64e3042a1e5698b83 (patch) | |
tree | e394886ea6b1cc9b6832d3068584db802ae000ce | |
parent | 0fe391a43d0c549fa0effddd21ece4eb4ba86194 (diff) | |
parent | 6dc2f6ba41d6a7065ced232cfee5d1013171be34 (diff) | |
download | android_packages_apps_Snap-372368a941a38d74ea4671a64e3042a1e5698b83.tar.gz android_packages_apps_Snap-372368a941a38d74ea4671a64e3042a1e5698b83.tar.bz2 android_packages_apps_Snap-372368a941a38d74ea4671a64e3042a1e5698b83.zip |
Merge "Improve AlbumSet UI in new gallery" into gb-ub-photos-bryce
-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); |