Course programme
Introduction
2 lectures 02:40
Introduction to the Course
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up. There, you can expand "Android" group and select "holo_red_dark".
d) Inside StartGame class, if you override onCreate() in latest Android Studio, you'll see an optional Annotation (@androidx.annotation.Nullable) in the parameter. Just remove that since it's not required.2. Section 8, lecture titled "Design the GameOver screen":a) In GameOver class, in the onCreate() parameter, delete the optional Annotation (@androidx.annotation.Nullable) as well.
b) While designing the game_over.xml add these 3 lines for the left button (Restart) which used to be auto-generated:
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
and,
c) For the right button (Exit):
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
d) for LinearLayout(vertical) add these lines:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"That's it. Hope that helps. Happy learning!
Introduction.
2 lectures 02:40
Introduction to the Course
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up. There, you can expand "Android" group and select "holo_red_dark".
d) Inside StartGame class, if you override onCreate() in latest Android Studio, you'll see an optional Annotation (@androidx.annotation.Nullable) in the parameter. Just remove that since it's not required.2. Section 8, lecture titled "Design the GameOver screen":a) In GameOver class, in the onCreate() parameter, delete the optional Annotation (@androidx.annotation.Nullable) as well.
b) While designing the game_over.xml add these 3 lines for the left button (Restart) which used to be auto-generated:
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
and,
c) For the right button (Exit):
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
d) for LinearLayout(vertical) add these lines:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"That's it. Hope that helps. Happy learning!
Introduction to the Course
Introduction to the Course
Introduction to the Course
Introduction to the Course
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up. There, you can expand "Android" group and select "holo_red_dark".
d) Inside StartGame class, if you override onCreate() in latest Android Studio, you'll see an optional Annotation (@androidx.annotation.Nullable) in the parameter. Just remove that since it's not required.2. Section 8, lecture titled "Design the GameOver screen":a) In GameOver class, in the onCreate() parameter, delete the optional Annotation (@androidx.annotation.Nullable) as well.
b) While designing the game_over.xml add these 3 lines for the left button (Restart) which used to be auto-generated:
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
and,
c) For the right button (Exit):
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
d) for LinearLayout(vertical) add these lines:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"That's it. Hope that helps. Happy learning!
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up. There, you can expand "Android" group and select "holo_red_dark".
d) Inside StartGame class, if you override onCreate() in latest Android Studio, you'll see an optional Annotation (@androidx.annotation.Nullable) in the parameter. Just remove that since it's not required.2. Section 8, lecture titled "Design the GameOver screen":a) In GameOver class, in the onCreate() parameter, delete the optional Annotation (@androidx.annotation.Nullable) as well.
b) While designing the game_over.xml add these 3 lines for the left button (Restart) which used to be auto-generated:
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
and,
c) For the right button (Exit):
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
d) for LinearLayout(vertical) add these lines:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"That's it. Hope that helps. Happy learning!
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up. There, you can expand "Android" group and select "holo_red_dark".
d) Inside StartGame class, if you override onCreate() in latest Android Studio, you'll see an optional Annotation (@androidx.annotation.Nullable) in the parameter. Just remove that since it's not required.2. Section 8, lecture titled "Design the GameOver screen":a) In GameOver class, in the onCreate() parameter, delete the optional Annotation (@androidx.annotation.Nullable) as well.
b) While designing the game_over.xml add these 3 lines for the left button (Restart) which used to be auto-generated:
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
and,
c) For the right button (Exit):
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
d) for LinearLayout(vertical) add these lines:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"That's it. Hope that helps. Happy learning!
Important Update: Must read before you proceed!
In this course, I used Android Studio version 2.3.3 which was the latest version when I created this course. The current version is 3.4.1 released in May 2019.
Here are some minor actions you need to take only in two lectures related to designing the XML Layout, if you're using the latest version of Android Studio, to follow along with the course. Rest of the code, including Java, works just fine as before.1. Section 2, lecture titled "Create the Project":a) I drag and dropped an ImageButton from "Images" group under Palette. In Studio 3.4.1 ImageButton can be dragged from "Buttons" group under Palette. While dragging the ImageButton we used to see two dotted lines, with an orange dotted rectangle at the center, indicating it's the center of the layout. In the latest Android Studio, we don't get these indications while working with RelativeLayout. We can easily solve this issue by writing just two lines inside ImageButton (which used to be auto-generated):
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
b) TextView was dragged from "All" group under Palette. Now, it can be dragged from "Common" or "Text" group under Palette. Previously, TextView could be dropped just below the ImageButton. Now, if you try to drag and drop a TextView below the ImageButton, it will automatically be placed at the top-left of the layout. We can simply solve this issue by writing just three lines inside TextView:
android:layout_below="@+id/imageButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
c) We clicked the 3-dots after textColor from "Properties" window, which caused the Resources window to pop-up. We clicked Color group and selected "holo_red_dark". Now, the name of the "Properties" window is "Attributes". We can see that a default color is selected after textColor. We can click the small vertical bar next to it which causes the Resources window to pop-up e) as well.
b) While designing...