Kotlin for Android is now officially supported by Google, in this presentation we explore some of the cool features of the language. Also, we take some time to introduce new-comers to Android Development.
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class color { }} }}
<color name="green">#00FF00</color> <color name="blue">#0000FF</color> </resources> colors.xml public final class R { public static final class 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; }} }}
<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; }} }}
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>
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>
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; }} }}
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>
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>
{ 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>
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>
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>