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
247                    <Button
248                        android:id="@+id/use_snikket"
249                        style="@style/Widget.Conversations.Button.Borderless"
250                        android:textAllCaps="false"
251                        android:textSize="?TextSizeTitle"
252                        android:layout_width="match_parent"
253                        android:layout_height="wrap_content"
254                        android:layout_gravity="center"
255                        android:drawableLeft="@drawable/snikket"
256                        android:fontFamily="@font/poppins"
257                        android:text="@string/i_am_snikket_user"
258                        android:textColor="?colorAccent" />
259                </LinearLayout>
260            </LinearLayout>
261        </ScrollView>
262    </LinearLayout>
263
264    </androidx.viewpager.widget.ViewPager>
265
266   <androidx.constraintlayout.widget.Guideline
267        android:id="@+id/gl_SlidePage"
268        android:layout_width="wrap_content"
269        android:layout_height="wrap_content"
270        android:orientation="horizontal"
271        app:layout_constraintGuide_end="130dp" />
272
273    <androidx.constraintlayout.widget.ConstraintLayout
274        android:id="@+id/frameLayout"
275        android:layout_width="match_parent"
276        android:layout_height="130dp"
277        android:background="?attr/colorPrimary"
278        app:layout_constraintEnd_toEndOf="parent"
279        app:layout_constraintStart_toStartOf="parent"
280        app:layout_constraintTop_toBottomOf="@+id/gl_SlidePage">
281
282        <com.tbuonomo.viewpagerdotsindicator.DotsIndicator
283            android:id="@+id/dots_indicator"
284            android:layout_width="wrap_content"
285            android:layout_height="wrap_content"
286            android:layout_gravity="center"
287            android:layout_marginTop="32dp"
288            app:dotsColor="@color/yeller"
289            app:layout_constraintEnd_toEndOf="parent"
290            app:layout_constraintStart_toStartOf="parent"
291            app:layout_constraintTop_toTopOf="parent"
292            app:selectedDotColor="#FFFFFF" />
293
294        <Button
295            android:id="@+id/button_next"
296            android:layout_width="wrap_content"
297            android:layout_height="wrap_content"
298            android:layout_gravity="center"
299            android:layout_marginTop="16dp"
300            android:layout_marginEnd="32dp"
301            android:layout_marginRight="32dp"
302            android:layout_marginBottom="32dp"
303            android:text="Next"
304            android:textColor="?attr/colorPrimaryDark"
305            app:backgroundTint="@color/yeller"
306            app:layout_constraintBottom_toBottomOf="parent"
307            app:layout_constraintEnd_toEndOf="parent"
308            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />
309
310        <Button
311            android:id="@+id/button_privacy"
312            android:layout_width="wrap_content"
313            android:layout_height="wrap_content"
314            android:layout_gravity="center"
315            android:layout_marginTop="16dp"
316            android:layout_marginEnd="32dp"
317            android:layout_marginRight="32dp"
318            android:layout_marginBottom="32dp"
319            android:text="View Privacy Policy"
320            android:textColor="?attr/colorPrimaryDark"
321            android:visibility="gone"
322            app:backgroundTint="@color/yeller"
323            app:layout_constraintBottom_toBottomOf="parent"
324            app:layout_constraintEnd_toEndOf="parent"
325            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />
326      </androidx.constraintlayout.widget.ConstraintLayout>
327
328  </androidx.constraintlayout.widget.ConstraintLayout>
329
330</layout>