Share
Embed
Kotlin Introduction & Google Firebase Integration
Let's get an introduction about Kotlin, the not-so-new language for Android and talk about Firebase for authentication and data storage.
Jorge E. Hernández
October 17, 2017
Transcript
200 slides
-
Kotlin Introduction & Google Firebase Integration Jorge E. Hernández @lalongooo
Android Engineer at Unosquare -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student />
</school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“”/>
</school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”/>
</school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”
last_name=“”/> </school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”
last_name=“Perez”/> </school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”
last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”
last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan”
last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml <?xml version="1.0" encoding="utf-8"?> <library> </library> // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“”/>
</library> <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> </library> <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:=““> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=““> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student name=“Juan” last_name=“Perez”/> <classroom name=“VIP Classroom”/> <teacher name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library> <book name=“Fifty
shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:=““> <book
name=“Fifty shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=““> <book
name=“Fifty shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=“http://cusur.com/schema/mylibrary“> <book
name=“Fifty shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=“http://cusur.com/schema/mylibrary“> <book
name=“Fifty shades of Grey”/> <student name=“José García”/> <author name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=“http://cusur.com/schema/mylibrary“> <book
l:name=“Fifty shades of Grey”/> <student l:name=“José García”/> <author l:name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=“http://cusur.com/schema/mylibrary“> <book
l:name=“Fifty shades of Grey”/> <student l:name=“José García”/> <author l:name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:guau=“http://cusur.com/schema/myschool“> <student guau:name=“Juan” guau:last_name=“Perez”/> <classroom guau:name=“VIP Classroom”/> <teacher guau:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:miau=“http://cusur.com/schema/mylibrary“> <book
miau:name=“Fifty shades of Grey”/> <student miau:name=“José García”/> <author miau:name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:guau=“http://cusur.com/schema/myschool“> <student guau:name=“Juan” guau:last_name=“Perez”/> <classroom guau:name=“VIP Classroom”/> <teacher guau:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <library xmlns:l=“http://cusur.com/schema/mylibrary“> <book
l:name=“Fifty shades of Grey”/> <student l:name=“José García”/> <author l:name=“E. L. James”/> </library> <?xml version="1.0" encoding="utf-8"?> <school xmlns:s=“http://cusur.com/schema/myschool“> <student s:name=“Juan” s:last_name=“Perez”/> <classroom s:name=“VIP Classroom”/> <teacher s:name=“El Barco”/> </school> // school_file.xml // library_file.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!"/> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> // my_screen.xml -
A 5 minutes introduction Android Tests: - Clicks (taps) -
Swipes - Pinch (zoom) -
A 5 minutes introduction Android Tests: - Clicks (taps) -
Swipes - Pinch (zoom) Instrumentation tests -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen>
<dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click
me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me" app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color> <color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color> <color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color> <color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height="wrap_content" android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name=“btn_height">100dp</dimen> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text="Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“Click me"
app:layout_constraintBottom_toTopOf="@+id/myTextView" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=“Hello World!“ android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=“@string/hello“ android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=“@string/hello“ android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name=“hello">Hello World!</string> </resources> -
A 5 minutes introduction <Button android:id="@+id/myButton" android:layout_width=“@dimen/btn_width" android:layout_height=“@dimen/btn_height” android:text=“@string/btn_text“ app:layout_constraintBottom_toTopOf="@+id/myTextView"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=“@string/hello“ android:textColor=“@color/red" android:textSize="56sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class color { }} }} -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class color { }} }} -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class color { public static final int red=0x7f050002; }} }} -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class color { public static final int red=0x7f050002; public static final int green=0x7f050003; public static final int blue=0x7f050004; }} }} -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml R.color.red public final class R { public static final class color { public static final int red=0x7f050002; public static final int green=0x7f050003; public static final int blue=0x7f050004; }} }} -
A 5 minutes introduction <?xml version="1.0" encoding="utf-8"?> <resources> <color name="red">#FF0000</color>
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml R.color.red R.color.green R.color.blue public final class R { public static final class color { public static final int red=0x7f050002; public static final int green=0x7f050003; public static final int blue=0x7f050004; }} }} -
A 5 minutes introduction dimens.xml <?xml version="1.0" encoding="utf-8"?> <resources> <dimen
name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction dimens.xml public final class R {
public static final class dimen { public static final int btn_width=0x7f030004; public static final int btn_height=0x7f050002; }} }} <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction dimens.xml R.dimen.btn_width R.dimen.btn_height public final class
R { public static final class dimen { public static final int btn_width=0x7f030004; public static final int btn_height=0x7f050002; }} }} <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="btn_width">180dp</dimen> <dimen name="btn_height">100dp</dimen> </resources> -
A 5 minutes introduction strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string
name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string
name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> public final class R { public static final class string { public static final int btn_text=0x7f05001e; public static final int hello=0x7f050030; }} }} -
A 5 minutes introduction strings.xml R.string.btn_text R.string.hello public final class
R { public static final class string { public static final int btn_text=0x7f05001e; public static final int hello=0x7f050030; }} }} <?xml version="1.0" encoding="utf-8"?> <resources> <string name="btn_text">Click me</string> <string name="hello">Hello World!</string> </resources> -
A 5 minutes introduction my_screen.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml public final class R {
public static final class layout { public static final int my_screen=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml R.layout.btn_text R.layout.hello public final class
R { public static final class layout { public static final int my_screen=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml public final class R {
}} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml public final class R {
public static final class id { }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml public final class R {
public static final class id { public static final int myButton=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml public final class R {
public static final class id { public static final int myButton=0x7f64003e; public static final int myTextView=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml R.id.myButton public final class R
{ public static final class id { public static final int myButton=0x7f64003e; public static final int myTextView=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction my_screen.xml R.id.myButton R.id.myTextView public final class
R { public static final class id { public static final int myButton=0x7f64003e; public static final int myTextView=0x7f64003e; }} }} <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <Button android:id="@+id/myButton" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/myTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </android.support.constraint.ConstraintLayout> -
A 5 minutes introduction import android.app.Activity class MyActivity : Activity()
{{ override fun onCreate() { }} }} -
A 5 minutes introduction import android.app.Activity class MyActivity : Activity()
{{ override fun onCreate(savedInstanceState: Bundle?) { }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() {{ override fun onCreate(savedInstanceState: Bundle?) { }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() {{ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate() }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() {{ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() {{ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView() }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate() { }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate() { }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} import android.app.Activity import android.os.Bundle public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_screen); }} }} MainActivity.kt MainActivity.java -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById() }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>() }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton) }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if () { }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if () { // Show }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if () { // Show } else { }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if () { // Show } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>()) { // Show } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView)) { // Show } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility) { // Show } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility == View.VISIBLE) { // Show } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility == View.VISIBLE) { findViewById<View>(R.id.myTextView).visibility } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility == View.VISIBLE) { findViewById<View>(R.id.myTextView).visibility = View.INVISIBLE } else { // Hide }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility == View.VISIBLE) { findViewById<View>(R.id.myTextView).visibility = View.INVISIBLE } else { findViewById<View>(R.id.myTextView).visibility }} }} }} }} MainActivity.kt -
A 5 minutes introduction import android.app.Activity import android.os.Bundle class MyActivity
: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.my_screen) findViewById<View>(R.id.myButton).setOnClickListener { if (findViewById<View>(R.id.myTextView).visibility == View.VISIBLE) { findViewById<View>(R.id.myTextView).visibility = View.INVISIBLE } else { findViewById<View>(R.id.myTextView).visibility = View.VISIBLE }} }} }} }} MainActivity.kt