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

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

Issue 2819743003: 🔍 Refactor LocationBarLayout to fix SearchActivity's location bar (Closed)
Patch Set: Rebase alone Created 3 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
« no previous file with comments | « no previous file | chrome/android/java/res/layout/location_bar_base.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <!-- The location bar also know as URL bar --> 6 <!-- Layout for the control group representing ChromeTabbedActivity's URL bar on small devices.
7 This file is overridden for tablets via Android's resource framework; check /layout-sw600dp.
8 -->
7 <merge xmlns:android="http://schemas.android.com/apk/res/android"> 9 <merge xmlns:android="http://schemas.android.com/apk/res/android">
8 <!-- The container for the Google G is kept at a fixed width to make the hor izonal translation 10 <!-- The container for the Google G is kept at a fixed width to make the hor izonal translation
9 calculations work. The contents are end-aligned, so when the location b ar expands, 11 calculations work. The contents are end-aligned, so when the location b ar expands,
10 the space in the start margin will be pushed out, creating the effect o f both margins 12 the space in the start margin will be pushed out, creating the effect o f both margins
11 shrinking simultaneously. --> 13 shrinking simultaneously. -->
12 <FrameLayout android:id="@+id/google_g_container" 14 <FrameLayout android:id="@+id/google_g_container"
13 android:layout_width="@dimen/location_bar_google_g_container_width" 15 android:layout_width="@dimen/location_bar_google_g_container_width"
14 android:layout_height="match_parent" > 16 android:layout_height="match_parent" >
15 17
16 <ImageView android:id="@+id/google_g" 18 <ImageView android:id="@+id/google_g"
17 style="@style/LocationBarButton" 19 style="@style/LocationBarButton"
18 android:layout_width="@dimen/location_bar_google_g_width" 20 android:layout_width="@dimen/location_bar_google_g_width"
19 android:layout_height="match_parent" 21 android:layout_height="match_parent"
20 android:layout_marginEnd="@dimen/location_bar_google_g_margin" 22 android:layout_marginEnd="@dimen/location_bar_google_g_margin"
21 android:layout_gravity="end" 23 android:layout_gravity="end"
22 android:scaleType="fitCenter" 24 android:scaleType="fitCenter"
23 android:src="@drawable/googleg" 25 android:src="@drawable/googleg"
24 android:contentDescription="@null" /> 26 android:contentDescription="@null" />
25 27
26 </FrameLayout> 28 </FrameLayout>
27 29
28 <ImageView android:id="@+id/incognito_badge" 30 <include layout="@layout/location_bar_base" />
29 style="@style/LocationBarButton"
30 android:layout_width="wrap_content"
31 android:layout_height="match_parent"
32 android:scaleType="center"
33 android:src="@drawable/ic_omnibox_incognito_badge"
34 android:contentDescription="@null"
35 android:visibility="gone" />
36
37 <FrameLayout android:id="@+id/location_bar_icon"
38 android:layout_width="@dimen/location_bar_icon_width"
39 android:layout_height="match_parent"
40 android:visibility="gone" >
41
42 <ImageView android:id="@+id/navigation_button"
43 style="@style/LocationBarButton"
44 android:layout_width="match_parent"
45 android:layout_height="match_parent"
46 android:layout_gravity="center"
47 android:scaleType="center"
48 android:contentDescription="@string/accessibility_toolbar_btn_site_i nfo" />
49
50 <org.chromium.chrome.browser.widget.TintedImageButton
51 android:id="@+id/security_button"
52 style="@style/LocationBarButton"
53 android:layout_width="match_parent"
54 android:layout_height="match_parent"
55 android:scaleType="center"
56 android:layout_gravity="center"
57 android:alpha="0"
58 android:visibility="invisible"
59 android:contentDescription="@string/accessibility_toolbar_btn_site_i nfo" />
60
61 </FrameLayout>
62
63 <include layout="@layout/location_bar_status" />
64
65 <include
66 android:id="@+id/url_bar"
67 android:layout_width="match_parent"
68 android:layout_height="match_parent"
69 android:layout_marginTop="3dp"
70 android:layout_marginBottom="3dp"
71 android:layout_marginStart="@dimen/location_bar_icon_width"
72 android:layout_gravity="center_vertical"
73 android:nextFocusForward="@+id/tab_switcher_button"
74 layout="@layout/url_bar" />
75
76 <FrameLayout android:id="@+id/url_action_container"
77 android:layout_width="@dimen/location_bar_icon_width"
78 android:layout_height="@dimen/toolbar_height_no_shadow"
79 android:layout_gravity="end|center_vertical"
80 android:visibility="gone" >
81
82 <org.chromium.chrome.browser.widget.TintedImageButton
83 android:id="@+id/delete_button"
84 style="@style/LocationBarButton"
85 android:layout_width="match_parent"
86 android:layout_height="match_parent"
87 android:scaleType="center"
88 android:src="@drawable/btn_delete_url"
89 android:visibility="invisible"
90 android:contentDescription="@string/accessibility_toolbar_btn_delete _url" />
91
92 <org.chromium.chrome.browser.widget.TintedImageButton
93 android:id="@+id/mic_button"
94 style="@style/LocationBarButton"
95 android:layout_width="match_parent"
96 android:layout_height="match_parent"
97 android:scaleType="center"
98 android:src="@drawable/btn_mic"
99 android:visibility="invisible"
100 android:contentDescription="@string/accessibility_toolbar_btn_mic" / >
101
102 </FrameLayout>
103 </merge> 31 </merge>
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/res/layout/location_bar_base.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698