Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: chrome/android/java/res/layout/new_tab_page_layout.xml

Issue 1833763002: Add new NTP layout with snippet cards and hide it behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address more comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright 2016 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. -->
5 <org.chromium.chrome.browser.ntp.NewTabPageLayout
6 xmlns:android="http://schemas.android.com/apk/res/android"
7 xmlns:chrome="http://schemas.android.com/apk/res-auto"
8 android:id="@+id/ntp_content"
9 android:layout_width="match_parent"
10 android:layout_height="match_parent"
11 android:layout_gravity="center_horizontal"
12 android:orientation="vertical"
13 android:gravity="center"
14 android:paddingTop="@dimen/toolbar_height_no_shadow"
15 android:visibility="gone"
16 chrome:maxWidth="692dp" >
17
18 <!-- Spacer. Note: this must have layout_weight="1" and the other spacers mu st have
19 layout_weight="0". The NewTabPageLayout will redistribute the extra spa ce between
20 them. -->
21 <View
22 android:id="@+id/ntp_top_spacer"
23 android:layout_width="0dp"
24 android:layout_height="0dp"
25 android:layout_weight="1"
26 android:visibility="invisible" />
27
28 <!-- Search provider logo -->
29 <org.chromium.chrome.browser.ntp.LogoView
30 android:id="@+id/search_provider_logo"
31 android:layout_width="wrap_content"
32 android:layout_height="@dimen/ntp_logo_height"
33 android:layout_marginStart="16dp"
34 android:layout_marginEnd="16dp"
35 android:layout_marginTop="26dp"
36 android:layout_marginBottom="30dp"
37 android:src="@drawable/google_logo" />
38
39 <!-- Search box -->
40 <LinearLayout
41 android:id="@+id/search_box"
42 android:layout_width="match_parent"
43 android:layout_height="48dp"
44 android:layout_marginStart="12dp"
45 android:layout_marginEnd="12dp"
46 android:layout_marginBottom="8dp"
47 android:gravity="center_vertical"
48 android:background="@drawable/bg_ntp_search_box"
49 android:orientation="horizontal" >
50 <EditText
51 android:id="@+id/search_box_text"
52 android:layout_width="0dp"
53 android:layout_height="match_parent"
54 android:layout_marginStart="12dp"
55 android:layout_weight="1"
56 android:background="@null"
57 android:ellipsize="end"
58 android:focusableInTouchMode="false"
59 android:gravity="center_vertical"
60 android:inputType="text"
61 android:singleLine="true"
62 android:textSize="@dimen/location_bar_url_text_size" />
63 <org.chromium.chrome.browser.widget.TintedImageView
64 android:id="@+id/voice_search_button"
65 android:layout_width="wrap_content"
66 android:layout_height="wrap_content"
67 android:layout_marginStart="8dp"
68 android:layout_marginEnd="8dp"
69 android:contentDescription="@string/accessibility_toolbar_btn_mic"
70 android:src="@drawable/btn_mic" />
71 </LinearLayout>
72
73 <!-- Spacer -->
74 <View
75 android:id="@+id/ntp_middle_spacer"
76 android:layout_width="0dp"
77 android:layout_height="0dp"
78 android:layout_weight="0"
79 android:visibility="invisible" />
80
81 <!-- Most visited items -->
82 <org.chromium.chrome.browser.ntp.MostVisitedLayout
83 android:id="@+id/most_visited_layout"
84 android:layout_width="wrap_content"
85 android:layout_height="wrap_content"
86 android:layout_marginBottom="16dp"
87 android:layout_marginStart="12dp"
88 android:layout_marginEnd="12dp"
89 android:layout_gravity="center_horizontal"
90 android:paddingTop="@dimen/most_visited_layout_padding_top"
91 android:paddingBottom="4dp" />
92
93 <!-- Most visited items placeholder -->
94 <ViewStub
95 android:id="@+id/most_visited_placeholder_stub"
96 android:layout_width="match_parent"
97 android:layout_height="wrap_content"
98 android:layout_weight="1"
99 android:inflatedId="@+id/most_visited_placeholder"
100 android:layout="@layout/most_visited_placeholder" />
101
102 <!-- Spacer -->
103 <View
104 android:id="@+id/ntp_bottom_spacer"
105 android:layout_width="0dp"
106 android:layout_height="0dp"
107 android:layout_weight="0"
108 android:visibility="invisible" />
109
110 <View
111 android:id="@+id/no_search_logo_spacer"
112 android:layout_width="match_parent"
113 android:layout_height="0dp"
114 android:layout_weight="1"
115 android:visibility="gone" />
116
117 <View
118 android:id="@+id/ntp_scroll_spacer"
119 android:layout_width="match_parent"
120 android:layout_height="0dp"
121 android:visibility="gone" />
122 </org.chromium.chrome.browser.ntp.NewTabPageLayout>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698