diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/anim/grow_fade_in_from_top_right.xml | 30 | ||||
-rw-r--r-- | res/anim/shrink_fade_out_from_top_right.xml | 30 | ||||
-rw-r--r-- | res/drawable-hdpi/divider_strong_holo.9.png | bin | 0 -> 122 bytes | |||
-rw-r--r-- | res/drawable-mdpi/divider_strong_holo.9.png | bin | 0 -> 122 bytes | |||
-rw-r--r-- | res/layout-w1024dp/review_thumbnail.xml | 21 | ||||
-rw-r--r-- | res/layout/review_thumbnail.xml | 25 | ||||
-rw-r--r-- | res/layout/share_item.xml | 36 | ||||
-rw-r--r-- | res/layout/share_popup.xml | 78 | ||||
-rw-r--r-- | res/values-w1024dp/dimens.xml | 1 | ||||
-rw-r--r-- | res/values/colors.xml | 1 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 | ||||
-rw-r--r-- | res/values/ids.xml | 19 | ||||
-rw-r--r-- | res/values/styles.xml | 4 |
13 files changed, 193 insertions, 53 deletions
diff --git a/res/anim/grow_fade_in_from_top_right.xml b/res/anim/grow_fade_in_from_top_right.xml new file mode 100644 index 0000000..1bfede0 --- /dev/null +++ b/res/anim/grow_fade_in_from_top_right.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/fade_in.xml +** +** Copyright 2011, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> + <scale android:interpolator="@android:interpolator/decelerate_quint" + android:fromXScale="0.9" android:toXScale="1.0" + android:fromYScale="0.9" android:toYScale="1.0" + android:pivotX="100%" android:pivotY="0%" + android:duration="300" /> + <alpha android:interpolator="@android:interpolator/decelerate_cubic" + android:fromAlpha="0.5" android:toAlpha="1.0" + android:duration="300" /> +</set> diff --git a/res/anim/shrink_fade_out_from_top_right.xml b/res/anim/shrink_fade_out_from_top_right.xml new file mode 100644 index 0000000..9727386 --- /dev/null +++ b/res/anim/shrink_fade_out_from_top_right.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/fade_out.xml +** +** Copyright 2007, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> + <scale android:interpolator="@android:interpolator/decelerate_quint" + android:fromXScale="1.0" android:toXScale="0.9" + android:fromYScale="1.0" android:toYScale="0.9" + android:pivotX="100%" android:pivotY="0%" + android:duration="300" /> + <alpha android:interpolator="@android:interpolator/decelerate_cubic" + android:fromAlpha="1.0" android:toAlpha="0.0" + android:duration="300" /> +</set> diff --git a/res/drawable-hdpi/divider_strong_holo.9.png b/res/drawable-hdpi/divider_strong_holo.9.png Binary files differnew file mode 100644 index 0000000..0758593 --- /dev/null +++ b/res/drawable-hdpi/divider_strong_holo.9.png diff --git a/res/drawable-mdpi/divider_strong_holo.9.png b/res/drawable-mdpi/divider_strong_holo.9.png Binary files differnew file mode 100644 index 0000000..0758593 --- /dev/null +++ b/res/drawable-mdpi/divider_strong_holo.9.png diff --git a/res/layout-w1024dp/review_thumbnail.xml b/res/layout-w1024dp/review_thumbnail.xml index 0290d50..0f8c4d1 100644 --- a/res/layout-w1024dp/review_thumbnail.xml +++ b/res/layout-w1024dp/review_thumbnail.xml @@ -14,15 +14,24 @@ limitations under the License. --> -<com.android.camera.ui.RotateImageView xmlns:android="http://schemas.android.com/apk/res/android" - android:visibility="invisible" - android:id="@+id/review_thumbnail" - android:layout_width="86dp" - android:layout_height="86dp" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/share_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_marginTop="@dimen/thumbnail_margin_top" android:layout_marginRight="@dimen/thumbnail_margin_right" + android:orientation="horizontal" android:clickable="true" android:focusable="false" - android:background="@drawable/border_last_picture"/> + android:background="@drawable/border_last_picture"> + <com.android.camera.ui.RotateImageView android:id="@+id/share_icon" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:src="@drawable/ic_viewfinder_share" + android:background="@android:color/black" /> + <com.android.camera.ui.RotateImageView android:id="@+id/thumbnail" + android:layout_width="86dp" + android:layout_height="86dp"/> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/review_thumbnail.xml b/res/layout/review_thumbnail.xml index 1f8b344..f94a186 100644 --- a/res/layout/review_thumbnail.xml +++ b/res/layout/review_thumbnail.xml @@ -14,29 +14,22 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/share_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" - android:orientation="vertical"> - <com.android.camera.ui.RotateImageView - android:id="@+id/review_thumbnail" + android:orientation="vertical" + android:clickable="true" + android:focusable="false" + android:background="@drawable/border_last_picture"> + <com.android.camera.ui.RotateImageView android:id="@+id/thumbnail" android:layout_width="52dp" - android:layout_height="52dp" - android:clickable="true" - android:focusable="false" - android:background="@drawable/border_last_picture" /> - <com.android.camera.ui.RotateImageView - android:id="@+id/btn_share" + android:layout_height="52dp"/> + <com.android.camera.ui.RotateImageView android:id="@+id/share_icon" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:paddingTop="2dp" - android:paddingBottom="2dp" - android:clickable="true" - android:focusable="false" android:src="@drawable/ic_viewfinder_share" android:background="@android:color/black" /> </LinearLayout>
\ No newline at end of file diff --git a/res/layout/share_item.xml b/res/layout/share_item.xml new file mode 100644 index 0000000..e5b0b9e --- /dev/null +++ b/res/layout/share_item.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2011 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. +*/ +--> +<!-- A row that contains an icon and the name of the app to share in a listview --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="48dp" + android:gravity="center_vertical" + android:orientation="horizontal" + android:paddingLeft="4dp" + android:paddingRight="4dp"> + <TextView android:id="@+id/text" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="left|center_vertical" + android:textAppearance="?android:textAppearanceMedium" + android:singleLine="true" + android:paddingLeft="4dp" + android:textColor="@android:color/white" /> +</LinearLayout> diff --git a/res/layout/share_popup.xml b/res/layout/share_popup.xml index 93ffd4b..06b0e2a 100644 --- a/res/layout/share_popup.xml +++ b/res/layout/share_popup.xml @@ -14,23 +14,77 @@ limitations under the License. --> -<RelativeLayout +<!-- Use a full-screen popup window because UI has some intermediate problems + when its size is changed. --> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" android:layout_width="match_parent" android:layout_height="match_parent"> - <com.android.camera.ui.RotateLayout - android:id="@+id/rotate_layout" + <!-- Need a relative layout here because collapse button does not rotate and + it is not in the thumbnail. --> + <RelativeLayout android:id="@+id/root" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:layout_alignParentRight="true"> - <!-- The size of the thumbnail is calculated in SharePopup.java --> - <ImageView - android:id="@+id/expanded_thumbnail" + android:layout_gravity="top|bottom"> + <com.android.camera.ui.RotateLayout + android:id="@+id/share_view_rotate_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:adjustViewBounds="true" - android:scaleType="fitCenter" /> - </com.android.camera.ui.RotateLayout> -</RelativeLayout> + android:layout_toLeftOf="@+id/thumbnail_rotate_layout"> + <!-- The width of the share list is calculated in SharePopup.java. --> + <LinearLayout android:id="@+id/share_view" + android:layout_width="@dimen/share_list_width_landscape" + android:layout_height="@dimen/share_image_max_height_landscape" + android:orientation="vertical" + android:background="@color/dark_gray" + android:paddingLeft="7dp" + android:paddingRight="7dp" + android:clickable="true"> + <TextView android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="44dp" + android:gravity="left|center_vertical" + android:textAppearance="?android:textAppearanceMedium" + android:text="@string/share_picture_via" + android:textColor="@android:color/white" + android:paddingLeft="4dp" /> + <ImageView + android:layout_width="match_parent" + android:layout_height="1dip" + android:scaleType="fitXY" + android:gravity="fill_horizontal" + android:src="@drawable/divider_strong_holo" /> + <ListView android:id="@+id/share_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_gravity="center" + android:choiceMode="singleChoice" + style="@android:style/Widget.ListView" /> + </LinearLayout> + </com.android.camera.ui.RotateLayout> + <com.android.camera.ui.RotateLayout + android:id="@+id/thumbnail_rotate_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_alignParentRight="true"> + <!-- The size of the thumbnail is calculated in SharePopup.java --> + <ImageView android:id="@+id/thumbnail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:adjustViewBounds="true" + android:scaleType="fitCenter" + android:background="@drawable/border_last_picture" /> + </com.android.camera.ui.RotateLayout> + <ImageView android:id="@+id/collapse_button" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_alignParentTop="true" + android:layout_alignParentRight="true" + android:src="@drawable/btn_ic_review_play" + android:scaleType="center" /> + </RelativeLayout> +</FrameLayout> diff --git a/res/values-w1024dp/dimens.xml b/res/values-w1024dp/dimens.xml index c9f8b1d..ad93943 100644 --- a/res/values-w1024dp/dimens.xml +++ b/res/values-w1024dp/dimens.xml @@ -30,4 +30,5 @@ <dimen name="share_image_max_height_landscape">360dp</dimen> <dimen name="share_image_max_width_portrait">480dp</dimen> <dimen name="share_image_max_height_portrait">480dp</dimen> + <dimen name="share_list_width_landscape">200dp</dimen> </resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index 8a1652a..96d269f 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -24,4 +24,5 @@ <color name="review_control_pressed_color">#FF6899FF</color> <color name="icon_disabled_color">#DD777777</color> <color name="time_lapse_arc">#FFC5C5C5</color> + <color name="dark_gray">#151515</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index cd42854..7978d9c 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -23,4 +23,5 @@ <dimen name="share_image_max_height_landscape">240dp</dimen> <dimen name="share_image_max_width_portrait">240dp</dimen> <dimen name="share_image_max_height_portrait">240dp</dimen> + <dimen name="share_list_width_landscape">180dp</dimen> </resources> diff --git a/res/values/ids.xml b/res/values/ids.xml deleted file mode 100644 index 81d920f..0000000 --- a/res/values/ids.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 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. ---> - -<resources> - <item type="id" name="btn_gallery" /> -</resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 05c28a0..520ae31 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -117,4 +117,8 @@ <item name="android:textSize">16dp</item> <item name="android:background">@drawable/bg_text_on_preview</item> </style> + <style name="AnimationPopup" parent="android:Animation"> + <item name="android:windowEnterAnimation">@anim/grow_fade_in_from_top_right</item> + <item name="android:windowExitAnimation">@anim/shrink_fade_out_from_top_right</item> + </style> </resources> |