1+ <?xml version =" 1.0" encoding =" utf-8" ?><!--
2+ ~ Copyright (c) 2023 DuckDuckGo
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" BASIS,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ <LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
17+ xmlns : app =" http://schemas.android.com/apk/res-auto"
18+ xmlns : tools =" http://schemas.android.com/tools"
19+ android : layout_width =" match_parent"
20+ android : layout_height =" match_parent"
21+ android : orientation =" vertical" >
22+
23+ <include
24+ android : id =" @+id/includeToolbar"
25+ layout =" @layout/include_default_toolbar" />
26+
27+ <androidx .constraintlayout.widget.ConstraintLayout
28+ android : layout_width =" match_parent"
29+ android : layout_height =" match_parent" >
30+
31+ <LinearLayout
32+ android : id =" @+id/readerContainer"
33+ android : layout_width =" match_parent"
34+ android : layout_height =" 0dp"
35+ android : background =" ?attr/daxColorSurface"
36+ android : orientation =" vertical"
37+ app : layout_constraintBottom_toTopOf =" @+id/qrcodeContainer"
38+ app : layout_constraintTop_toTopOf =" parent" >
39+
40+ <com .duckduckgo.common.ui.view.text.DaxTextView
41+ android : id =" @+id/connect_hint"
42+ android : layout_width =" match_parent"
43+ android : layout_height =" wrap_content"
44+ android : layout_margin =" @dimen/keyline_4"
45+ android : text =" @string/connect_screen_scan_qr_hint" />
46+
47+ <com .duckduckgo.sync.impl.ui.qrcode.SyncBarcodeView
48+ android : id =" @+id/qrCodeReader"
49+ android : layout_width =" match_parent"
50+ android : layout_height =" match_parent"
51+ app : minScanningAreaHeight =" @dimen/qrBarcodeSize" />
52+ </LinearLayout >
53+
54+ <androidx .constraintlayout.widget.ConstraintLayout
55+ android : id =" @+id/qrcodeContainer"
56+ android : layout_width =" 0dp"
57+ android : layout_height =" wrap_content"
58+ android : background =" ?attr/daxColorBackground"
59+ app : layout_constraintBottom_toTopOf =" @id/copyCodeDivider"
60+ app : layout_constraintHeight_min =" 185dp"
61+ app : layout_constraintHorizontal_weight =" 1"
62+ app : layout_constraintStart_toStartOf =" parent"
63+ app : layout_constraintEnd_toEndOf =" parent"
64+ android : layout_marginStart =" 20dp"
65+ android : layout_marginEnd =" 20dp"
66+ android : layout_marginTop =" 20dp"
67+ app : layout_constraintVertical_chainStyle =" spread" >
68+
69+ <ImageView
70+ android : id =" @+id/qrCodeImageView"
71+ android : layout_width =" @dimen/qrSizeMedium"
72+ android : layout_height =" @dimen/qrSizeMedium"
73+ android : layout_gravity =" center"
74+ app : layout_constraintStart_toStartOf =" parent"
75+ app : layout_constraintBottom_toBottomOf =" parent"
76+ tools : ignore =" ContentDescription" />
77+
78+ <com .duckduckgo.common.ui.view.text.DaxTextView
79+ android : id =" @+id/qrCodeHintTitle"
80+ android : layout_width =" 0dp"
81+ android : layout_height =" wrap_content"
82+ android : layout_marginStart =" 20dp"
83+ app : layout_constraintWidth_max =" 300dp"
84+ android : text =" @string/connect_screen_connect_qr_hint_title"
85+ app : layout_constraintEnd_toEndOf =" parent"
86+ app : layout_constraintStart_toEndOf =" @+id/qrCodeImageView"
87+ app : layout_constraintTop_toTopOf =" @id/qrCodeImageView"
88+ app : typography =" h5" />
89+
90+ <com .duckduckgo.common.ui.view.text.DaxTextView
91+ android : id =" @+id/qrCodeHintContent"
92+ android : layout_width =" 0dp"
93+ android : layout_height =" wrap_content"
94+ android : layout_marginStart =" 20dp"
95+ android : layout_marginTop =" @dimen/keyline_2"
96+ app : layout_constraintWidth_max =" 300dp"
97+ android : text =" @string/connect_screen_connect_qr_hint_content"
98+ app : layout_constraintEnd_toEndOf =" parent"
99+ app : layout_constraintStart_toEndOf =" @+id/qrCodeImageView"
100+ app : layout_constraintTop_toBottomOf =" @+id/qrCodeHintTitle"
101+ app : textType =" secondary"
102+ app : typography =" caption" />
103+
104+ </androidx .constraintlayout.widget.ConstraintLayout>
105+
106+ <com .duckduckgo.common.ui.view.divider.HorizontalDivider
107+ android : id =" @+id/copyCodeDivider"
108+ android : layout_width =" match_parent"
109+ android : layout_height =" wrap_content"
110+ app : layout_constraintEnd_toEndOf =" parent"
111+ app : layout_constraintStart_toStartOf =" parent"
112+ app : layout_constraintVertical_bias =" 1"
113+ android : layout_marginBottom =" 10dp"
114+ app : layout_constraintBottom_toTopOf =" @id/cantScanLabel"
115+ />
116+
117+ <com .duckduckgo.common.ui.view.text.DaxTextView
118+ android : id =" @+id/cantScanLabel"
119+ android : layout_width =" wrap_content"
120+ android : layout_height =" 0dp"
121+ android : layout_marginBottom =" @dimen/keyline_4"
122+ android : layout_marginStart =" @dimen/keyline_1"
123+ android : text =" @string/login_screen_cant_scan_label"
124+ app : layout_constraintHorizontal_chainStyle =" packed"
125+ app : layout_constraintBottom_toBottomOf =" parent"
126+ app : layout_constraintEnd_toStartOf =" @id/copyCodeButton"
127+ app : layout_constraintStart_toStartOf =" parent"
128+ app : textType =" secondary" />
129+
130+
131+ <com .duckduckgo.common.ui.view.button.DaxButtonGhost
132+ android : id =" @+id/copyCodeButton"
133+ android : layout_width =" wrap_content"
134+ android : layout_height =" wrap_content"
135+ android : text =" @string/login_screen_cant_scan_button_text"
136+ app : daxButtonSize =" large"
137+ app : icon =" @drawable/ic_copy_24"
138+ app : layout_constraintBottom_toBottomOf =" @id/cantScanLabel"
139+ app : layout_constraintEnd_toEndOf =" parent"
140+ app : layout_constraintStart_toEndOf =" @id/cantScanLabel"
141+ app : layout_constraintTop_toTopOf =" @id/cantScanLabel" />
142+
143+ <androidx .fragment.app.FragmentContainerView
144+ android : id =" @+id/fragment_container_view"
145+ android : layout_width =" 0dp"
146+ app : layout_constraintTop_toTopOf =" parent"
147+ app : layout_constraintStart_toStartOf =" parent"
148+ app : layout_constraintEnd_toEndOf =" parent"
149+ app : layout_constraintBottom_toBottomOf =" parent"
150+ android : layout_height =" 0dp" />
151+
152+ </androidx .constraintlayout.widget.ConstraintLayout>
153+ </LinearLayout >
0 commit comments