diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2012-07-25 11:18:50 -0700 |
---|---|---|
committer | Andrew Sapperstein <asapperstein@google.com> | 2012-07-25 11:18:50 -0700 |
commit | ebeb8b01ee3719f86d3ad96a0f0603032efbc1dc (patch) | |
tree | 2c2aa4e4b12c0295f2a8d368291d806bd9c05b3f /photoviewer | |
parent | 749602e643c76f981e1db26198876d103008b5e7 (diff) | |
download | android_frameworks_ex-ebeb8b01ee3719f86d3ad96a0f0603032efbc1dc.tar.gz android_frameworks_ex-ebeb8b01ee3719f86d3ad96a0f0603032efbc1dc.tar.bz2 android_frameworks_ex-ebeb8b01ee3719f86d3ad96a0f0603032efbc1dc.zip |
Finalized the photo viewer transitions.
Changed the black background to be on the
FrameLayout behind the view pager rather than
on the the photo view. Also deleted some dead code.
Change-Id: I19759d3f7e93c32b6c6aceda0c296610f90f20f7
Diffstat (limited to 'photoviewer')
-rw-r--r-- | photoviewer/res/drawable/photo_view_background.xml | 24 | ||||
-rw-r--r-- | photoviewer/res/layout/photo_activity_view.xml | 3 | ||||
-rw-r--r-- | photoviewer/res/layout/photo_fragment_view.xml | 3 | ||||
-rw-r--r-- | photoviewer/res/values/colors.xml | 3 | ||||
-rw-r--r-- | photoviewer/res/values/themes.xml | 1 | ||||
-rw-r--r-- | photoviewer/src/com/android/ex/photo/views/PhotoView.java | 12 |
6 files changed, 3 insertions, 43 deletions
diff --git a/photoviewer/res/drawable/photo_view_background.xml b/photoviewer/res/drawable/photo_view_background.xml deleted file mode 100644 index f7ebc17..0000000 --- a/photoviewer/res/drawable/photo_view_background.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2011 Google Inc. - Licensed to The Android Open Source Project. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - <item> - <shape> - <solid android:color="@color/photo_background_color"/> - </shape> - </item> -</layer-list> diff --git a/photoviewer/res/layout/photo_activity_view.xml b/photoviewer/res/layout/photo_activity_view.xml index 15acd5c..b7ffdfd 100644 --- a/photoviewer/res/layout/photo_activity_view.xml +++ b/photoviewer/res/layout/photo_activity_view.xml @@ -18,7 +18,8 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/photo_activity_root_view" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent" + android:background="@color/solid_black" > <com.android.ex.photo.PhotoViewPager android:id="@+id/photo_view_pager" diff --git a/photoviewer/res/layout/photo_fragment_view.xml b/photoviewer/res/layout/photo_fragment_view.xml index 7765ca8..5839533 100644 --- a/photoviewer/res/layout/photo_fragment_view.xml +++ b/photoviewer/res/layout/photo_fragment_view.xml @@ -17,8 +17,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/solid_black" > + android:layout_height="match_parent" > <com.android.ex.photo.views.PhotoView android:id="@+id/photo_view" diff --git a/photoviewer/res/values/colors.xml b/photoviewer/res/values/colors.xml index 86d607a..cd2a14b 100644 --- a/photoviewer/res/values/colors.xml +++ b/photoviewer/res/values/colors.xml @@ -18,9 +18,6 @@ <resources> <!-- Photo Viewer Colors --> <color name="solid_black">#ff000000</color> - <color name="title_text_color">#ffffffff</color> - <color name="clear">#00000000</color> - <color name="photo_background_color">#ff000000</color> <color name="photo_crop_dim_color">#cc000000</color> <color name="photo_crop_highlight_color">#fff</color> </resources> diff --git a/photoviewer/res/values/themes.xml b/photoviewer/res/values/themes.xml index 06d606b..0945056 100644 --- a/photoviewer/res/values/themes.xml +++ b/photoviewer/res/values/themes.xml @@ -21,6 +21,5 @@ <item name="android:windowNoTitle">false</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowActionBarOverlay">true</item> - <item name="android:windowBackground">@drawable/photo_view_background</item> </style> </resources> diff --git a/photoviewer/src/com/android/ex/photo/views/PhotoView.java b/photoviewer/src/com/android/ex/photo/views/PhotoView.java index 1de5ff4..647d168 100644 --- a/photoviewer/src/com/android/ex/photo/views/PhotoView.java +++ b/photoviewer/src/com/android/ex/photo/views/PhotoView.java @@ -80,10 +80,6 @@ public class PhotoView extends View implements GestureDetector.OnGestureListener /** Paint to highlight the cropped portion of the photo */ private static Paint sCropPaint; - // Colours - /** The colour of the header background */ - private static int sBackgroundColor; - /** The photo to display */ private BitmapDrawable mDrawable; /** The matrix used for drawing; this may be {@code null} */ @@ -516,9 +512,6 @@ public class PhotoView extends View implements GestureDetector.OnGestureListener matrix.postTranslate(-mCropRect.left, -mCropRect.top); matrix.postScale(scaleWidth, scaleHeight); - // Set the background to black - croppedCanvas.drawColor(sBackgroundColor); - // draw the photo if (mDrawable != null) { croppedCanvas.concat(matrix); @@ -558,8 +551,6 @@ public class PhotoView extends View implements GestureDetector.OnGestureListener @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); - // Set the background to black - canvas.drawColor(sBackgroundColor); // draw the photo if (mDrawable != null) { @@ -934,9 +925,6 @@ public class PhotoView extends View implements GestureDetector.OnGestureListener Resources resources = context.getApplicationContext().getResources(); - // Initialize colors - sBackgroundColor = resources.getColor(R.color.photo_background_color); - sCropSize = resources.getDimensionPixelSize(R.dimen.photo_crop_width); sCropDimPaint = new Paint(); |