Chromium Code Reviews| 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 xmlns:chrome="http://schemas.android.com/apk/res-auto" | 8 xmlns:chrome="http://schemas.android.com/apk/res-auto" |
| 9 android:layout_width="match_parent" | 9 android:layout_width="match_parent" |
| 10 android:layout_height="match_parent" | 10 android:layout_height="match_parent" |
| 11 android:paddingTop="@dimen/tab_strip_height" > | 11 android:paddingTop="@dimen/tab_strip_height" > |
| 12 | 12 |
| 13 <org.chromium.chrome.browser.ntp.NewTabScrollView | 13 <org.chromium.chrome.browser.ntp.NewTabPageScrollView |
| 14 android:id="@+id/ntp_scrollview" | 14 xmlns:android="http://schemas.android.com/apk/res/android" |
|
newt (away)
2016/03/30 19:03:49
remove xmlns
dgn
2016/03/31 00:46:44
Done.
| |
| 15 android:id="@+id/ntp_scroll_view" | |
| 15 android:background="@color/ntp_bg" | 16 android:background="@color/ntp_bg" |
| 16 android:fillViewport="true" | 17 android:fillViewport="true" |
| 17 android:layout_width="match_parent" | 18 android:layout_width="match_parent" |
| 18 android:layout_height="match_parent" | 19 android:layout_height="match_parent" |
| 19 android:layout_marginBottom="48dp" | 20 android:layout_marginBottom="48dp" |
| 20 android:focusable="true" | 21 android:focusable="true" |
| 21 android:focusableInTouchMode="true" | 22 android:focusableInTouchMode="true" |
| 22 android:contentDescription="@string/accessibility_new_tab_page" > | 23 android:contentDescription="@string/accessibility_new_tab_page" > |
| 23 | 24 |
| 24 <org.chromium.chrome.browser.ntp.NewTabPageLayout | 25 <include layout="@layout/new_tab_page_layout" /> |
| 25 android:id="@+id/ntp_content" | |
| 26 android:layout_width="match_parent" | |
| 27 android:layout_height="match_parent" | |
| 28 android:layout_gravity="center_horizontal" | |
| 29 android:orientation="vertical" | |
| 30 android:gravity="center" | |
| 31 android:paddingTop="@dimen/toolbar_height_no_shadow" | |
| 32 android:visibility="gone" | |
| 33 chrome:maxWidth="692dp" > | |
| 34 | 26 |
| 35 <!-- Spacer. Note: this must have layout_weight="1" and the other sp acers must have | 27 </org.chromium.chrome.browser.ntp.NewTabPageScrollView> |
| 36 layout_weight="0". The NewTabPageLayout will redistribute the e xtra space between | |
| 37 them. --> | |
| 38 <View | |
| 39 android:id="@+id/ntp_top_spacer" | |
| 40 android:layout_width="0dp" | |
| 41 android:layout_height="0dp" | |
| 42 android:layout_weight="1" | |
| 43 android:visibility="invisible" /> | |
| 44 | |
| 45 <!-- Search provider logo --> | |
| 46 <org.chromium.chrome.browser.ntp.LogoView | |
| 47 android:id="@+id/search_provider_logo" | |
| 48 android:layout_width="wrap_content" | |
| 49 android:layout_height="@dimen/ntp_logo_height" | |
| 50 android:layout_marginStart="16dp" | |
| 51 android:layout_marginEnd="16dp" | |
| 52 android:layout_marginTop="26dp" | |
| 53 android:layout_marginBottom="30dp" | |
| 54 android:src="@drawable/google_logo" /> | |
| 55 | |
| 56 <!-- Search box --> | |
| 57 <LinearLayout | |
| 58 android:id="@+id/search_box" | |
| 59 android:layout_width="match_parent" | |
| 60 android:layout_height="48dp" | |
| 61 android:layout_marginStart="12dp" | |
| 62 android:layout_marginEnd="12dp" | |
| 63 android:layout_marginBottom="8dp" | |
| 64 android:gravity="center_vertical" | |
| 65 android:background="@drawable/bg_ntp_search_box" | |
| 66 android:orientation="horizontal" > | |
| 67 <EditText | |
| 68 android:id="@+id/search_box_text" | |
| 69 android:layout_width="0dp" | |
| 70 android:layout_height="match_parent" | |
| 71 android:layout_marginStart="12dp" | |
| 72 android:layout_weight="1" | |
| 73 android:background="@null" | |
| 74 android:ellipsize="end" | |
| 75 android:focusableInTouchMode="false" | |
| 76 android:gravity="center_vertical" | |
| 77 android:inputType="text" | |
| 78 android:singleLine="true" | |
| 79 android:textSize="@dimen/location_bar_url_text_size" /> | |
| 80 <org.chromium.chrome.browser.widget.TintedImageView | |
| 81 android:id="@+id/voice_search_button" | |
| 82 android:layout_width="wrap_content" | |
| 83 android:layout_height="wrap_content" | |
| 84 android:layout_marginStart="8dp" | |
| 85 android:layout_marginEnd="8dp" | |
| 86 android:contentDescription="@string/accessibility_toolbar_bt n_mic" | |
| 87 android:src="@drawable/btn_mic" /> | |
| 88 </LinearLayout> | |
| 89 | |
| 90 <!-- Spacer --> | |
| 91 <View | |
| 92 android:id="@+id/ntp_middle_spacer" | |
| 93 android:layout_width="0dp" | |
| 94 android:layout_height="0dp" | |
| 95 android:layout_weight="0" | |
| 96 android:visibility="invisible" /> | |
| 97 | |
| 98 <!-- Most visited items --> | |
| 99 <org.chromium.chrome.browser.ntp.MostVisitedLayout | |
| 100 android:id="@+id/most_visited_layout" | |
| 101 android:layout_width="wrap_content" | |
| 102 android:layout_height="wrap_content" | |
| 103 android:layout_marginBottom="16dp" | |
| 104 android:layout_marginStart="12dp" | |
| 105 android:layout_marginEnd="12dp" | |
| 106 android:layout_gravity="center_horizontal" | |
| 107 android:paddingTop="@dimen/most_visited_layout_padding_top" | |
| 108 android:paddingBottom="4dp" /> | |
| 109 | |
| 110 <!-- Most visited items placeholder --> | |
| 111 <ViewStub | |
| 112 android:id="@+id/most_visited_placeholder_stub" | |
| 113 android:layout_width="match_parent" | |
| 114 android:layout_height="wrap_content" | |
| 115 android:layout_weight="1" | |
| 116 android:inflatedId="@+id/most_visited_placeholder" | |
| 117 android:layout="@layout/most_visited_placeholder" /> | |
| 118 | |
| 119 <android.support.v7.widget.RecyclerView | |
| 120 android:id="@+id/snippets_card_list" | |
| 121 android:scrollbars="none" | |
| 122 android:visibility="gone" | |
| 123 android:layout_width="match_parent" | |
| 124 android:layout_height="wrap_content"/> | |
| 125 | |
| 126 <!-- Spacer --> | |
| 127 <View | |
| 128 android:id="@+id/ntp_bottom_spacer" | |
| 129 android:layout_width="0dp" | |
| 130 android:layout_height="0dp" | |
| 131 android:layout_weight="0" | |
| 132 android:visibility="invisible" /> | |
| 133 | |
| 134 <View | |
| 135 android:id="@+id/no_search_logo_spacer" | |
| 136 android:layout_width="match_parent" | |
| 137 android:layout_height="0dp" | |
| 138 android:layout_weight="1" | |
| 139 android:visibility="gone" /> | |
| 140 | |
| 141 <View | |
| 142 android:id="@+id/ntp_scroll_spacer" | |
| 143 android:layout_width="match_parent" | |
| 144 android:layout_height="0dp" | |
| 145 android:visibility="gone" /> | |
| 146 </org.chromium.chrome.browser.ntp.NewTabPageLayout> | |
| 147 </org.chromium.chrome.browser.ntp.NewTabScrollView> | |
| 148 | 28 |
| 149 <!-- Bookmarks and Recent tabs buttons --> | 29 <!-- Bookmarks and Recent tabs buttons --> |
| 150 <org.chromium.chrome.browser.ntp.NewTabPageToolbar | 30 <org.chromium.chrome.browser.ntp.NewTabPageToolbar |
| 151 android:id="@+id/ntp_toolbar" | 31 android:id="@+id/ntp_toolbar" |
| 152 android:background="#fff" | 32 android:background="@color/ntp_bg" |
| 153 android:layout_width="match_parent" | 33 android:layout_width="match_parent" |
| 154 android:layout_height="48dp" | 34 android:layout_height="48dp" |
| 155 android:layout_gravity="bottom" | 35 android:layout_gravity="bottom" |
| 156 android:orientation="horizontal" > | 36 android:orientation="horizontal" > |
| 157 <!-- Each button is a FrameLayout. Why? The TextView contains both text and a compound | 37 <!-- Each button is a FrameLayout. Why? The TextView contains both text and a compound |
| 158 drawable icon. If the TextView is half the screen width, the icon w ill be at the left | 38 drawable icon. If the TextView is half the screen width, the icon w ill be at the left |
| 159 edge of the TextView even while the text is centered. To center the icon along with the | 39 edge of the TextView even while the text is centered. To center the icon along with the |
| 160 text, we need to set the TextView's width to wrap_content; but sinc e the button needs | 40 text, we need to set the TextView's width to wrap_content; but sinc e the button needs |
| 161 to be half the screen width, we wrap the TextView in a FrameLayout, whose width can | 41 to be half the screen width, we wrap the TextView in a FrameLayout, whose width can |
| 162 expand as needed. --> | 42 expand as needed. --> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 android:layout_height="match_parent" | 93 android:layout_height="match_parent" |
| 214 android:layout_gravity="center_horizontal" | 94 android:layout_gravity="center_horizontal" |
| 215 android:drawablePadding="8dp" | 95 android:drawablePadding="8dp" |
| 216 android:gravity="center_vertical" | 96 android:gravity="center_vertical" |
| 217 android:text="@string/recent_tabs" | 97 android:text="@string/recent_tabs" |
| 218 android:textSize="12sp" | 98 android:textSize="12sp" |
| 219 android:textColor="#5a5a5a" /> | 99 android:textColor="#5a5a5a" /> |
| 220 </FrameLayout> | 100 </FrameLayout> |
| 221 </org.chromium.chrome.browser.ntp.NewTabPageToolbar> | 101 </org.chromium.chrome.browser.ntp.NewTabPageToolbar> |
| 222 </org.chromium.chrome.browser.ntp.NewTabPageView> | 102 </org.chromium.chrome.browser.ntp.NewTabPageView> |
| OLD | NEW |