activity_welcome.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
  3
  4<androidx.constraintlayout.widget.ConstraintLayout
  5    android:layout_width="match_parent"
  6    android:layout_height="match_parent">
  7
  8    <androidx.viewpager.widget.ViewPager
  9        android:id="@+id/slideshow_pager"
 10        android:layout_width="0dp"
 11        android:layout_height="0dp"
 12        android:orientation="horizontal"
 13        app:layout_constraintBottom_toTopOf="@id/gl_SlidePage"
 14        app:layout_constraintEnd_toEndOf="parent"
 15        app:layout_constraintStart_toStartOf="parent"
 16        app:layout_constraintTop_toTopOf="parent">
 17
 18    <LinearLayout
 19        android:layout_width="match_parent"
 20        android:layout_height="match_parent"
 21        android:orientation="vertical"
 22        android:padding="15dp">
 23
 24        <ImageView
 25            android:layout_width="wrap_content"
 26            android:layout_height="wrap_content"
 27            android:layout_gravity="center"
 28            android:padding="15dp"
 29            android:src="@drawable/main_logo" />
 30
 31        <TextView
 32            android:layout_width="wrap_content"
 33            android:layout_height="wrap_content"
 34            android:layout_marginBottom="15dp"
 35            android:layout_gravity="center"
 36            android:fontFamily="@font/archivoblack"
 37            android:textColor="?colorAccent"
 38            android:textSize="18sp"
 39            android:text="Welcome to Cheogram Android" />
 40
 41        <TextView
 42            android:layout_width="wrap_content"
 43            android:layout_height="wrap_content"
 44            android:layout_marginBottom="15dp"
 45            android:fontFamily="@font/poppins"
 46            android:textColor="?attr/edit_text_color"
 47            android:text="Cheogram Android is an app that connects you to a global network called Jabber.  This network includes services, called gateways, for chatting with other networks such as SMS, IRC, Matrix, and more." />
 48
 49        <com.wefika.flowlayout.FlowLayout
 50            android:layout_width="wrap_content"
 51            android:layout_height="wrap_content"
 52            android:layout_gravity="center"
 53            android:gravity="center"
 54            android:orientation="horizontal">
 55
 56            <com.caverock.androidsvg.SVGImageView
 57                android:layout_width="60dp"
 58                android:layout_height="60dp"
 59                android:layout_margin="10dp"
 60                app:svg="@raw/jmp" />
 61
 62            <ImageView
 63                android:layout_width="60dp"
 64                android:layout_height="60dp"
 65                android:layout_margin="10dp"
 66                android:adjustViewBounds="true"
 67                android:src="@drawable/android_messages" />
 68
 69            <ImageView
 70                android:layout_width="60dp"
 71                android:layout_height="60dp"
 72                android:layout_margin="10dp"
 73                android:adjustViewBounds="true"
 74                android:src="?attr/ic_make_audio_call" />
 75
 76            <ImageView
 77                android:layout_width="60dp"
 78                android:layout_height="60dp"
 79                android:layout_margin="10dp"
 80                android:adjustViewBounds="true"
 81                android:src="?attr/icon_email" />
 82
 83            <ImageView
 84                android:layout_width="60dp"
 85                android:layout_height="60dp"
 86                android:layout_margin="10dp"
 87                android:adjustViewBounds="true"
 88                android:src="@drawable/irc" />
 89
 90            <ImageView
 91                android:layout_width="60dp"
 92                android:layout_height="60dp"
 93                android:layout_margin="10dp"
 94                android:adjustViewBounds="true"
 95                android:src="@drawable/matrix" />
 96
 97            <ImageView
 98                android:layout_width="60dp"
 99                android:layout_height="60dp"
100                android:layout_margin="10dp"
101                android:adjustViewBounds="true"
102                android:src="@drawable/jabber" />
103
104            <ImageView
105                android:layout_width="60dp"
106                android:layout_height="60dp"
107                android:layout_margin="10dp"
108                android:adjustViewBounds="true"
109                android:src="@drawable/snikket" />
110
111            <com.caverock.androidsvg.SVGImageView
112                android:layout_width="60dp"
113                android:layout_height="60dp"
114                android:layout_margin="10dp"
115                app:svg="@raw/xmpp" />
116
117        </com.wefika.flowlayout.FlowLayout>
118
119    </LinearLayout>
120
121    <LinearLayout
122        android:layout_width="match_parent"
123        android:layout_height="match_parent"
124        android:orientation="vertical"
125        android:padding="15dp">
126
127        <ImageView
128            android:layout_width="128dp"
129            android:layout_height="128dp"
130            android:layout_gravity="center"
131            android:padding="15dp"
132            android:src="@drawable/jabber" />
133
134        <TextView
135            android:layout_width="wrap_content"
136            android:layout_height="wrap_content"
137            android:layout_marginBottom="15dp"
138            android:layout_gravity="center"
139            android:fontFamily="@font/archivoblack"
140            android:textColor="?colorAccent"
141            android:textSize="18sp"
142            android:text="How the Jabber network works" />
143
144        <TextView
145            android:layout_width="wrap_content"
146            android:layout_height="wrap_content"
147            android:layout_marginBottom="15dp"
148            android:fontFamily="@font/poppins"
149            android:textColor="?attr/edit_text_color"
150            android:text="The Jabber network is powered by a protocol called XMPP. It is a decentralized network, which means no one owns or controls the whole thing. It is a federated network which means anyone can run a Jabber service. Messages to other Jabber users can be end-to-end encrypted by enabling OMEMO for the conversation.\n\nAddresses are called Jabber IDs and look similar to email addresses:" />
151
152        <TextView
153            android:layout_width="wrap_content"
154            android:layout_height="wrap_content"
155            android:layout_marginBottom="30dp"
156            android:layout_gravity="center"
157            android:fontFamily="@font/archivoblack"
158            android:textColor="?colorAccent"
159            android:textSize="18sp"
160            android:text="username@service.com" />
161
162        <com.caverock.androidsvg.SVGImageView
163           android:layout_width="wrap_content"
164           android:layout_height="wrap_content"
165           android:layout_gravity="center"
166           app:svg="@raw/federation_diagram" />
167
168    </LinearLayout>
169
170    <LinearLayout
171        android:layout_width="match_parent"
172        android:layout_height="match_parent"
173        android:orientation="vertical">
174
175        <include
176            android:id="@+id/toolbar"
177            layout="@layout/toolbar" />
178
179        <ScrollView
180            android:layout_width="match_parent"
181            android:layout_height="match_parent"
182            android:fillViewport="true">
183
184            <LinearLayout
185                android:layout_width="match_parent"
186                android:layout_height="wrap_content"
187                android:weightSum="2"
188                android:orientation="vertical"
189                android:background="?attr/color_background_primary">
190
191                <RelativeLayout
192                    android:layout_width="match_parent"
193                    android:layout_height="wrap_content"
194                    android:layout_weight="1"
195                    android:layout_above="@+id/linearLayout"
196                    android:layout_alignParentStart="true"
197                    android:layout_alignParentLeft="true">
198
199                    <ImageView
200                        android:layout_width="wrap_content"
201                        android:layout_height="wrap_content"
202                        android:layout_centerHorizontal="true"
203                        android:layout_centerVertical="true"
204                        android:padding="8dp"
205                        android:src="@drawable/main_logo" />
206                </RelativeLayout>
207
208                <LinearLayout
209                    android:id="@+id/linearLayout"
210                    android:layout_width="match_parent"
211                    android:layout_height="wrap_content"
212                    android:layout_weight="1"
213                    android:orientation="vertical"
214                    android:paddingLeft="16dp"
215                    android:paddingRight="16dp"
216                    android:paddingBottom="10dp">
217
218                    <Button
219                        android:id="@+id/register_new_account"
220                        style="@style/Widget.Conversations.Button.Borderless"
221                        android:textAllCaps="false"
222                        android:textSize="?TextSizeTitle"
223                        android:layout_width="match_parent"
224                        android:layout_height="wrap_content"
225                        android:layout_marginBottom="10dp"
226                        android:layout_gravity="center"
227                        android:drawableLeft="@drawable/getjid"
228                        android:fontFamily="@font/poppins"
229                        android:text="@string/create_new_account"
230                        android:textColor="?colorAccent" />
231
232                    <Button
233                        android:id="@+id/use_existing"
234                        style="@style/Widget.Conversations.Button.Borderless"
235                        android:textAllCaps="false"
236                        android:textSize="?TextSizeTitle"
237                        android:layout_width="match_parent"
238                        android:layout_height="wrap_content"
239                        android:layout_marginBottom="10dp"
240                        android:layout_gravity="center"
241                        android:drawableLeft="@drawable/havejid"
242                        android:fontFamily="@font/poppins"
243                        android:text="@string/i_already_have_an_account"
244                        android:textColor="?colorAccent" />
245
246                    <Button
247                        android:id="@+id/use_snikket"
248                        style="@style/Widget.Conversations.Button.Borderless"
249                        android:textAllCaps="false"
250                        android:textSize="?TextSizeTitle"
251                        android:layout_width="match_parent"
252                        android:layout_height="wrap_content"
253                        android:layout_gravity="center"
254                        android:drawableLeft="@drawable/snikket"
255                        android:fontFamily="@font/poppins"
256                        android:text="@string/i_am_snikket_user"
257                        android:textColor="?colorAccent" />
258
259                    <Button
260                        android:id="@+id/use_backup"
261                        style="@style/Widget.Conversations.Button.Borderless"
262                        android:textAllCaps="false"
263                        android:textSize="?TextSizeTitle"
264                        android:layout_width="match_parent"
265                        android:layout_height="wrap_content"
266                        android:layout_gravity="center"
267                        android:drawableLeft="@drawable/restore"
268                        android:fontFamily="@font/poppins"
269                        android:text="@string/restore_backup"
270                        android:textColor="?colorAccent" />
271                </LinearLayout>
272            </LinearLayout>
273        </ScrollView>
274    </LinearLayout>
275
276    </androidx.viewpager.widget.ViewPager>
277
278   <androidx.constraintlayout.widget.Guideline
279        android:id="@+id/gl_SlidePage"
280        android:layout_width="wrap_content"
281        android:layout_height="wrap_content"
282        android:orientation="horizontal"
283        app:layout_constraintGuide_end="130dp" />
284
285    <androidx.constraintlayout.widget.ConstraintLayout
286        android:id="@+id/frameLayout"
287        android:layout_width="match_parent"
288        android:layout_height="130dp"
289        android:background="?attr/colorPrimary"
290        app:layout_constraintEnd_toEndOf="parent"
291        app:layout_constraintStart_toStartOf="parent"
292        app:layout_constraintTop_toBottomOf="@+id/gl_SlidePage">
293
294        <com.tbuonomo.viewpagerdotsindicator.DotsIndicator
295            android:id="@+id/dots_indicator"
296            android:layout_width="wrap_content"
297            android:layout_height="wrap_content"
298            android:layout_gravity="center"
299            android:layout_marginTop="32dp"
300            app:dotsColor="@color/yeller"
301            app:layout_constraintEnd_toEndOf="parent"
302            app:layout_constraintStart_toStartOf="parent"
303            app:layout_constraintTop_toTopOf="parent"
304            app:selectedDotColor="#FFFFFF" />
305
306        <Button
307            android:id="@+id/button_next"
308            android:layout_width="wrap_content"
309            android:layout_height="wrap_content"
310            android:layout_gravity="center"
311            android:layout_marginTop="16dp"
312            android:layout_marginEnd="32dp"
313            android:layout_marginRight="32dp"
314            android:layout_marginBottom="32dp"
315            android:text="Next"
316            android:textColor="?attr/colorPrimaryDark"
317            app:backgroundTint="@color/yeller"
318            app:layout_constraintBottom_toBottomOf="parent"
319            app:layout_constraintEnd_toEndOf="parent"
320            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />
321
322        <Button
323            android:id="@+id/button_privacy"
324            android:layout_width="wrap_content"
325            android:layout_height="wrap_content"
326            android:layout_gravity="center"
327            android:layout_marginTop="16dp"
328            android:layout_marginEnd="32dp"
329            android:layout_marginRight="32dp"
330            android:layout_marginBottom="32dp"
331            android:text="View Privacy Policy"
332            android:textColor="?attr/colorPrimaryDark"
333            android:visibility="gone"
334            app:backgroundTint="@color/yeller"
335            app:layout_constraintBottom_toBottomOf="parent"
336            app:layout_constraintEnd_toEndOf="parent"
337            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />
338      </androidx.constraintlayout.widget.ConstraintLayout>
339
340  </androidx.constraintlayout.widget.ConstraintLayout>
341
342</layout>