Set row height to the row height not the notification height.

Bug: 6376501
Change-Id: I41567b11fcb1d39bc75ef782faa8287bbb1e4ca8
This commit is contained in:
Chris Wren
2012-04-24 11:41:07 -04:00
parent 66556c730d
commit 321452da28
3 changed files with 4 additions and 28 deletions

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (c) 2011, 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>
<!-- thickness (height) of each notification row, including any separators or padding -->
<!-- Note: this is 64dip + 1px divider = 97px. -->
<dimen name="notification_height">99px</dimen>
<!-- thickness (height) of dividers between each notification row; see math for
notification_height above -->
<dimen name="notification_divider_height">4px</dimen>
</resources>

View File

@@ -72,7 +72,7 @@
<dimen name="status_bar_icon_padding">0dp</dimen>
<!-- thickness (height) of dividers between each notification row -->
<dimen name="notification_divider_height">4dp</dimen>
<dimen name="notification_divider_height">2dp</dimen>
<!-- Notification drawer tuning parameters (phone UI) -->
<!-- Initial velocity of the shade when expanding on its own -->

View File

@@ -436,6 +436,8 @@ public abstract class BaseStatusBar extends SystemUI implements
}
protected boolean inflateViews(NotificationData.Entry entry, ViewGroup parent) {
int rowHeight =
mContext.getResources().getDimensionPixelSize(R.dimen.notification_height);
int minHeight =
mContext.getResources().getDimensionPixelSize(R.dimen.notification_min_height);
int maxHeight =
@@ -462,7 +464,7 @@ public abstract class BaseStatusBar extends SystemUI implements
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
expandable = Boolean.TRUE;
} else {
lp.height = minHeight;
lp.height = rowHeight;
}
row.setLayoutParams(lp);
row.setTag(R.id.expandable_tag, expandable);