blob: 9a138cd6276691c4b1343d3701a76859bb99a9a0 [file]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<org.chromium.chrome.browser.ntp.NewTabPageLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ntp_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:gravity="center"
android:paddingTop="@dimen/toolbar_height_no_shadow"
android:visibility="gone" >
<!-- 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="@dimen/ntp_logo_margin_top"
android:layout_marginBottom="23dp" />
<!-- Search box -->
<view
class="org.chromium.chrome.browser.ntp.NewTabPageLayout$SearchBoxContainerView"
android:id="@+id/search_box"
android:layout_width="match_parent"
android:layout_height="@dimen/ntp_search_box_height"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="1dp"
android:gravity="center_vertical"
android:addStatesFromChildren="true"
android:background="@drawable/ntp_search_box"
android:orientation="horizontal"
android:paddingStart="@dimen/location_bar_lateral_padding" >
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill,LabelFor"
style="@style/TextAppearance.NewTabPageSearchBoxText"
android:id="@+id/search_box_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="12dp"
android:layout_weight="1"
android:background="@null"
android:ellipsize="end"
android:focusableInTouchMode="false"
android:focusable="false"
android:gravity="center_vertical"
android:inputType="text"
android:singleLine="true" />
<!-- Padding start is applied so that microphone icon appears in the same location as it
does in the main url bar. The microphone button in the url bar is
48dp wide with 4dp start padding. -->
<org.chromium.ui.widget.ChromeImageView
android:id="@+id/voice_search_button"
android:layout_width="48dp"
android:layout_height="match_parent"
android:paddingStart="4dp"
android:contentDescription="@string/accessibility_toolbar_btn_mic"
android:src="@drawable/btn_mic"
android:scaleType="centerInside"
app:tint="@color/standard_mode_tint" />
</view>
<!-- Middle spacer -->
<View
android:id="@+id/ntp_middle_spacer"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0"
android:visibility="invisible" />
<!-- Insertion point of the SiteSectionView, see NewTabPageLayout#insertSiteSection() -->
<ViewStub
android:id="@+id/explore_sites_stub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inflatedId="@+id/explore_sites"
android:layout_marginBottom="16dp"
android:layout="@layout/explore_sites_section" />
<!-- Site suggestion tile grid placeholder -->
<ViewStub
android:id="@+id/tile_grid_placeholder_stub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inflatedId="@+id/tile_grid_placeholder"
android:layout="@layout/new_tab_page_tile_grid_placeholder" />
<!-- Spacer for when there is no search provider logo. -->
<View
android:id="@+id/no_search_logo_spacer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:visibility="gone" />
</org.chromium.chrome.browser.ntp.NewTabPageLayout>