Chromium Code Reviews| Index: chrome/android/java/res/layout/new_tab_page.xml |
| diff --git a/chrome/android/java/res/layout/new_tab_page.xml b/chrome/android/java/res/layout/new_tab_page.xml |
| index 1c3af218e5aa619236762deae1c5a52379712e65..e7d6045bc4c91d86a2199d8841604dc1958a088d 100644 |
| --- a/chrome/android/java/res/layout/new_tab_page.xml |
| +++ b/chrome/android/java/res/layout/new_tab_page.xml |
| @@ -10,8 +10,9 @@ |
| android:layout_height="match_parent" |
| android:paddingTop="@dimen/tab_strip_height" > |
| - <org.chromium.chrome.browser.ntp.NewTabScrollView |
| - android:id="@+id/ntp_scrollview" |
| + <org.chromium.chrome.browser.ntp.NewTabPageScrollView |
| + 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.
|
| + android:id="@+id/ntp_scroll_view" |
| android:background="@color/ntp_bg" |
| android:fillViewport="true" |
| android:layout_width="match_parent" |
| @@ -21,135 +22,14 @@ |
| android:focusableInTouchMode="true" |
| android:contentDescription="@string/accessibility_new_tab_page" > |
| - <org.chromium.chrome.browser.ntp.NewTabPageLayout |
| - android:id="@+id/ntp_content" |
| - android:layout_width="match_parent" |
| - android:layout_height="match_parent" |
| - android:layout_gravity="center_horizontal" |
| - android:orientation="vertical" |
| - android:gravity="center" |
| - android:paddingTop="@dimen/toolbar_height_no_shadow" |
| - android:visibility="gone" |
| - chrome:maxWidth="692dp" > |
| - |
| - <!-- Spacer. Note: this must have layout_weight="1" and the other spacers must have |
| - layout_weight="0". The NewTabPageLayout will redistribute the extra space between |
| - them. --> |
| - <View |
| - android:id="@+id/ntp_top_spacer" |
| - android:layout_width="0dp" |
| - android:layout_height="0dp" |
| - android:layout_weight="1" |
| - android:visibility="invisible" /> |
| - |
| - <!-- Search provider logo --> |
| - <org.chromium.chrome.browser.ntp.LogoView |
| - android:id="@+id/search_provider_logo" |
| - android:layout_width="wrap_content" |
| - android:layout_height="@dimen/ntp_logo_height" |
| - android:layout_marginStart="16dp" |
| - android:layout_marginEnd="16dp" |
| - android:layout_marginTop="26dp" |
| - android:layout_marginBottom="30dp" |
| - android:src="@drawable/google_logo" /> |
| + <include layout="@layout/new_tab_page_layout" /> |
| - <!-- Search box --> |
| - <LinearLayout |
| - android:id="@+id/search_box" |
| - android:layout_width="match_parent" |
| - android:layout_height="48dp" |
| - android:layout_marginStart="12dp" |
| - android:layout_marginEnd="12dp" |
| - android:layout_marginBottom="8dp" |
| - android:gravity="center_vertical" |
| - android:background="@drawable/bg_ntp_search_box" |
| - android:orientation="horizontal" > |
| - <EditText |
| - android:id="@+id/search_box_text" |
| - android:layout_width="0dp" |
| - android:layout_height="match_parent" |
| - android:layout_marginStart="12dp" |
| - android:layout_weight="1" |
| - android:background="@null" |
| - android:ellipsize="end" |
| - android:focusableInTouchMode="false" |
| - android:gravity="center_vertical" |
| - android:inputType="text" |
| - android:singleLine="true" |
| - android:textSize="@dimen/location_bar_url_text_size" /> |
| - <org.chromium.chrome.browser.widget.TintedImageView |
| - android:id="@+id/voice_search_button" |
| - android:layout_width="wrap_content" |
| - android:layout_height="wrap_content" |
| - android:layout_marginStart="8dp" |
| - android:layout_marginEnd="8dp" |
| - android:contentDescription="@string/accessibility_toolbar_btn_mic" |
| - android:src="@drawable/btn_mic" /> |
| - </LinearLayout> |
| - |
| - <!-- Spacer --> |
| - <View |
| - android:id="@+id/ntp_middle_spacer" |
| - android:layout_width="0dp" |
| - android:layout_height="0dp" |
| - android:layout_weight="0" |
| - android:visibility="invisible" /> |
| - |
| - <!-- Most visited items --> |
| - <org.chromium.chrome.browser.ntp.MostVisitedLayout |
| - android:id="@+id/most_visited_layout" |
| - android:layout_width="wrap_content" |
| - android:layout_height="wrap_content" |
| - android:layout_marginBottom="16dp" |
| - android:layout_marginStart="12dp" |
| - android:layout_marginEnd="12dp" |
| - android:layout_gravity="center_horizontal" |
| - android:paddingTop="@dimen/most_visited_layout_padding_top" |
| - android:paddingBottom="4dp" /> |
| - |
| - <!-- Most visited items placeholder --> |
| - <ViewStub |
| - android:id="@+id/most_visited_placeholder_stub" |
| - android:layout_width="match_parent" |
| - android:layout_height="wrap_content" |
| - android:layout_weight="1" |
| - android:inflatedId="@+id/most_visited_placeholder" |
| - android:layout="@layout/most_visited_placeholder" /> |
| - |
| - <android.support.v7.widget.RecyclerView |
| - android:id="@+id/snippets_card_list" |
| - android:scrollbars="none" |
| - android:visibility="gone" |
| - android:layout_width="match_parent" |
| - android:layout_height="wrap_content"/> |
| - |
| - <!-- Spacer --> |
| - <View |
| - android:id="@+id/ntp_bottom_spacer" |
| - android:layout_width="0dp" |
| - android:layout_height="0dp" |
| - android:layout_weight="0" |
| - android:visibility="invisible" /> |
| - |
| - <View |
| - android:id="@+id/no_search_logo_spacer" |
| - android:layout_width="match_parent" |
| - android:layout_height="0dp" |
| - android:layout_weight="1" |
| - android:visibility="gone" /> |
| - |
| - <View |
| - android:id="@+id/ntp_scroll_spacer" |
| - android:layout_width="match_parent" |
| - android:layout_height="0dp" |
| - android:visibility="gone" /> |
| - </org.chromium.chrome.browser.ntp.NewTabPageLayout> |
| - </org.chromium.chrome.browser.ntp.NewTabScrollView> |
| + </org.chromium.chrome.browser.ntp.NewTabPageScrollView> |
| <!-- Bookmarks and Recent tabs buttons --> |
| <org.chromium.chrome.browser.ntp.NewTabPageToolbar |
| android:id="@+id/ntp_toolbar" |
| - android:background="#fff" |
| + android:background="@color/ntp_bg" |
| android:layout_width="match_parent" |
| android:layout_height="48dp" |
| android:layout_gravity="bottom" |