diff options
author | Tony Wickham <twickham@google.com> | 2016-04-28 17:39:03 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2016-06-29 17:48:46 -0700 |
commit | 1bce7fd342875be8f7c1f82c8cf21d0199c8d544 (patch) | |
tree | 44871413914606a046e9f4dcf24d3ee3bd1a8756 /res/layout | |
parent | 3ccedd234acb1534190c596351cf293e8ef4727a (diff) | |
download | android_packages_apps_Trebuchet-1bce7fd342875be8f7c1f82c8cf21d0199c8d544.tar.gz android_packages_apps_Trebuchet-1bce7fd342875be8f7c1f82c8cf21d0199c8d544.tar.bz2 android_packages_apps_Trebuchet-1bce7fd342875be8f7c1f82c8cf21d0199c8d544.zip |
Long-press on an app to reveal its shortcuts.
- Add ShortcutsContainerListener to icons on workspace, folders, and
all apps. This handles long-press and forwards following touches to
the DeepShortcutsContainer that is created.
- Drag over shortcut before lifting finger to launch it.
- Shortcuts are rendered in pill-shaped DeepShortcutViews,
which are inside DeepShortcutContainer on DragLayer.
- The shortcut container orients above or below the icon, and left or
right-aligns with it. Biases for above + left-align.
- Long press a DeepShortcutPill to drag and pin it to the workspace.
Bug: 28980830
Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/deep_shortcut.xml | 20 | ||||
-rw-r--r-- | res/layout/deep_shortcuts_container.xml | 25 |
2 files changed, 45 insertions, 0 deletions
diff --git a/res/layout/deep_shortcut.xml b/res/layout/deep_shortcut.xml new file mode 100644 index 000000000..b87923564 --- /dev/null +++ b/res/layout/deep_shortcut.xml @@ -0,0 +1,20 @@ +<?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. +--> + +<com.android.launcher3.shortcuts.DeepShortcutView + xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/Icon.DeepShortcut" + android:focusable="true"/> diff --git a/res/layout/deep_shortcuts_container.xml b/res/layout/deep_shortcuts_container.xml new file mode 100644 index 000000000..0441995f1 --- /dev/null +++ b/res/layout/deep_shortcuts_container.xml @@ -0,0 +1,25 @@ +<?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. +--> + +<com.android.launcher3.shortcuts.DeepShortcutsContainer + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/deep_shortcuts_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:elevation="@dimen/deep_shortcuts_elevation" + android:orientation="vertical"> + +</com.android.launcher3.shortcuts.DeepShortcutsContainer>
\ No newline at end of file |