diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-11-18 23:44:48 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-11-21 15:20:16 +0530 |
commit | c13403c612748bfdf06436510600230c4c4b55ec (patch) | |
tree | b6b8266eb906cb7f4a2c920f7924d1801de1b97e /res | |
parent | aa8a871e337fe42e9339b96833eaf37bf2b64b2f (diff) | |
download | android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.gz android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.bz2 android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.zip |
Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml
> Defining attributes in xml
Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/folder_page.xml | 24 | ||||
-rw-r--r-- | res/layout/hotseat.xml | 3 | ||||
-rw-r--r-- | res/layout/workspace_screen.xml | 3 | ||||
-rw-r--r-- | res/values/attrs.xml | 8 |
4 files changed, 36 insertions, 2 deletions
diff --git a/res/layout/folder_page.xml b/res/layout/folder_page.xml new file mode 100644 index 000000000..084e8fdb6 --- /dev/null +++ b/res/layout/folder_page.xml @@ -0,0 +1,24 @@ +<?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.CellLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:launcher="http://schemas.android.com/apk/res-auto" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:hapticFeedbackEnabled="false" + android:importantForAccessibility="no" + launcher:containerType="folder" /> diff --git a/res/layout/hotseat.xml b/res/layout/hotseat.xml index 7bef889a9..f5b5bbf71 100644 --- a/res/layout/hotseat.xml +++ b/res/layout/hotseat.xml @@ -20,5 +20,6 @@ android:id="@+id/layout" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="center" /> + android:layout_gravity="center" + launcher:containerType="hotseat" /> </com.android.launcher3.Hotseat> diff --git a/res/layout/workspace_screen.xml b/res/layout/workspace_screen.xml index faf688503..94bdedbec 100644 --- a/res/layout/workspace_screen.xml +++ b/res/layout/workspace_screen.xml @@ -19,4 +19,5 @@ xmlns:launcher="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:hapticFeedbackEnabled="false" /> + android:hapticFeedbackEnabled="false" + launcher:containerType="workspace" /> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 32bccb82c..1e34c0f22 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -112,4 +112,12 @@ <attr name="defaultLayoutId" format="reference" /> </declare-styleable> + <declare-styleable name="CellLayout"> + <attr name="containerType" format="integer"> + <enum name="workspace" value="0" /> + <enum name="hotseat" value="1" /> + <enum name="folder" value="2" /> + </attr> + </declare-styleable> + </resources> |