From: Bobby Georgescu Date: Fri, 15 Mar 2013 21:38:04 +0000 (-0700) Subject: Improve AlbumSet UI in new gallery X-Git-Tag: android-x86-6.0-r3~68^2~28^2~213^2~19^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2~428^2~2^2~201^2~175^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d9928654036e0a9fd43fcc186f8c66537dabe28a;p=android-x86%2Fpackages-apps-Camera2.git Improve AlbumSet UI in new gallery Change-Id: I31cbf7cf8c0c7b5f5f3413a59ad94142b13870d2 --- diff --git a/res/layout/album_set.xml b/res/layout/album_set.xml index 5ff1d23ff..5e2e84868 100644 --- a/res/layout/album_set.xml +++ b/res/layout/album_set.xml @@ -12,9 +12,11 @@ android:columnWidth="@dimen/album_set_item_width" android:stretchMode="columnWidth" android:drawSelectorOnTop="true" - android:padding="10dp" - android:horizontalSpacing="10dp" - android:verticalSpacing="10dp" /> + android:background="#E5E5E5" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:horizontalSpacing="6dp" + android:verticalSpacing="6dp" /> - + android:orientation="vertical" + android:background="?android:attr/activatedBackgroundIndicator" + android:padding="2dp" > - + android:layout_width="match_parent" + android:orientation="vertical" + android:padding="10dp" + android:background="#FFF" > - + + + + - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 9ef192cb2..aba596f16 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -52,6 +52,6 @@ 3dip - 100dp + 120dp 140dp diff --git a/res/values/strings.xml b/res/values/strings.xml index 263b8b15b..6e35bfc14 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1010,4 +1010,10 @@ CHAR LIMIT = NONE] --> Photos Albums + + + + %1$d photo + %1$d photos + 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 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);