diff options
author | cretin45 <cretin45@gmail.com> | 2014-12-14 09:21:04 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-03-28 14:56:24 -0700 |
commit | 2deb6f518822055f4b60bbe8afabc938a9023cc9 (patch) | |
tree | 8ec36653f503923f613c701ff3d5d49088dbc5ac | |
parent | fe66d39d4c7a4e8c0c3e623c54fd0daffe6cc093 (diff) | |
download | android_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.tar.gz android_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.tar.bz2 android_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.zip |
Gallery2: Materialization
- Material theme
- FAB
- New Icon
- Add missing resources for movie settings
- Fix action mode
- Vector drawables
Change-Id: I9c8cc81759502a417a5585fd1d3fd9b61e0bd68b
53 files changed, 379 insertions, 95 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4c9bf20cb..8b15d6cd0 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -24,7 +24,7 @@ <original-package android:name="com.android.gallery3d" /> - <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" /> + <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" /> <permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER" android:protectionLevel="signatureOrSystem" /> @@ -116,8 +116,9 @@ </intent-filter> </activity> - <activity android:name="com.android.gallery3d.app.GalleryActivity" android:label="@string/app_name" - android:configChanges="keyboardHidden|orientation|screenSize"> + <activity android:name="com.android.gallery3d.app.GalleryActivity" + android:label="@string/app_name" + android:configChanges="keyboardHidden|orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> @@ -195,8 +196,7 @@ <!-- This activity acts as a trampoline to the new Gallery activity, so that existing shortcuts are preserved. --> - <activity android:name="com.android.gallery3d.app.Gallery" - android:theme="@style/android:Theme.NoDisplay"> + <activity android:name="com.android.gallery3d.app.Gallery"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> diff --git a/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png b/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png Binary files differdeleted file mode 100644 index 06e5b4730..000000000 --- a/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png +++ /dev/null diff --git a/res/drawable-hdpi/frame_overlay_gallery_camera.png b/res/drawable-hdpi/frame_overlay_gallery_camera.png Binary files differindex b27bbe57f..aa3a3e571 100644 --- a/res/drawable-hdpi/frame_overlay_gallery_camera.png +++ b/res/drawable-hdpi/frame_overlay_gallery_camera.png diff --git a/res/drawable-hdpi/ic_cameraalbum_overlay.png b/res/drawable-hdpi/ic_cameraalbum_overlay.png Binary files differindex e58777f11..90ffbbd1a 100644 --- a/res/drawable-hdpi/ic_cameraalbum_overlay.png +++ b/res/drawable-hdpi/ic_cameraalbum_overlay.png diff --git a/res/drawable-hdpi/ic_menu_edit_holo_dark.png b/res/drawable-hdpi/ic_menu_edit_holo_dark.png Binary files differdeleted file mode 100644 index 54952f5d3..000000000 --- a/res/drawable-hdpi/ic_menu_edit_holo_dark.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_menu_share_holo_light.png b/res/drawable-hdpi/ic_menu_share_holo_light.png Binary files differdeleted file mode 100644 index 492d6090c..000000000 --- a/res/drawable-hdpi/ic_menu_share_holo_light.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_menu_trash_holo_light.png b/res/drawable-hdpi/ic_menu_trash_holo_light.png Binary files differdeleted file mode 100644 index 721ee5ca2..000000000 --- a/res/drawable-hdpi/ic_menu_trash_holo_light.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_switch_camera.png b/res/drawable-hdpi/ic_switch_camera.png Binary files differindex 11dd39ad7..509657dac 100644 --- a/res/drawable-hdpi/ic_switch_camera.png +++ b/res/drawable-hdpi/ic_switch_camera.png diff --git a/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png b/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png Binary files differdeleted file mode 100644 index 81de1bb46..000000000 --- a/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png +++ /dev/null diff --git a/res/drawable-mdpi/frame_overlay_gallery_camera.png b/res/drawable-mdpi/frame_overlay_gallery_camera.png Binary files differindex 3736a5c02..994b3f340 100644 --- a/res/drawable-mdpi/frame_overlay_gallery_camera.png +++ b/res/drawable-mdpi/frame_overlay_gallery_camera.png diff --git a/res/drawable-mdpi/ic_cameraalbum_overlay.png b/res/drawable-mdpi/ic_cameraalbum_overlay.png Binary files differindex 5d14c32e9..2cce0d472 100644 --- a/res/drawable-mdpi/ic_cameraalbum_overlay.png +++ b/res/drawable-mdpi/ic_cameraalbum_overlay.png diff --git a/res/drawable-mdpi/ic_menu_camera_holo_light.png b/res/drawable-mdpi/ic_menu_camera_holo_light.png Binary files differindex d42508410..aa3a3e571 100644 --- a/res/drawable-mdpi/ic_menu_camera_holo_light.png +++ b/res/drawable-mdpi/ic_menu_camera_holo_light.png diff --git a/res/drawable-mdpi/ic_menu_edit_holo_dark.png b/res/drawable-mdpi/ic_menu_edit_holo_dark.png Binary files differdeleted file mode 100644 index ca9188e18..000000000 --- a/res/drawable-mdpi/ic_menu_edit_holo_dark.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_menu_share_holo_light.png b/res/drawable-mdpi/ic_menu_share_holo_light.png Binary files differdeleted file mode 100644 index 29574f5bd..000000000 --- a/res/drawable-mdpi/ic_menu_share_holo_light.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_menu_single_track.png b/res/drawable-mdpi/ic_menu_single_track.png Binary files differdeleted file mode 100755 index b11c2e434..000000000 --- a/res/drawable-mdpi/ic_menu_single_track.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_menu_stereo.png b/res/drawable-mdpi/ic_menu_stereo.png Binary files differdeleted file mode 100755 index ef3ee9fe3..000000000 --- a/res/drawable-mdpi/ic_menu_stereo.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_menu_trash_holo_light.png b/res/drawable-mdpi/ic_menu_trash_holo_light.png Binary files differdeleted file mode 100644 index f45540b21..000000000 --- a/res/drawable-mdpi/ic_menu_trash_holo_light.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_switch_camera.png b/res/drawable-mdpi/ic_switch_camera.png Binary files differindex a97811757..90dd073be 100644 --- a/res/drawable-mdpi/ic_switch_camera.png +++ b/res/drawable-mdpi/ic_switch_camera.png diff --git a/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png b/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png Binary files differdeleted file mode 100644 index 36d8cf47e..000000000 --- a/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png +++ /dev/null diff --git a/res/drawable-xhdpi/frame_overlay_gallery_camera.png b/res/drawable-xhdpi/frame_overlay_gallery_camera.png Binary files differindex e2109ac4d..aa3a3e571 100644 --- a/res/drawable-xhdpi/frame_overlay_gallery_camera.png +++ b/res/drawable-xhdpi/frame_overlay_gallery_camera.png diff --git a/res/drawable-xhdpi/ic_cameraalbum_overlay.png b/res/drawable-xhdpi/ic_cameraalbum_overlay.png Binary files differindex bf71eaacf..6056fcc88 100644 --- a/res/drawable-xhdpi/ic_cameraalbum_overlay.png +++ b/res/drawable-xhdpi/ic_cameraalbum_overlay.png diff --git a/res/drawable-xhdpi/ic_menu_camera_holo_light.png b/res/drawable-xhdpi/ic_menu_camera_holo_light.png Binary files differnew file mode 100644 index 000000000..c1a3549bf --- /dev/null +++ b/res/drawable-xhdpi/ic_menu_camera_holo_light.png diff --git a/res/drawable-xhdpi/ic_menu_edit_holo_dark.png b/res/drawable-xhdpi/ic_menu_edit_holo_dark.png Binary files differdeleted file mode 100644 index 65e72c1e2..000000000 --- a/res/drawable-xhdpi/ic_menu_edit_holo_dark.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_switch_camera.png b/res/drawable-xhdpi/ic_switch_camera.png Binary files differindex 7d2406290..852225124 100644 --- a/res/drawable-xhdpi/ic_switch_camera.png +++ b/res/drawable-xhdpi/ic_switch_camera.png diff --git a/res/drawable-xxhdpi/ic_cameraalbum_overlay.png b/res/drawable-xxhdpi/ic_cameraalbum_overlay.png Binary files differnew file mode 100644 index 000000000..abf97ec64 --- /dev/null +++ b/res/drawable-xxhdpi/ic_cameraalbum_overlay.png diff --git a/res/drawable-xxxhdpi/ic_cameraalbum_overlay.png b/res/drawable-xxxhdpi/ic_cameraalbum_overlay.png Binary files differnew file mode 100644 index 000000000..762a41f18 --- /dev/null +++ b/res/drawable-xxxhdpi/ic_cameraalbum_overlay.png diff --git a/res/drawable/dropdown_ic_arrow.xml b/res/drawable/dropdown_ic_arrow.xml new file mode 100644 index 000000000..f9464faf3 --- /dev/null +++ b/res/drawable/dropdown_ic_arrow.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:fillColor="#ffffff" + android:pathData="M7,10l5,5l5-5H7Z" /> +</vector> diff --git a/res/drawable/fab_accent.xml b/res/drawable/fab_accent.xml new file mode 100644 index 000000000..f334676e8 --- /dev/null +++ b/res/drawable/fab_accent.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod 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. +--> + +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> + <solid android:color="@color/fab" /> +</shape> diff --git a/res/drawable/floating_action_button.xml b/res/drawable/floating_action_button.xml new file mode 100644 index 000000000..57a4c8fa9 --- /dev/null +++ b/res/drawable/floating_action_button.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod 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. +--> + +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="@color/floating_action_button_touch_tint"> + <item android:id="@android:id/mask"> + <shape android:shape="oval"> + <solid android:color="@color/fab" /> + </shape> + </item> +</ripple> diff --git a/res/drawable/ic_edit.xml b/res/drawable/ic_edit.xml new file mode 100644 index 000000000..1116c1c09 --- /dev/null +++ b/res/drawable/ic_edit.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="30dp" + android:height="30dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:pathData="M14,28c-3.31,0-6,2.689-6,6c0,2.62-2.31,4-4,4c1.84, + 2.439,4.99,4,8,4c4.42,0,8-3.58,8-8C20,30.689,17.31,28,14,28Z + M41.41,9.26l-2.67-2.67c-0.78-0.78-2.051-0.78-2.83,0L18, + 24.5l5.5,5.5l17.91-17.91C42.2,11.3,42.2,10.04,41.41,9.26z" /> + </vector> diff --git a/res/drawable/ic_menu_share.xml b/res/drawable/ic_menu_share.xml new file mode 100644 index 000000000..4f15606c0 --- /dev/null +++ b/res/drawable/ic_menu_share.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:pathData="M36,32.17c-1.52,0-2.891,0.59-3.93,1.54L17.82, + 25.4C17.93,24.95,18,24.48,18,24s-0.07-0.95-0.18-1.4l14.1-8.23 + c1.07,1,2.5,1.62,4.08,1.62c3.311,0,6-2.69,6-6c0-3.31-2.689-6-6-6s-6, + 2.69-6,6c0,0.48,0.07,0.95,0.18,1.4l-14.1,8.23 + c-1.07-1-2.5-1.62-4.08-1.62c-3.31,0-6,2.69-6,6c0,3.311,2.69,6,6,6c1.58, + 0,3.01-0.62,4.08-1.62l14.25,8.31c-0.1,0.42-0.16,0.86-0.16,1.311c0, + 3.221,2.609,5.83,5.83,5.83s5.83-2.609,5.83-5.83S39.221,32.17,36,32.17Z" + /> +</vector> diff --git a/res/drawable/ic_menu_single_track.xml b/res/drawable/ic_menu_single_track.xml new file mode 100644 index 000000000..9ca139a18 --- /dev/null +++ b/res/drawable/ic_menu_single_track.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:pathData="M24,4C12.97,4,4,12.97,4,24c0,11.029,8.97,20,20, + 20c11.029,0,20-8.971,20-20C44,12.97,35.029,4,24,4ZM24,40c-8.82, + 0-16-7.18-16-16c0-8.82,7.18-16,16-16c8.82,0,16,7.18,16,16C40,32.82, + 32.82,40,24,40zM30,24c0,3.311-2.689,6-6,6 + c-3.31,0-6-2.689-6-6c0-3.31,2.69-6,6-6C27.311,18,30,20.69,30,24z" /> +</vector> diff --git a/res/drawable/ic_menu_stereo.xml b/res/drawable/ic_menu_stereo.xml new file mode 100644 index 000000000..1d105878f --- /dev/null +++ b/res/drawable/ic_menu_stereo.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:pathData="M34,4H14c-2.21,0-4,1.79-4,4v32c0,2.21,1.79,3.98,4, + 3.98L34,44c2.21,0,4-1.79,4-4V8C38,5.79,36.21,4,34,4Z + M24,8 c2.21,0,4,1.79,4,4s-1.79,4-4,4s-4-1.79-4-4S21.79,8,24,8z + M24,40c-5.52,0-10-4.48-10-10c0-5.52,4.48-10,10-10c5.52,0,10,4.48,10,10 + C34,35.52,29.52,40,24,40zM24,24c-3.31,0-6,2.689-6,6s2.69,6,6,6c3.311, + 0,6-2.689,6-6S27.311,24,24,24z" /> +</vector> diff --git a/res/drawable/ic_menu_trash.xml b/res/drawable/ic_menu_trash.xml new file mode 100644 index 000000000..8c5f85ab2 --- /dev/null +++ b/res/drawable/ic_menu_trash.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:pathData="M12,38c0,2.21,1.79,4,4,4h16c2.21,0,4-1.79, + 4-4V14H12V38ZM38,8h-7l-2-2H19l-2,2h-7v4h28V8z" /> +</vector> diff --git a/res/layout-land/filtershow_grad_ui.xml b/res/layout-land/filtershow_grad_ui.xml index 71aa22ac5..8f6a8ae09 100644 --- a/res/layout-land/filtershow_grad_ui.xml +++ b/res/layout-land/filtershow_grad_ui.xml @@ -136,7 +136,7 @@ android:scaleType="centerInside" android:layout_weight="0" android:background="@drawable/filtershow_button_background" - android:src="@drawable/ic_menu_trash_holo_light" + android:src="@drawable/ic_menu_trash" android:paddingBottom="8dp" android:layout_marginEnd="48dp" /> diff --git a/res/layout/action_mode.xml b/res/layout/action_mode.xml index f107c26ee..096187b95 100644 --- a/res/layout/action_mode.xml +++ b/res/layout/action_mode.xml @@ -14,35 +14,22 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/navigation_bar" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal"> - - <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" android:layout_height="match_parent"> - <ImageView android:layout_gravity="end" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:src="@drawable/dropdown_ic_arrow_normal_holo_dark" /> - <Button android:id="@+id/selection_menu" - style="?android:attr/actionButtonStyle" - android:divider="?android:attr/listDividerAlertDialog" - android:textAppearance="?android:attr/textAppearanceLargePopupMenu" - android:textColor="?android:attr/actionMenuTextColor" - android:singleLine="true" - android:gravity="left|center_vertical" - android:paddingEnd="25dip" - android:layout_width="wrap_content" - android:layout_height="match_parent" /> - </FrameLayout> - <ImageView android:layout_marginStart="16dip" - android:layout_marginEnd="8dip" + <Button android:id="@+id/selection_menu" + style="?android:attr/actionButtonStyle" + android:divider="?android:attr/listDividerAlertDialog" + android:textAppearance="?android:attr/textAppearanceLargePopupMenu" + android:textColor="?android:attr/actionMenuTextColor" + android:singleLine="true" + android:gravity="left|center_vertical" + android:paddingRight="25dip" android:layout_width="wrap_content" - android:layout_height="match_parent" - android:gravity="bottom" - android:src="@drawable/cab_divider_vertical_dark" /> -</LinearLayout> + android:layout_height="match_parent" /> + <ImageView android:layout_width="wrap_content" + android:layout_height="match_parent" + android:src="@drawable/dropdown_ic_arrow" + android:layout_toRightOf="@id/selection_menu"/> + +</RelativeLayout> diff --git a/res/layout/filtershow_control_action_slider.xml b/res/layout/filtershow_control_action_slider.xml index 34eac1e69..ebaf7be18 100644 --- a/res/layout/filtershow_control_action_slider.xml +++ b/res/layout/filtershow_control_action_slider.xml @@ -48,7 +48,7 @@ android:scaleType="centerInside" android:layout_weight="0" android:background="@drawable/filtershow_button_background" - android:src="@drawable/ic_menu_trash_holo_light" + android:src="@drawable/ic_menu_trash" android:paddingBottom="8dp" /> </LinearLayout> diff --git a/res/layout/filtershow_presets_management_row.xml b/res/layout/filtershow_presets_management_row.xml index bd3e47928..d4e05bafe 100644 --- a/res/layout/filtershow_presets_management_row.xml +++ b/res/layout/filtershow_presets_management_row.xml @@ -47,6 +47,6 @@ android:background="@android:color/transparent" android:layout_weight=".1" android:gravity="center" - android:src="@drawable/ic_menu_trash_holo_light" + android:src="@drawable/ic_menu_trash" android:visibility="gone"/> </LinearLayout>
\ No newline at end of file diff --git a/res/layout/multigrid_content.xml b/res/layout/multigrid_content.xml index b1cb145a2..618af4898 100644 --- a/res/layout/multigrid_content.xml +++ b/res/layout/multigrid_content.xml @@ -36,7 +36,7 @@ </LinearLayout> - <FrameLayout android:id="@+id/gridContainer" + <HorizontalScrollView android:id="@+id/gridContainer" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -52,6 +52,6 @@ android:layout_height="match_parent" android:gravity="center" android:textAppearance="?android:attr/textAppearanceMedium" /> - </FrameLayout> + </HorizontalScrollView> -</FrameLayout>
\ No newline at end of file +</FrameLayout> diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml index 20b3c11cd..51f714ede 100644 --- a/res/layout/photopage_bottom_controls.xml +++ b/res/layout/photopage_bottom_controls.xml @@ -1,50 +1,80 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/photopage_bottom_controls" - android:padding="10dp" - android:layout_width="match_parent" + android:id="@+id/photopage_bottom_controls" + android:padding="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentRight="true" + android:orientation="horizontal" + android:visibility="gone"> + + <FrameLayout + android:id="@+id/photopage_bottom_control_tiny_planet" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/floating_action_button_margin_left" + android:layout_marginBottom="@dimen/floating_action_button_margin_bottom" + android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" + android:background="@drawable/floating_action_button" + android:elevation="@dimen/floating_action_button_translation_z" + android:clickable="true" + android:visibility="gone"> + <ImageButton + android:layout_width="@dimen/floating_action_button_width" + android:layout_height="@dimen/floating_action_button_height" + android:id="@+id/floating_action_button_tiny_planet" + android:background="@drawable/floating_action_button" + android:tint="@color/floating_action_button_icon_color" + android:src="@drawable/ic_menu_tiny_planet" + android:clickable="false" + android:duplicateParentState="true"/> + </FrameLayout> + + <FrameLayout + android:id="@+id/photopage_bottom_control_panorama" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/floating_action_button_margin_left" + android:layout_marginBottom="@dimen/floating_action_button_margin_bottom" + android:layout_centerHorizontal="true" + android:layout_alignParentBottom="true" + android:background="@drawable/floating_action_button" + android:elevation="@dimen/floating_action_button_translation_z" + android:clickable="true" + android:visibility="gone"> + <ImageButton + android:layout_width="70dp" + android:layout_height="70dp" + android:id="@+id/floating_action_button_panorama" + android:background="@drawable/floating_action_button" + android:tint="@color/floating_action_button_icon_color" + android:src="@drawable/ic_view_photosphere" + android:clickable="false" + android:duplicateParentState="true"/> + </FrameLayout> + + <FrameLayout + android:id="@+id/photopage_bottom_control_edit" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/floating_action_button_margin_right" + android:layout_marginBottom="@dimen/floating_action_button_margin_bottom" + android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" - android:layout_alignParentStart="true" - android:orientation="horizontal" + android:background="@drawable/fab_accent" + android:elevation="@dimen/floating_action_button_translation_z" + android:clickable="true" android:visibility="gone"> <ImageButton - android:id="@+id/photopage_bottom_control_edit" - android:src="@drawable/ic_menu_edit_holo_dark" - android:background="@drawable/photopage_bottom_button_background" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentBottom="true" - android:paddingTop="5dp" - android:paddingBottom="5dp" - android:paddingStart="15dp" - android:paddingEnd="15dp" - android:visibility="gone"/> - <ImageButton - android:id="@+id/photopage_bottom_control_panorama" - android:src="@drawable/ic_view_photosphere" - android:background="@drawable/transparent_button_background" - android:layout_width="70dp" - android:layout_height="70dp" - android:layout_centerHorizontal="true" - android:layout_alignParentBottom="true" - android:paddingTop="5dp" - android:paddingBottom="5dp" - android:paddingStart="5dp" - android:paddingEnd="5dp" - android:visibility="gone"/> - <ImageButton - android:id="@+id/photopage_bottom_control_tiny_planet" - android:src="@drawable/ic_menu_tiny_planet" - android:background="@drawable/photopage_bottom_button_background" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentBottom="true" - android:paddingTop="5dp" - android:paddingBottom="5dp" - android:paddingStart="15dp" - android:paddingEnd="15dp" - android:visibility="gone"/> -</RelativeLayout> + android:layout_width="@dimen/floating_action_button_width" + android:layout_height="@dimen/floating_action_button_height" + android:id="@+id/floating_action_button_edit" + android:background="@drawable/floating_action_button" + android:tint="@color/floating_action_button_icon_color" + android:src="@drawable/ic_edit" + android:clickable="false" + android:duplicateParentState="true"/> + </FrameLayout> + </RelativeLayout> diff --git a/res/menu/movie.xml b/res/menu/movie.xml index fde235cba..0676efb73 100644 --- a/res/menu/movie.xml +++ b/res/menu/movie.xml @@ -15,7 +15,7 @@ --> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/action_share" - android:icon="@drawable/ic_menu_share_holo_light" + android:icon="@drawable/ic_menu_share" android:title="@string/share" android:enabled="true" android:actionProviderClass="android.widget.ShareActionProvider" diff --git a/res/menu/operation.xml b/res/menu/operation.xml index ffc5afa4a..d6f954459 100644 --- a/res/menu/operation.xml +++ b/res/menu/operation.xml @@ -23,21 +23,21 @@ But, if share_panorama is set to never, it doesn't seem to get promoted to the action bar and stays on the overflow menu. --> <item android:id="@+id/action_share_panorama" - android:icon="@drawable/ic_menu_share_holo_light" + android:icon="@drawable/ic_menu_share" android:title="@string/share_panorama" android:visible="false" android:actionProviderClass="android.widget.ShareActionProvider" android:showAsAction="ifRoom"> </item> <item android:id="@+id/action_share" - android:icon="@drawable/ic_menu_share_holo_light" + android:icon="@drawable/ic_menu_share" android:title="@string/share" android:visible="false" android:actionProviderClass="android.widget.ShareActionProvider" android:showAsAction="never"> </item> <item android:id="@+id/action_delete" - android:icon="@drawable/ic_menu_trash_holo_light" + android:icon="@drawable/ic_menu_trash" android:title="@string/delete" android:visible="false" android:showAsAction="ifRoom" /> diff --git a/res/menu/photo.xml b/res/menu/photo.xml index 67e700b9f..9cc375601 100644 --- a/res/menu/photo.xml +++ b/res/menu/photo.xml @@ -23,19 +23,19 @@ But, if share_panorama is set to never, it doesn't seem to get promoted to the action bar and stays on the overflow menu. --> <item android:id="@+id/action_share_panorama" - android:icon="@drawable/ic_menu_share_holo_light" + android:icon="@drawable/ic_menu_share" android:title="@string/share_panorama" android:visible="false" android:actionProviderClass="android.widget.ShareActionProvider" android:showAsAction="ifRoom" /> <item android:id="@+id/action_share" - android:icon="@drawable/ic_menu_share_holo_light" + android:icon="@drawable/ic_menu_share" android:title="@string/share" android:visible="false" android:actionProviderClass="android.widget.ShareActionProvider" android:showAsAction="never" /> <item android:id="@+id/action_delete" - android:icon="@drawable/ic_menu_trash_holo_light" + android:icon="@drawable/ic_menu_trash" android:title="@string/delete" android:visible="false" android:showAsAction="never" /> diff --git a/res/mipmap-hdpi/ic_launcher_gallery.png b/res/mipmap-hdpi/ic_launcher_gallery.png Binary files differindex 23ea99890..72391b504 100644..100755 --- a/res/mipmap-hdpi/ic_launcher_gallery.png +++ b/res/mipmap-hdpi/ic_launcher_gallery.png diff --git a/res/mipmap-mdpi/ic_launcher_gallery.png b/res/mipmap-mdpi/ic_launcher_gallery.png Binary files differindex e1a99498d..c9a7bc86c 100644..100755 --- a/res/mipmap-mdpi/ic_launcher_gallery.png +++ b/res/mipmap-mdpi/ic_launcher_gallery.png diff --git a/res/mipmap-xhdpi/ic_launcher_gallery.png b/res/mipmap-xhdpi/ic_launcher_gallery.png Binary files differindex 79544a2b6..7ad882fda 100644..100755 --- a/res/mipmap-xhdpi/ic_launcher_gallery.png +++ b/res/mipmap-xhdpi/ic_launcher_gallery.png diff --git a/res/mipmap-xxhdpi/ic_launcher_gallery.png b/res/mipmap-xxhdpi/ic_launcher_gallery.png Binary files differnew file mode 100755 index 000000000..4b955009d --- /dev/null +++ b/res/mipmap-xxhdpi/ic_launcher_gallery.png diff --git a/res/mipmap-xxxhdpi/ic_launcher_gallery.png b/res/mipmap-xxxhdpi/ic_launcher_gallery.png Binary files differnew file mode 100755 index 000000000..fd4deea7d --- /dev/null +++ b/res/mipmap-xxxhdpi/ic_launcher_gallery.png diff --git a/res/values-v21/colors.xml b/res/values-v21/colors.xml new file mode 100644 index 000000000..4ebfd2881 --- /dev/null +++ b/res/values-v21/colors.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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> + <!-- configuration for album set page --> + <color name="albumset_background">#ff21272b</color> + <color name="albumset_placeholder">#37474F</color> + <color name="albumset_label_background">#EE37474F</color> + <color name="albumset_label_title">#FBFBFB</color> + <color name="albumset_label_count">#A9ABAD</color> + + <!-- configuration for album page --> + <color name="album_background">#ff21272b</color> + <color name="album_placeholder">#37474F</color> + + <!-- configuration for photo page --> + <color name="photo_background">#ff21272b</color> + <color name="photo_placeholder">#37474F</color> + + <!-- configuration for manage cache page --> + <color name="cache_background">#ff21272b</color> + <color name="cache_placeholder">#37474F</color> + + <color name="bitmap_screennail_placeholder">#37474F</color> + + <color name="slideshow_background">#ff21272b</color> + + <color name="button_dark_transparent_background">#263238</color> + + <color name="ingest_highlight_semitransparent">#8833b5e5</color> + <color name="ingest_date_tile_text">#33b5e5</color> + + <!-- FAB --> + <color name="fab">#FF9800</color> + <color name="floating_action_button_touch_tint">#FFB74D</color> + <color name="floating_action_button_icon_color">#ffffff</color> + +</resources> diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml new file mode 100644 index 000000000..ee239a657 --- /dev/null +++ b/res/values-v21/styles.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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> + <style name="Theme.GalleryBase" parent="android:Theme.Material"> + <item name="android:colorPrimary">@color/primary</item> + <item name="android:colorPrimaryDark">@color/primary_dark</item> + <item name="android:colorAccent">@color/accent</item> + <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item> + <item name="switchStyle">@android:style/Widget.CompoundButton</item> + </style> + <style name="Theme.Gallery.Dialog" parent="android:Theme.Material.Dialog"/> + <style name="Theme.Gallery" parent="Theme.GalleryBase"> + <item name="android:displayOptions"></item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:actionBarStyle">@style/Material.ActionBar</item> + <item name="android:colorBackground">@color/material_blue_grey_950</item> + <item name="android:colorBackgroundCacheHint">@color/material_blue_grey_950</item> + <item name="android:actionModeBackground">@color/primary</item> + </style> + <style name="Theme.Crop" parent="Theme.GalleryBase"> + <item name="android:displayOptions"></item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:actionBarStyle">@style/Material.ActionBar</item> + <item name="android:colorBackground">@null</item> + <item name="android:colorBackgroundCacheHint">@null</item> + <item name="android:windowBackground">@drawable/filtershow_tiled_background</item> + </style> + <style name="Material.ActionBar" parent="android:Widget.Material.ActionBar"> + <item name="android:title"></item> + <item name="android:displayOptions">useLogo|showTitle</item> + <item name="android:background">@color/primary</item> + <item name="android:backgroundStacked">@null</item> + <item name="android:titleTextStyle">@style/ActionBarTitle</item> + <item name="android:elevation">@dimen/action_bar_elevation</item> + </style> + <style name="ActionBarTitle" parent="android:style/TextAppearance.Material.Widget.ActionBar.Title"> + <item name="android:textStyle">bold</item> + <item name="android:textSize">18sp</item> + <item name="android:textAllCaps">true</item> + </style> + <style name="ActionBarTwoLinePrimary" parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title"></style> + <style name="ActionBarTwoLineSecondary" parent="@android:style/TextAppearance.Material.Widget.ActionBar.Subtitle"></style> + <style name="ActionBarTwoLineItem"> + <item name="android:background">?android:attr/activatedBackgroundIndicator</item> + </style> + <style name="Theme.Photos.Gallery" parent="android:Theme.Material"> + </style> + <style name="Theme.Photos.Fullscreen" parent="android:Theme.Material"> + </style> + <style name="DialogPickerTheme" parent="android:Theme.Material.Dialog"/> +</resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index 20b2930d7..9396a99cf 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -15,7 +15,10 @@ --> <resources> <color name="default_background">#000</color> - + <color name="primary">#37474F</color> + <color name="primary_dark">#263238</color> + <color name="accent">#607D8B</color> + <color name="material_blue_grey_950">#ff21272b</color> <!-- configuration for album set page --> <color name="albumset_background">#1A1A1A</color> <color name="albumset_placeholder">#333</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index ef742d2b5..ae8cc219e 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -152,4 +152,20 @@ <dimen name="photoeditor_text_padding">10dp</dimen> <dimen name="photoeditor_original_text_size">18dp</dimen> <dimen name="photoeditor_original_text_margin">4dp</dimen> + + <dimen name="action_bar_elevation">8dp</dimen> + + <!-- FAB --> + <!-- Floating action button --> + <dimen name="floating_action_button_height">56dp</dimen> + <dimen name="floating_action_button_width">56dp</dimen> + <dimen name="floating_action_button_radius">28dp</dimen> + <dimen name="floating_action_button_translation_z">5dp</dimen> + <dimen name="floating_action_button_margin_left">5dp</dimen> + <dimen name="floating_action_button_margin_right">5dp</dimen> + <dimen name="floating_action_button_margin_bottom">16dp</dimen> + <dimen name="elevation_low">1dp</dimen> + <dimen name="elevation_high">4dp</dimen> + <dimen name="add_button_margin">16dp</dimen> + </resources> diff --git a/src/com/android/gallery3d/app/GalleryActionBar.java b/src/com/android/gallery3d/app/GalleryActionBar.java index 588f5842a..11057fb02 100644 --- a/src/com/android/gallery3d/app/GalleryActionBar.java +++ b/src/com/android/gallery3d/app/GalleryActionBar.java @@ -47,6 +47,7 @@ public class GalleryActionBar implements OnNavigationListener { private ClusterRunner mClusterRunner; private CharSequence[] mTitles; + private CharSequence mTitle; private ArrayList<Integer> mActions; private Context mContext; private LayoutInflater mInflater; @@ -159,7 +160,8 @@ public class GalleryActionBar implements OnNavigationListener { parent, false); } TwoLineListItem view = (TwoLineListItem) convertView; - view.getText1().setText(mActionBar.getTitle()); + CharSequence title = mActionBar.getTitle(); + view.getText1().setText(title == null ? mTitle : title); view.getText2().setText((CharSequence) getItem(position)); return convertView; } @@ -326,12 +328,14 @@ public class GalleryActionBar implements OnNavigationListener { } public void setTitle(String title) { + mTitle = title; if (mActionBar != null) mActionBar.setTitle(title); } public void setTitle(int titleId) { if (mActionBar != null) { - mActionBar.setTitle(mContext.getString(titleId)); + mTitle = mContext.getString(titleId); + mActionBar.setTitle(mTitle); } } |