diff options
author | John Reck <jreck@google.com> | 2013-03-12 16:11:18 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2013-03-12 16:11:47 -0700 |
commit | 2f205d54c88ea3f6b1a1a0630201fdb10b0689e2 (patch) | |
tree | 28c068ea8de4e48c4271802337f7e4da10fef851 | |
parent | af0343eb04ecd0e1895042e0f0656db0cc52dd4c (diff) | |
download | android_packages_apps_Gallery2-2f205d54c88ea3f6b1a1a0630201fdb10b0689e2.tar.gz android_packages_apps_Gallery2-2f205d54c88ea3f6b1a1a0630201fdb10b0689e2.tar.bz2 android_packages_apps_Gallery2-2f205d54c88ea3f6b1a1a0630201fdb10b0689e2.zip |
basic activated support
Change-Id: If1c1faf42311ddbc76b617bff5f3c6bdafdef5d1
-rw-r--r-- | res/layout/photo_set.xml | 9 | ||||
-rw-r--r-- | res/layout/photo_set_item.xml | 13 | ||||
-rw-r--r-- | src/com/android/photos/adapters/PhotoThumbnailAdapter.java | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/res/layout/photo_set.xml b/res/layout/photo_set.xml index d929cadfb..3e3d99a04 100644 --- a/res/layout/photo_set.xml +++ b/res/layout/photo_set.xml @@ -2,8 +2,8 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingLeft="8dp" - android:paddingRight="8dp" > + android:paddingLeft="4dip" + android:paddingRight="4dip"> <GridView android:id="@id/android:list" @@ -14,9 +14,8 @@ android:numColumns="auto_fit" android:stretchMode="columnWidth" android:columnWidth="200dip" - android:horizontalSpacing="4dip" - android:verticalSpacing="4dip" - android:padding="4dip" /> + android:horizontalSpacing="1dip" + android:verticalSpacing="1dip" /> <TextView android:id="@id/android:empty" diff --git a/res/layout/photo_set_item.xml b/res/layout/photo_set_item.xml index e80957d5e..0f740fad9 100644 --- a/res/layout/photo_set_item.xml +++ b/res/layout/photo_set_item.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<com.android.photos.views.SquareImageView xmlns:android="http://schemas.android.com/apk/res/android" +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/thumbnail"> + android:background="?android:attr/activatedBackgroundIndicator" + android:padding="2dip"> -</com.android.photos.views.SquareImageView>
\ No newline at end of file + <com.android.photos.views.SquareImageView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/thumbnail" /> + +</FrameLayout>
\ No newline at end of file diff --git a/src/com/android/photos/adapters/PhotoThumbnailAdapter.java b/src/com/android/photos/adapters/PhotoThumbnailAdapter.java index 3776ca5a2..1190b8c85 100644 --- a/src/com/android/photos/adapters/PhotoThumbnailAdapter.java +++ b/src/com/android/photos/adapters/PhotoThumbnailAdapter.java @@ -22,9 +22,7 @@ import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.view.ViewGroup.LayoutParams; import android.widget.CursorAdapter; -import android.widget.GridView; import android.widget.ImageView; import com.android.gallery3d.R; @@ -48,7 +46,7 @@ public class PhotoThumbnailAdapter extends CursorAdapter implements GalleryThumb @Override public void bindView(View view, Context context, Cursor cursor) { - ImageView iv = (ImageView) view; + ImageView iv = (ImageView) view.findViewById(R.id.thumbnail); Drawable recycle = iv.getDrawable(); Drawable drawable = mDrawableFactory.drawableForItem(cursor, recycle); if (recycle != drawable) { |