Adjust QuickQSPanel to fit Tablet display size
- Remove legacy standard_notification_panel_width - Define default max columns for QQS layout - Fix Pixcel C & Nexus 7 QQS Tiles over boundry problem Test: atest SystemUITests Fix: 110123402 Change-Id: I18ab3d966b3d18775d0b13d6d60d7c09485ba8ae
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
-->
|
||||
<resources>
|
||||
<!-- Standard notification width + gravity -->
|
||||
<dimen name="notification_panel_width">@dimen/standard_notification_panel_width</dimen>
|
||||
<dimen name="notification_panel_width">416dp</dimen>
|
||||
|
||||
<!-- Width for the spacer, used between QS tiles depend on notification_panel_width -->
|
||||
<dimen name="qs_quick_tile_space_width">0dp</dimen>
|
||||
|
||||
<!-- Diameter of outer shape drawable shown in navbar search-->
|
||||
<dimen name="navbar_search_outerring_diameter">430dip</dimen>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="BrightnessDialogContainer" parent="@style/BaseBrightnessDialogContainer">
|
||||
<item name="android:layout_width">@dimen/standard_notification_panel_width</item>
|
||||
<item name="android:layout_width">@dimen/notification_panel_width</item>
|
||||
</style>
|
||||
|
||||
<style name="UserDetailView">
|
||||
|
||||
21
packages/SystemUI/res/values-sw900dp-land/dimen.xml
Normal file
21
packages/SystemUI/res/values-sw900dp-land/dimen.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2012, 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>
|
||||
<!-- Standard notification width + gravity for tablet large screen device -->
|
||||
<dimen name="notification_panel_width">544dp</dimen>
|
||||
</resources>
|
||||
@@ -104,6 +104,9 @@
|
||||
prevent wasting cpu cycles on the dimming animation -->
|
||||
<bool name="config_navigation_bar_enable_auto_dim_no_visible_wallpaper">true</bool>
|
||||
|
||||
<!-- The maximum number of tiles in the QuickQSPanel -->
|
||||
<integer name="quick_qs_panel_max_columns">6</integer>
|
||||
|
||||
<!-- Whether QuickSettings is in a phone landscape -->
|
||||
<bool name="quick_settings_wide">false</bool>
|
||||
|
||||
|
||||
@@ -277,7 +277,6 @@
|
||||
|
||||
<!-- Width for the notification panel and related windows -->
|
||||
<dimen name="match_parent">-1px</dimen>
|
||||
<dimen name="standard_notification_panel_width">416dp</dimen>
|
||||
|
||||
<!-- The top margin of the panel that holds the list of notifications. -->
|
||||
<dimen name="notification_panel_margin_top">0dp</dimen>
|
||||
|
||||
@@ -45,6 +45,7 @@ public class QuickQSPanel extends QSPanel {
|
||||
public static final String NUM_QUICK_TILES = "sysui_qqs_count";
|
||||
|
||||
private boolean mDisabledByPolicy;
|
||||
private static int mDefaultMaxTiles;
|
||||
private int mMaxTiles;
|
||||
protected QSPanel mFullPanel;
|
||||
|
||||
@@ -59,6 +60,7 @@ public class QuickQSPanel extends QSPanel {
|
||||
}
|
||||
removeView((View) mTileLayout);
|
||||
}
|
||||
mDefaultMaxTiles = getResources().getInteger(R.integer.quick_qs_panel_max_columns);
|
||||
mTileLayout = new HeaderTileLayout(context);
|
||||
mTileLayout.setListening(mListening);
|
||||
addView((View) mTileLayout, 0 /* Between brightness and footer */);
|
||||
@@ -149,7 +151,7 @@ public class QuickQSPanel extends QSPanel {
|
||||
};
|
||||
|
||||
public static int getNumQuickTiles(Context context) {
|
||||
return Dependency.get(TunerService.class).getValue(NUM_QUICK_TILES, 6);
|
||||
return Dependency.get(TunerService.class).getValue(NUM_QUICK_TILES, mDefaultMaxTiles);
|
||||
}
|
||||
|
||||
void setDisabledByPolicy(boolean disabled) {
|
||||
|
||||
Reference in New Issue
Block a user