diff options
author | Tony Wickham <twickham@google.com> | 2017-03-01 19:01:19 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-03-01 19:01:19 +0000 |
commit | f41b889b381ccab0e07e51f248d3d070ae7a6d41 (patch) | |
tree | abd3c5b6d6b6ead1c3ac1682e166b65d67490057 /res | |
parent | e5298a57152674a9823914e12ba7b16f63bfa14f (diff) | |
parent | 12fec49834d247cfe65ceec95568daf384083c58 (diff) | |
download | android_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.tar.gz android_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.tar.bz2 android_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.zip |
Merge "Merge deep shortcuts in rounded rect" into ub-launcher3-dorval
am: 12fec49834
Change-Id: I7662f40eade7665f2aa1aba2e341c4ed126a8f14
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/bg_pill_focused.xml | 24 | ||||
-rw-r--r-- | res/drawable/bg_white_pill.xml | 21 | ||||
-rw-r--r-- | res/layout/deep_shortcut.xml | 20 | ||||
-rw-r--r-- | res/layout/notification.xml | 2 | ||||
-rw-r--r-- | res/layout/notification_footer.xml | 2 | ||||
-rw-r--r-- | res/layout/shortcuts_item.xml | 32 | ||||
-rw-r--r-- | res/values/dimens.xml | 13 |
7 files changed, 54 insertions, 60 deletions
diff --git a/res/drawable/bg_pill_focused.xml b/res/drawable/bg_pill_focused.xml deleted file mode 100644 index 54075d92c..000000000 --- a/res/drawable/bg_pill_focused.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2016 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_focused="true"> - <shape android:shape="rectangle"> - <stroke android:color="?android:attr/colorControlActivated" android:width="2dp" /> - <corners android:radius="@dimen/bg_pill_radius" /> - </shape> - </item> -</selector>
\ No newline at end of file diff --git a/res/drawable/bg_white_pill.xml b/res/drawable/bg_white_pill.xml deleted file mode 100644 index f92f7394e..000000000 --- a/res/drawable/bg_white_pill.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2016 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. ---> - -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - <solid android:color="#FFFFFF" /> - <corners android:radius="@dimen/bg_pill_radius" /> -</shape>
\ No newline at end of file diff --git a/res/layout/deep_shortcut.xml b/res/layout/deep_shortcut.xml index 6c1d4da91..b2ed709e2 100644 --- a/res/layout/deep_shortcut.xml +++ b/res/layout/deep_shortcut.xml @@ -17,18 +17,16 @@ <com.android.launcher3.shortcuts.DeepShortcutView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto" - android:layout_width="@dimen/bg_pill_width" - android:layout_height="@dimen/bg_pill_height" - android:elevation="@dimen/deep_shortcuts_elevation" - android:background="@drawable/bg_white_pill" > + android:layout_width="@dimen/bg_popup_item_width" + android:layout_height="@dimen/bg_popup_item_height" > <com.android.launcher3.shortcuts.DeepShortcutTextView style="@style/BaseIcon" android:id="@+id/deep_shortcut" - android:background="@drawable/bg_pill_focused" + android:background="?android:attr/selectableItemBackground" android:gravity="start|center_vertical" android:textAlignment="viewStart" - android:paddingStart="@dimen/bg_pill_height" + android:paddingStart="@dimen/bg_popup_item_height" android:paddingEnd="@dimen/deep_shortcut_padding_end" android:drawableEnd="@drawable/deep_shortcuts_drag_handle" android:drawablePadding="@dimen/deep_shortcut_drawable_padding" @@ -40,10 +38,18 @@ android:elevation="@dimen/deep_shortcuts_elevation" /> <View - android:id="@+id/popup_item_icon" + android:id="@+id/icon" android:layout_width="@dimen/deep_shortcut_icon_size" android:layout_height="@dimen/deep_shortcut_icon_size" android:layout_margin="@dimen/deep_shortcut_padding_start" android:layout_gravity="start" /> + <View + android:id="@+id/divider" + android:layout_width="@dimen/deep_shortcuts_divider_width" + android:layout_height="@dimen/popup_item_divider_height" + android:layout_gravity="end|bottom" + android:visibility="gone" + android:background="?android:attr/listDivider" /> + </com.android.launcher3.shortcuts.DeepShortcutView> diff --git a/res/layout/notification.xml b/res/layout/notification.xml index 48c7b48b9..e148cbb44 100644 --- a/res/layout/notification.xml +++ b/res/layout/notification.xml @@ -17,7 +17,7 @@ <com.android.launcher3.notification.NotificationItemView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/notification_view" - android:layout_width="@dimen/bg_pill_width" + android:layout_width="@dimen/bg_popup_item_width" android:layout_height="wrap_content" android:elevation="@dimen/deep_shortcuts_elevation" android:background="@drawable/bg_white_round_rect"> diff --git a/res/layout/notification_footer.xml b/res/layout/notification_footer.xml index c025819a2..54282086c 100644 --- a/res/layout/notification_footer.xml +++ b/res/layout/notification_footer.xml @@ -26,7 +26,7 @@ <View android:id="@+id/divider" android:layout_width="match_parent" - android:layout_height="@dimen/notification_divider_height"/> + android:layout_height="@dimen/popup_item_divider_height"/> <LinearLayout android:id="@+id/icon_row" diff --git a/res/layout/shortcuts_item.xml b/res/layout/shortcuts_item.xml new file mode 100644 index 000000000..8b20bcbdc --- /dev/null +++ b/res/layout/shortcuts_item.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2017 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. +--> + +<com.android.launcher3.shortcuts.ShortcutsItemView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/shortcuts_view" + android:layout_width="@dimen/bg_popup_item_width" + android:layout_height="wrap_content" + android:elevation="@dimen/deep_shortcuts_elevation" + android:background="@drawable/bg_white_round_rect"> + + <LinearLayout + android:id="@+id/deep_shortcuts" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + </LinearLayout> + +</com.android.launcher3.shortcuts.ShortcutsItemView> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 177e08e2f..8fee26b0b 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -150,10 +150,9 @@ <!-- Deep shortcuts --> <dimen name="deep_shortcuts_elevation">9dp</dimen> - <dimen name="bg_pill_width">208dp</dimen> - <dimen name="bg_pill_height">48dp</dimen> - <dimen name="bg_pill_radius">24dp</dimen> - <dimen name="deep_shortcuts_spacing">4dp</dimen> + <dimen name="bg_popup_item_width">208dp</dimen> + <dimen name="bg_popup_item_height">48dp</dimen> + <dimen name="popup_items_spacing">4dp</dimen> <dimen name="pre_drag_view_scale">6dp</dimen> <!-- an icon with shortcuts must be dragged this far before the container is removed. --> <dimen name="deep_shortcuts_start_drag_threshold">16dp</dimen> @@ -171,6 +170,8 @@ deep_shortcut_padding_end + deep_shortcut_drag_handle_size / 2 - deep_shortcuts_arrow_width / 2 also happens to equal 19dp--> <dimen name="deep_shortcuts_arrow_horizontal_offset">19dp</dimen> + <!-- popup_item_width - icon_size - padding_start - drawable_padding --> + <dimen name="deep_shortcuts_divider_width">158dp</dimen> <!-- Icon badges (with notification counts) --> <dimen name="badge_size">24dp</dimen> @@ -186,9 +187,9 @@ <!-- (icon_size - footer_icon_size) / 2 --> <dimen name="notification_footer_icon_row_padding">2dp</dimen> <dimen name="notification_main_height">60dp</dimen> - <dimen name="notification_footer_height">@dimen/bg_pill_height</dimen> + <dimen name="notification_footer_height">@dimen/bg_popup_item_height</dimen> <dimen name="notification_elevation">2dp</dimen> - <dimen name="notification_divider_height">0.5dp</dimen> + <dimen name="popup_item_divider_height">0.5dp</dimen> <dimen name="swipe_helper_falsing_threshold">70dp</dimen> <!-- Other --> |