diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-07-11 21:16:33 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-07-11 21:16:33 +0000 |
commit | 6f21ff341b92f4ad9ad5516da387b64822dc1441 (patch) | |
tree | feff7ba221efa61876c9926312bf0ab95fd44aae /res | |
parent | c9b6d8432837c578b602a0d779bc425db27cb42e (diff) | |
parent | 819e1936bba39219a8fb2ceef5d172ca667e6658 (diff) | |
download | android_packages_apps_Trebuchet-6f21ff341b92f4ad9ad5516da387b64822dc1441.tar.gz android_packages_apps_Trebuchet-6f21ff341b92f4ad9ad5516da387b64822dc1441.tar.bz2 android_packages_apps_Trebuchet-6f21ff341b92f4ad9ad5516da387b64822dc1441.zip |
Merge "Defining the list of predefined device profiles in xml. This allows the profiles to be easily customized by derivatives." into ub-launcher3-calgary
Diffstat (limited to 'res')
-rw-r--r-- | res/values/attrs.xml | 24 | ||||
-rw-r--r-- | res/xml/device_profiles.xml | 196 |
2 files changed, 220 insertions, 0 deletions
diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 21a05c065..308c71c41 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -85,4 +85,28 @@ <!-- Fallback attr for pre-API 25 support --> <attr name="colorSecondary" format="reference|color" /> + + <declare-styleable name="InvariantDeviceProfile"> + <attr name="name" format="string" /> + <attr name="minWidthDps" format="float" /> + <attr name="minHeightDps" format="float" /> + + <attr name="numRows" format="integer" /> + <attr name="numColumns" format="integer" /> + <!-- numFolderRows & numFolderColumns defaults to numRows & numColumns, if not specified --> + <attr name="numFolderRows" format="integer" /> + <attr name="numFolderColumns" format="integer" /> + <!-- minAllAppsPredictionColumns defaults to numColumns, if not specified --> + <attr name="minAllAppsPredictionColumns" format="integer" /> + <!-- numHotseatIcons defaults to numColumns, if not specified --> + <attr name="numHotseatIcons" format="integer" /> + + <attr name="iconSize" format="float" /> + <attr name="iconTextSize" format="float" /> + <!-- hotseatIconSize defaults to iconSize, if not specified --> + <attr name="hotseatIconSize" format="float" /> + + <attr name="defaultLayoutId" format="reference" /> + </declare-styleable> + </resources> diff --git a/res/xml/device_profiles.xml b/res/xml/device_profiles.xml new file mode 100644 index 000000000..aeda1a2b0 --- /dev/null +++ b/res/xml/device_profiles.xml @@ -0,0 +1,196 @@ +<?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. +--> + +<profiles xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3" > + + <profile + launcher:name="Super Short Stubby" + launcher:minWidthDps="255" + launcher:minHeightDps="300" + launcher:numRows="2" + launcher:numColumns="3" + launcher:numFolderRows="2" + launcher:numFolderColumns="3" + launcher:minAllAppsPredictionColumns="3" + launcher:iconSize="48" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="3" + launcher:hotseatIconSize="48" + launcher:defaultLayoutId="@xml/default_workspace_3x3" + /> + + <profile + launcher:name="Shorter Stubby" + launcher:minWidthDps="255" + launcher:minHeightDps="400" + launcher:numRows="3" + launcher:numColumns="3" + launcher:numFolderRows="3" + launcher:numFolderColumns="3" + launcher:minAllAppsPredictionColumns="3" + launcher:iconSize="48" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="3" + launcher:hotseatIconSize="48" + launcher:defaultLayoutId="@xml/default_workspace_3x3" + /> + + <profile + launcher:name="Short Stubby" + launcher:minWidthDps="275" + launcher:minHeightDps="420" + launcher:numRows="3" + launcher:numColumns="4" + launcher:numFolderRows="3" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="48" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="48" + launcher:defaultLayoutId="@xml/default_workspace_4x4" + /> + + <profile + launcher:name="Stubby" + launcher:minWidthDps="255" + launcher:minHeightDps="450" + launcher:numRows="3" + launcher:numColumns="4" + launcher:numFolderRows="3" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="48" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="48" + launcher:defaultLayoutId="@xml/default_workspace_4x4" + /> + + <profile + launcher:name="Nexus S" + launcher:minWidthDps="296" + launcher:minHeightDps="491.33" + launcher:numRows="4" + launcher:numColumns="4" + launcher:numFolderRows="4" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="48" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="48" + launcher:defaultLayoutId="@xml/default_workspace_4x4" + /> + + <profile + launcher:name="Nexus 4" + launcher:minWidthDps="359" + launcher:minHeightDps="567" + launcher:numRows="4" + launcher:numColumns="4" + launcher:numFolderRows="4" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="60" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="56" + launcher:defaultLayoutId="@xml/default_workspace_4x4" + /> + + <profile + launcher:name="Nexus 5" + launcher:minWidthDps="335" + launcher:minHeightDps="567" + launcher:numRows="4" + launcher:numColumns="4" + launcher:numFolderRows="4" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="60" + launcher:iconTextSize="13.0" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="56" + launcher:defaultLayoutId="@xml/default_workspace_4x4" + /> + + <profile + launcher:name="Large Phone" + launcher:minWidthDps="406" + launcher:minHeightDps="694" + launcher:numRows="5" + launcher:numColumns="5" + launcher:numFolderRows="4" + launcher:numFolderColumns="4" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="64" + launcher:iconTextSize="14.4" + launcher:numHotseatIcons="5" + launcher:hotseatIconSize="56" + launcher:defaultLayoutId="@xml/default_workspace_5x5" + /> + + <profile + launcher:name="Nexus 7" + launcher:minWidthDps="575" + launcher:minHeightDps="904" + launcher:numRows="5" + launcher:numColumns="6" + launcher:numFolderRows="4" + launcher:numFolderColumns="5" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="72" + launcher:iconTextSize="14.4" + launcher:numHotseatIcons="7" + launcher:hotseatIconSize="60" + launcher:defaultLayoutId="@xml/default_workspace_5x6" + /> + + <profile + launcher:name="Nexus 10" + launcher:minWidthDps="727" + launcher:minHeightDps="1207" + launcher:numRows="5" + launcher:numColumns="6" + launcher:numFolderRows="4" + launcher:numFolderColumns="5" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="76" + launcher:iconTextSize="14.4" + launcher:numHotseatIcons="7" + launcher:hotseatIconSize="76" + launcher:defaultLayoutId="@xml/default_workspace_5x6" + /> + + <profile + launcher:name="20-inch Tablet" + launcher:minWidthDps="1527" + launcher:minHeightDps="2527" + launcher:numRows="7" + launcher:numColumns="7" + launcher:numFolderRows="6" + launcher:numFolderColumns="6" + launcher:minAllAppsPredictionColumns="4" + launcher:iconSize="100" + launcher:iconTextSize="20.0" + launcher:numHotseatIcons="7" + launcher:hotseatIconSize="72" + launcher:defaultLayoutId="@xml/default_workspace_5x6" + /> + +</profiles>
\ No newline at end of file |