Files
lawnchair/tests/res/xml/invalid_responsive_spec_2.xml
Jordan Silva 2de6a277b7 Update responsive grid spec cell size remainderSpace logic
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.

Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
2024-01-08 19:40:01 -03:00

55 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2023 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.
-->
<!-- invalid file - groups (specs) applied only for half of the specs -->
<workspaceSpecs xmlns:launcher="http://schemas.android.com/apk/res-auto">
<specs launcher:maxAspectRatio="10">
<workspaceSpec
launcher:maxAvailableSize="9999dp"
launcher:dimensionType="height">
<cellSize launcher:fixedSize="104dp" />
<endPadding launcher:ofRemainderSpace="1" />
<gutter launcher:fixedSize="16dp" />
<startPadding launcher:fixedSize="8dp" />
</workspaceSpec>
<workspaceSpec
launcher:maxAvailableSize="9999dp"
launcher:dimensionType="width">
<cellSize launcher:ofRemainderSpace="1" />
<endPadding launcher:fixedSize="22dp" />
<gutter launcher:fixedSize="16dp" />
<startPadding launcher:fixedSize="22dp" />
</workspaceSpec>
</specs>
<workspaceSpec
launcher:maxAvailableSize="9999dp"
launcher:dimensionType="width">
<cellSize launcher:ofRemainderSpace="1" />
<endPadding launcher:fixedSize="22dp" />
<gutter launcher:fixedSize="16dp" />
<startPadding launcher:fixedSize="22dp" />
</workspaceSpec>
<workspaceSpec
launcher:maxAvailableSize="9999dp"
launcher:dimensionType="height">
<cellSize launcher:fixedSize="104dp" />
<endPadding launcher:ofRemainderSpace="1" />
<gutter launcher:fixedSize="16dp" />
<startPadding launcher:fixedSize="8dp" />
</workspaceSpec>
</workspaceSpecs>