OLD | NEW |
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. --> | 4 found in the LICENSE file. --> |
5 | 5 |
6 <org.chromium.chrome.browser.ntp.NewTabPageView | 6 <org.chromium.chrome.browser.ntp.NewTabPageView |
7 xmlns:android="http://schemas.android.com/apk/res/android" | 7 xmlns:android="http://schemas.android.com/apk/res/android" |
8 android:layout_width="match_parent" | 8 android:layout_width="match_parent" |
9 android:layout_height="match_parent" | 9 android:layout_height="match_parent" |
10 android:paddingTop="@dimen/tab_strip_height" > | 10 android:paddingTop="@dimen/tab_strip_height" > |
11 | 11 |
12 <ViewStub | 12 <ViewStub |
13 android:id="@+id/new_tab_page_layout_stub" | 13 android:id="@+id/new_tab_page_layout_stub" |
14 android:inflatedId="@+id/ntp_scrollview" | 14 android:inflatedId="@+id/ntp_scrollview" |
15 android:layout_width="match_parent" | 15 android:layout_width="match_parent" |
16 android:layout_height="match_parent" | 16 android:layout_height="match_parent" |
17 android:layout_marginBottom="48dp" /> | 17 android:layout_marginBottom="48dp" /> |
18 | 18 |
19 <!-- Bookmarks and Recent tabs buttons --> | 19 <!-- Bookmarks and Recent tabs buttons --> |
20 <org.chromium.chrome.browser.ntp.NewTabPageToolbar | 20 <org.chromium.chrome.browser.ntp.NewTabPageToolbar |
21 android:id="@+id/ntp_toolbar" | 21 android:id="@+id/ntp_toolbar" |
| 22 android:background="@color/ntp_bg" |
22 android:layout_width="match_parent" | 23 android:layout_width="match_parent" |
23 android:layout_height="48dp" | 24 android:layout_height="48dp" |
24 android:layout_gravity="bottom" | 25 android:layout_gravity="bottom" |
25 android:orientation="horizontal" > | 26 android:orientation="horizontal" > |
26 <!-- Each button is a FrameLayout. Why? The TextView contains both text
and a compound | 27 <!-- Each button is a FrameLayout. Why? The TextView contains both text
and a compound |
27 drawable icon. If the TextView is half the screen width, the icon w
ill be at the left | 28 drawable icon. If the TextView is half the screen width, the icon w
ill be at the left |
28 edge of the TextView even while the text is centered. To center the
icon along with the | 29 edge of the TextView even while the text is centered. To center the
icon along with the |
29 text, we need to set the TextView's width to wrap_content; but sinc
e the button needs | 30 text, we need to set the TextView's width to wrap_content; but sinc
e the button needs |
30 to be half the screen width, we wrap the TextView in a FrameLayout,
whose width can | 31 to be half the screen width, we wrap the TextView in a FrameLayout,
whose width can |
31 expand as needed. --> | 32 expand as needed. --> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 android:layout_height="match_parent" | 83 android:layout_height="match_parent" |
83 android:layout_gravity="center_horizontal" | 84 android:layout_gravity="center_horizontal" |
84 android:drawablePadding="8dp" | 85 android:drawablePadding="8dp" |
85 android:gravity="center_vertical" | 86 android:gravity="center_vertical" |
86 android:text="@string/recent_tabs" | 87 android:text="@string/recent_tabs" |
87 android:textSize="12sp" | 88 android:textSize="12sp" |
88 android:textColor="#5a5a5a" /> | 89 android:textColor="#5a5a5a" /> |
89 </FrameLayout> | 90 </FrameLayout> |
90 </org.chromium.chrome.browser.ntp.NewTabPageToolbar> | 91 </org.chromium.chrome.browser.ntp.NewTabPageToolbar> |
91 </org.chromium.chrome.browser.ntp.NewTabPageView> | 92 </org.chromium.chrome.browser.ntp.NewTabPageView> |
OLD | NEW |