Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 712ae392 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Refactor PagedTileLayout to not overflow screen

PagedTileLayout respects MeasureSpec mode for height to decide on how many
rows to show. TilePage and PagedTileLayout only show as many rows as
they can up to the height of the screen. TileLayout can calculate the
maximum number of rows given a height limit.

Fixes: 113082314
Test: Visual, atest

Change-Id: I2860d71c9aeb2a8ac62fcdbc71a3041a91605bcb
parent 5ed02df4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tile_page"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:paddingStart="@dimen/notification_side_paddings"
    android:paddingEnd="@dimen/notification_side_paddings"
    android:clipChildren="false"
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom">
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2017, 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>
    <!-- The number of rows in the QuickSettings -->
    <integer name="quick_settings_num_rows">2</integer>
</resources>
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2017, 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>
    <!-- The number of rows in the QuickSettings -->
    <integer name="quick_settings_num_rows">3</integer>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@
    <integer name="quick_settings_num_columns">3</integer>

    <!-- The number of rows in the QuickSettings -->
    <integer name="quick_settings_num_rows">1</integer>
    <integer name="quick_settings_max_rows">3</integer>

    <!-- The number of columns that the top level tiles span in the QuickSettings -->
    <integer name="quick_settings_user_time_settings_tile_span">1</integer>
Loading