diff options
author | Alan Newberger <alann@google.com> | 2015-02-04 01:59:55 +0000 |
---|---|---|
committer | Alan Newberger <alann@google.com> | 2015-02-04 17:18:21 -0800 |
commit | d70b22919f8d212bf11abd6e6724b3a395ef02c1 (patch) | |
tree | a16b94c1f98b87d59857217625844abd58237a96 | |
parent | d251aa45da226d9fde64a481a22023adc6be43b0 (diff) | |
download | android_packages_apps_Camera2-d70b22919f8d212bf11abd6e6724b3a395ef02c1.tar.gz android_packages_apps_Camera2-d70b22919f8d212bf11abd6e6724b3a395ef02c1.tar.bz2 android_packages_apps_Camera2-d70b22919f8d212bf11abd6e6724b3a395ef02c1.zip |
Remove elevations from filmstrip
Elevations were not applied to SessionItems causing bad z-order
behavior. As the shadows are not really visible, just removing
elevation entirely, this also seems to improve performance.
Bug: 17742801
Change-Id: I8fedad3b6c083f7cde349e51021f928d719edb40
-rw-r--r-- | res/drawable/dummy_rect_background.xml | 6 | ||||
-rw-r--r-- | res/layout/filmstrip_image.xml | 7 | ||||
-rw-r--r-- | res/layout/filmstrip_video.xml | 4 | ||||
-rw-r--r-- | src/com/android/camera/data/PhotoItem.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/widget/FilmstripView.java | 11 |
5 files changed, 3 insertions, 28 deletions
diff --git a/res/drawable/dummy_rect_background.xml b/res/drawable/dummy_rect_background.xml deleted file mode 100644 index 7a8eb731b..000000000 --- a/res/drawable/dummy_rect_background.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- used for views that don't have a background set, but still want to have an L elevation shadow --> -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - <solid android:color="#00ffffff" /> -</shape>
\ No newline at end of file diff --git a/res/layout/filmstrip_image.xml b/res/layout/filmstrip_image.xml deleted file mode 100644 index 003c2dd4e..000000000 --- a/res/layout/filmstrip_image.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<ImageView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@drawable/dummy_rect_background" - android:elevation="10dp" /> diff --git a/res/layout/filmstrip_video.xml b/res/layout/filmstrip_video.xml index 027bd8b04..8439b61c5 100644 --- a/res/layout/filmstrip_video.xml +++ b/res/layout/filmstrip_video.xml @@ -2,9 +2,7 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@drawable/dummy_rect_background" - android:elevation="10dp"> + android:layout_height="match_parent"> <ImageView android:id="@+id/video_view" android:layout_width="match_parent" diff --git a/src/com/android/camera/data/PhotoItem.java b/src/com/android/camera/data/PhotoItem.java index 1c31440b7..622fb305b 100644 --- a/src/com/android/camera/data/PhotoItem.java +++ b/src/com/android/camera/data/PhotoItem.java @@ -122,8 +122,7 @@ public class PhotoItem extends FilmstripItemBase<FilmstripItemData> { if (optionalView.isPresent()) { imageView = (ImageView) optionalView.get(); } else { - imageView = (ImageView) LayoutInflater.from(mContext) - .inflate(R.layout.filmstrip_image, null); + imageView = new ImageView(mContext); imageView.setTag(R.id.mediadata_tag_viewtype, getItemViewType().ordinal()); } diff --git a/src/com/android/camera/widget/FilmstripView.java b/src/com/android/camera/widget/FilmstripView.java index 1bb80d98b..58673e39e 100644 --- a/src/com/android/camera/widget/FilmstripView.java +++ b/src/com/android/camera/widget/FilmstripView.java @@ -994,17 +994,8 @@ public class FilmstripView extends ViewGroup { } mViewItems[i].bringViewToFront(); } - // ZoomView is a special case to always be in the front. In L set to - // max elevation to make sure ZoomView is above other elevated views. + // ZoomView is a special case to always be in the front. bringChildToFront(mZoomView); - if (ApiHelper.isLOrHigher()) { - setMaxElevation(mZoomView); - } - } - - @TargetApi(Build.VERSION_CODES.LOLLIPOP) - private void setMaxElevation(View v) { - v.setElevation(Float.MAX_VALUE); } /** |