| 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 <include |
| 13 android:id="@+id/new_tab_page_layout_stub" | 13 android:id="@+id/new_tab_page_recycler_view" |
| 14 android:inflatedId="@+id/ntp_scrollview" | 14 layout="@layout/new_tab_page_recycler_view" /> |
| 15 android:layout_width="match_parent" | |
| 16 android:layout_height="match_parent" | |
| 17 android:layout_marginBottom="48dp" /> | |
| 18 | |
| 19 <!-- Bookmarks and Recent tabs buttons --> | |
| 20 <org.chromium.chrome.browser.ntp.NewTabPageToolbar | |
| 21 android:id="@+id/ntp_toolbar" | |
| 22 android:background="@color/ntp_bg" | |
| 23 android:layout_width="match_parent" | |
| 24 android:layout_height="48dp" | |
| 25 android:layout_gravity="bottom" | |
| 26 android:orientation="horizontal" > | |
| 27 <!-- Each button is a FrameLayout. Why? The TextView contains both text
and a compound | |
| 28 drawable icon. If the TextView is half the screen width, the icon w
ill be at the left | |
| 29 edge of the TextView even while the text is centered. To center the
icon along with the | |
| 30 text, we need to set the TextView's width to wrap_content; but sinc
e the button needs | |
| 31 to be half the screen width, we wrap the TextView in a FrameLayout,
whose width can | |
| 32 expand as needed. --> | |
| 33 <FrameLayout | |
| 34 android:id="@+id/bookmarks_button" | |
| 35 android:layout_width="0dp" | |
| 36 android:layout_height="match_parent" | |
| 37 android:layout_weight="1" | |
| 38 android:background="?attr/listChoiceBackgroundIndicator" | |
| 39 android:contentDescription="@null" | |
| 40 android:paddingTop="12dp" | |
| 41 android:paddingBottom="12dp" > | |
| 42 <TextView | |
| 43 android:layout_width="wrap_content" | |
| 44 android:layout_height="match_parent" | |
| 45 android:layout_gravity="center_horizontal" | |
| 46 android:drawablePadding="8dp" | |
| 47 android:gravity="center_vertical" | |
| 48 android:text="@null" | |
| 49 android:textSize="12sp" | |
| 50 android:textColor="#5a5a5a" /> | |
| 51 </FrameLayout> | |
| 52 <FrameLayout | |
| 53 android:id="@+id/recent_tabs_button" | |
| 54 android:layout_width="0dp" | |
| 55 android:layout_height="match_parent" | |
| 56 android:layout_weight="1" | |
| 57 android:background="?attr/listChoiceBackgroundIndicator" | |
| 58 android:contentDescription="@string/accessibility_ntp_toolbar_btn_re
cent_tabs" | |
| 59 android:paddingTop="12dp" | |
| 60 android:paddingBottom="12dp" > | |
| 61 <TextView | |
| 62 android:layout_width="wrap_content" | |
| 63 android:layout_height="match_parent" | |
| 64 android:layout_gravity="center_horizontal" | |
| 65 android:drawablePadding="8dp" | |
| 66 android:gravity="center_vertical" | |
| 67 android:text="@string/recent_tabs" | |
| 68 android:textSize="12sp" | |
| 69 android:textColor="#5a5a5a" /> | |
| 70 </FrameLayout> | |
| 71 </org.chromium.chrome.browser.ntp.NewTabPageToolbar> | |
| 72 </org.chromium.chrome.browser.ntp.NewTabPageView> | 15 </org.chromium.chrome.browser.ntp.NewTabPageView> |
| OLD | NEW |