Slide 1

Slide 1 text

STARTING ANDROID 2022

Slide 2

Slide 2 text

BIO SYRINE TRABELSI (SHE/HER) ▸ Senior Android Developer @Trainline ▸ Full time mum of 2 outside working hours ▸ Started Android programming 10 years ago ▸ Slides already available here: https:// speakerdeck.com/syrinet ▸ @sarrouna23

Slide 3

Slide 3 text

About Trainline Trainline is the leading independent rail and coach travel platform selling rail and coach tickets to millions of travellers worldwide. Via our highly rated website and mobile app, people can seamlessly search, book and manage their journeys all in one place. We bring together millions of routes, fares and journey times from more than 270 rail and coach carriers across 45 countries. We help our customers find the best value fares for their journey and smart, real time travel information on the go. Our aim is to make rail and coach travel easier and more accessible, encouraging people to make more environmentally sustainable travel choices. i. Based on transactions from weeks commencing 06/10/2019 to 23/11/2019 ii. iOS rating from UK AppStore as of 29 November 2019 iii. Trainline data for November 2019 (incl. UK consumer number Web/App and EU Web/App) iv. Average monthly visits for year ended 29 February 2020 v. UK consumer mobile app transactions for the year ended 29 February 2020 Trainline is the world’s leading independent rail and coach travel platform We sell tickets on behalf of more than 270 rail and coach companies and are adding more all the time We sell train and coach tickets worldwide, helping our customers travel in and across 45 countries in Europe and the rest of the world We sell tickets to people living in more than 175 countriesi in 14 languages Our customers can book in 10 currencies and payment methods include Apple Pay, PayPal, Google Pay, SOFORT & iDEAL We have built Europe’s leading train and coach app – with a 4.9/5* ratingii There are more than 44m cumulative downloads of our appiii Our platforms host more than 90m visits per monthiv 84% of our transactions are through our appv Our team numbers more than 750 people and more than 50 nationalities, including 400+ travel tech specialists and engineers >160 Train companie s >110 Coach companie s

Slide 4

Slide 4 text

WHAT IS THE DEAL ?

Slide 5

Slide 5 text

NEWEST OLDEST

Slide 6

Slide 6 text

Android Studio IDE Kotlin

Slide 7

Slide 7 text

ANDROID WORLD

Slide 8

Slide 8 text

ANDROID LEXICON ANDROID WORLD ▸ Activity ▸ Fragment ▸ Manifest ▸ View?

Slide 9

Slide 9 text

ANDROID LEXICON ACTIVITY ▸ It’s an entry point for interacting with the user ▸ Crucial part for an Android application ▸ Any app have at least 1 activity

Slide 10

Slide 10 text

import android.app.Activity import android.os.Bundle class MainActivity : Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) } override fun onStart() { super.onStart() } override fun onResume() { super.onResume() } override fun onPause() { super.onPause() } override fun onStop() { super.onStop() } override fun onDestroy() { super.onDestroy() } } 10

Slide 11

Slide 11 text

11

Slide 12

Slide 12 text

ANDROID LEXICON ANDROID WORLD ▸ Activity ▸ Fragment ▸ Manifest ▸ View?

Slide 13

Slide 13 text

ANDROID LEXICON 13

Slide 14

Slide 14 text

14

Slide 15

Slide 15 text

ANDROID LEXICON ANDROID WORLD ▸ Activity ▸ Fragment ▸ Manifest ▸ View?

Slide 16

Slide 16 text

ANDROID LEXICON 16

Slide 17

Slide 17 text

17

Slide 18

Slide 18 text

ANDROID LEXICON ANDROID WORLD ▸ Activity ▸ Fragment ▸ Manifest ▸ View?

Slide 19

Slide 19 text

ANDROID LEXICON THE VIEW : THEN ▸ Layout XML ▸ Resources XML ▸ Binding the views from Java/Kotlin code

Slide 20

Slide 20 text

20

Slide 21

Slide 21 text

21

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

ANDROID LEXICON THE VIEW : NOW ▸ Jetpack compose ▸ Only Kotlin for the whole project 23

Slide 24

Slide 24 text

@Composable fun centeredButton() { Box( modifier = Modifier.fillMaxWidth().fillMaxHeight(), contentAlignment = Alignment.Center, ) { Button(onClick = {}) { Text("Button") } } } 24

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

const CustomButton = ({ onPress }) => { return ( Click on me ); }; @Composable fun CustomButton() { Button(onClick = {}) { Text(text = "Click on me") } } 26

Slide 27

Slide 27 text

ANDROID WORLD COMMUNITY ▸ https://www.reddit.com/r/androiddev/ ▸ https://www.meetup.com/ fi nd/?keywords=android&source=EVENTS ▸ Android weekly ▸ https://gdg.community.dev 27

Slide 28

Slide 28 text

SHOW ME CODE !

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

https://developer.android.com/courses/jetpack-compose/course https://developer.android.com/courses/android-basics-kotlin/course https://kotlinlang.org/docs/koans.html https://developer.android.com/courses

Slide 31

Slide 31 text

THANK YOU !