Bug 844959 - Set an explicit height for horizontal tabs tray (r=mfinkle)

This commit is contained in:
Lucas Rocha 2013-03-18 21:46:54 +00:00
Родитель c02f75d8b7
Коммит 1a49be3438
2 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -137,18 +137,15 @@ public class TabsPanel extends LinearLayout
}
private static int getTabContainerHeight(TabsListContainer listContainer) {
Context context = listContainer.getContext();
Resources resources = listContainer.getContext().getResources();
PanelView panelView = listContainer.getCurrentPanelView();
if (panelView != null && !panelView.shouldExpand()) {
final View v = (View) panelView;
final int sizeSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
v.measure(sizeSpec, sizeSpec);
return v.getMeasuredHeight();
return resources.getDimensionPixelSize(R.dimen.tabs_tray_horizontal_height);
}
int actionBarHeight = context.getResources().getDimensionPixelSize(R.dimen.browser_toolbar_height);
int screenHeight = context.getResources().getDisplayMetrics().heightPixels;
int actionBarHeight = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height);
int screenHeight = resources.getDisplayMetrics().heightPixels;
Rect windowRect = new Rect();
listContainer.getWindowVisibleDisplayFrame(windowRect);

Просмотреть файл

@ -54,6 +54,7 @@
<dimen name="tabs_panel_list_padding">16dip</dimen>
<dimen name="tabs_list_divider_height">2dp</dimen>
<dimen name="tabs_sidebar_width">200dp</dimen>
<dimen name="tabs_tray_horizontal_height">156dp</dimen>
<dimen name="text_selection_handle_width">30dp</dimen>
<dimen name="text_selection_handle_height">44dp</dimen>
<dimen name="text_selection_handle_shadow">2dp</dimen>