Merge "Use screen height to determine # of QS rows." into pi-dev
am: 9376380a27
Change-Id: I8962708b492513e1392515580b2936191d97e9e9
This commit is contained in:
22
packages/SystemUI/res/values-h320dp/config.xml
Normal file
22
packages/SystemUI/res/values-h320dp/config.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>
|
||||
22
packages/SystemUI/res/values-h600dp/config.xml
Normal file
22
packages/SystemUI/res/values-h600dp/config.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>
|
||||
@@ -20,8 +20,5 @@
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
<integer name="quick_settings_num_rows">2</integer>
|
||||
<integer name="quick_settings_num_rows_portrait">3</integer>
|
||||
|
||||
<bool name="quick_settings_show_full_alarm">true</bool>
|
||||
</resources>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
<integer name="quick_settings_num_rows">3</integer>
|
||||
</resources>
|
||||
@@ -112,7 +112,6 @@
|
||||
|
||||
<!-- The number of rows in the QuickSettings -->
|
||||
<integer name="quick_settings_num_rows">1</integer>
|
||||
<integer name="quick_settings_num_rows_portrait">2</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>
|
||||
|
||||
@@ -375,11 +375,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
||||
}
|
||||
|
||||
private int getRows() {
|
||||
final Resources res = getContext().getResources();
|
||||
if (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
return res.getInteger(R.integer.quick_settings_num_rows_portrait);
|
||||
}
|
||||
return Math.max(1, res.getInteger(R.integer.quick_settings_num_rows));
|
||||
return Math.max(1, getResources().getInteger(R.integer.quick_settings_num_rows));
|
||||
}
|
||||
|
||||
public void setMaxRows(int maxRows) {
|
||||
|
||||
Reference in New Issue
Block a user