mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs
When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.
This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.
I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.
Bug: 175329686
Test: - switching between device profiles,
- testing folder open/close
- testing in multiwindow
- testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
211 lines
8.7 KiB
XML
211 lines
8.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
/* Copyright 2008, 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 xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<!-- Attributes used for launcher theme -->
|
|
<attr name="allAppsScrimColor" format="color" />
|
|
<attr name="allAppsInterimScrimAlpha" format="integer" />
|
|
<attr name="allAppsNavBarScrimColor" format="color" />
|
|
<attr name="allAppsTheme" format="reference" />
|
|
<attr name="popupColorPrimary" format="color" />
|
|
<attr name="popupColorSecondary" format="color" />
|
|
<attr name="popupColorTertiary" format="color" />
|
|
<attr name="isMainColorDark" format="boolean" />
|
|
<attr name="isWorkspaceDarkText" format="boolean" />
|
|
<attr name="workspaceTextColor" format="color" />
|
|
<attr name="workspaceShadowColor" format="color" />
|
|
<attr name="workspaceAmbientShadowColor" format="color" />
|
|
<attr name="workspaceKeyShadowColor" format="color" />
|
|
<attr name="workspaceStatusBarScrim" format="reference" />
|
|
<attr name="widgetsTheme" format="reference" />
|
|
<attr name="loadingIconColor" format="color" />
|
|
<attr name="iconOnlyShortcutColor" format="color" />
|
|
<attr name="eduHalfSheetBGColor" format="color" />
|
|
|
|
<attr name="folderDotColor" format="color" />
|
|
<attr name="folderFillColor" format="color" />
|
|
<attr name="folderIconRadius" format="float" />
|
|
<attr name="folderIconBorderColor" format="color" />
|
|
<attr name="folderTextColor" format="color" />
|
|
<attr name="folderHintColor" format="color" />
|
|
<attr name="workProfileOverlayTextColor" format="color" />
|
|
<attr name="disabledIconAlpha" format="float" />
|
|
|
|
<!-- BubbleTextView specific attributes. -->
|
|
<declare-styleable name="BubbleTextView">
|
|
<attr name="layoutHorizontal" format="boolean" />
|
|
<attr name="iconSizeOverride" format="dimension" />
|
|
<attr name="iconDisplay" format="integer">
|
|
<enum name="workspace" value="0" />
|
|
<enum name="all_apps" value="1" />
|
|
<enum name="folder" value="2" />
|
|
<enum name="widget_section" value="3" />
|
|
<enum name="shortcut_popup" value="4" />
|
|
<enum name="hero_app" value="5" />
|
|
<enum name="taskbar" value="6" />
|
|
</attr>
|
|
<attr name="centerVertically" format="boolean" />
|
|
</declare-styleable>
|
|
|
|
<!-- BubbleTextView specific attributes. -->
|
|
<declare-styleable name="FolderIconPreview">
|
|
<attr name="folderFillColor" />
|
|
<attr name="folderIconBorderColor" />
|
|
<attr name="folderDotColor" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="SearchResultSuggestion">
|
|
<attr name="customIcon" format="reference" />
|
|
<attr name="matchTextInsetWithQuery" format="boolean" />
|
|
</declare-styleable>
|
|
|
|
|
|
<declare-styleable name="ShadowInfo">
|
|
<attr name="ambientShadowColor" format="color" />
|
|
<attr name="ambientShadowBlur" format="dimension" />
|
|
<attr name="keyShadowColor" format="color" />
|
|
<attr name="keyShadowBlur" format="dimension" />
|
|
<attr name="keyShadowOffset" format="dimension" />
|
|
</declare-styleable>
|
|
|
|
<!-- PagedView specific attributes. These attributes are used to customize
|
|
a PagedView view in XML files. -->
|
|
<declare-styleable name="PagedView">
|
|
<!-- The page indicator for this workspace -->
|
|
<attr name="pageIndicator" format="reference" />
|
|
</declare-styleable>
|
|
|
|
<!-- XML attributes used by default_workspace.xml -->
|
|
<declare-styleable name="Favorite">
|
|
<attr name="className" format="string" />
|
|
<attr name="packageName" format="string" />
|
|
<attr name="container" format="string" />
|
|
<attr name="screen" format="string" />
|
|
<attr name="x" format="string" />
|
|
<attr name="y" format="string" />
|
|
<attr name="spanX" format="string" />
|
|
<attr name="spanY" format="string" />
|
|
<attr name="icon" format="reference" />
|
|
<attr name="title" format="string" />
|
|
<attr name="uri" format="string" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="Extra">
|
|
<attr name="key" format="string" />
|
|
<attr name="value" format="string" />
|
|
</declare-styleable>
|
|
<declare-styleable name="Include">
|
|
<attr name="workspace" format="reference" />
|
|
<attr name="folderItems" format="reference" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="InsettableFrameLayout_Layout">
|
|
<attr name="layout_ignoreInsets" format="boolean" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="GridDisplayOption">
|
|
<attr name="name" format="string" />
|
|
|
|
<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" />
|
|
<!-- numHotseatIcons defaults to numColumns, if not specified -->
|
|
<attr name="numHotseatIcons" format="integer" />
|
|
<attr name="dbFile" format="string" />
|
|
<!-- numAllAppsColumns defaults to numColumns, if not specified -->
|
|
<attr name="numAllAppsColumns" format="integer" />
|
|
<attr name="defaultLayoutId" format="reference" />
|
|
<attr name="demoModeLayoutId" format="reference" />
|
|
<attr name="isScalable" format="boolean" />
|
|
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="DevicePadding">
|
|
<attr name="maxEmptySpace" format="dimension" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="DevicePaddingFormula">
|
|
<attr name="a" format="float|dimension" />
|
|
<attr name="b" format="float|dimension" />
|
|
<attr name="c" format="float|dimension" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="ProfileDisplayOption">
|
|
<attr name="name" />
|
|
<attr name="minWidthDps" format="float" />
|
|
<attr name="minHeightDps" format="float" />
|
|
|
|
<!-- These min cell values are only used if GridDisplayOption#isScalable is true-->
|
|
<attr name="minCellHeightDps" format="float" />
|
|
<attr name="minCellWidthDps" format="float" />
|
|
|
|
<attr name="borderSpacingDps" format="float" />
|
|
|
|
<attr name="iconImageSize" format="float" />
|
|
<!-- landscapeIconSize defaults to iconSize, if not specified -->
|
|
<attr name="landscapeIconSize" format="float" />
|
|
<attr name="iconTextSize" format="float" />
|
|
<!-- If true, this display option is used to determine the default grid -->
|
|
<attr name="canBeDefault" format="boolean" />
|
|
|
|
<!-- The following values are only enabled if grid is supported. -->
|
|
<!-- allAppsIconSize defaults to iconSize, if not specified -->
|
|
<attr name="allAppsIconSize" format="float" />
|
|
<!-- allAppsIconTextSize defaults to iconTextSize, if not specified -->
|
|
<attr name="allAppsIconTextSize" format="float" />
|
|
</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>
|
|
|
|
<declare-styleable name="ShadowDrawable">
|
|
<attr name="android:src" />
|
|
<attr name="android:shadowColor" />
|
|
<attr name="android:elevation" />
|
|
<attr name="darkTintColor" format="color" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="RecyclerViewFastScroller">
|
|
<attr name="canThumbDetach" format="boolean" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="LoggablePref">
|
|
<attr name="android:key" />
|
|
<attr name="android:defaultValue" />
|
|
<!-- Ground truth of this Pref integer can be found in StatsLogManager -->
|
|
<attr name="logIdOn" format="integer" />
|
|
<attr name="logIdOff" format="integer" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="PreviewFragment">
|
|
<attr name="android:name" />
|
|
<attr name="android:id" />
|
|
</declare-styleable>
|
|
|
|
<declare-styleable name="WidgetsListRowHeader">
|
|
<attr name="appIconSize" format="dimension" />
|
|
</declare-styleable>
|
|
</resources>
|