WEBVTT

00:00.140 --> 00:03.710
Let's start by creating the new project in Android studio.

00:03.740 --> 00:06.440
Select Empty Views Activity.

00:06.440 --> 00:13.940
Click next and name the application as lucky number Select Java Finish.

00:13.970 --> 00:20.450
Remember, I am teaching you how to solve problems, how to code your own apps later on.

00:20.450 --> 00:28.370
So I want from you to follow me step by step as I think first step is designing layout.

00:28.370 --> 00:36.740
So we go to the activity underscore main go to split mode and here I'll edit this text view.

00:37.070 --> 00:44.420
I'll change this text to welcome to lucky number.

00:44.510 --> 00:49.310
I'll add size 32 SP, which is good.

00:49.310 --> 00:52.400
Now I need to add the edit text.

00:52.400 --> 00:56.810
So edit text matchparent wrap content.

00:56.840 --> 01:00.500
The id would be edit text and id.

01:00.510 --> 01:04.980
I'll add a hint for this edit text please.

01:06.010 --> 01:11.020
I'll drag this edit text and I'll infer its constraint.

01:11.020 --> 01:19.450
Or I can simply delete the constraint and add the constraint to this and then moving it far from the

01:19.450 --> 01:20.040
text view.

01:20.050 --> 01:27.490
Then I need to create a button that allows the user to move to the second activity.

01:27.520 --> 01:38.990
I'll give it a width as wrap content, wrap content id, btn and text equal to wish me luck.

01:39.010 --> 01:43.390
Now I'll add some constraints to this button.

01:43.390 --> 01:52.540
I can drag and drop it and I need one horizontal and one vertical constraint for every widget or every

01:52.540 --> 01:54.620
view in the constraint layout.

01:54.640 --> 01:57.790
Then I need to copy these images.

01:59.670 --> 02:07.880
The drawable folder paste I have this dies the background number two and background number one.

02:08.810 --> 02:10.400
For the main activity.

02:10.400 --> 02:14.090
I'll add the attribute background drawable.

02:14.990 --> 02:21.870
Background number one and I'll change the text view color to white.

02:21.890 --> 02:32.090
Also the edit text, I'll add the attribute hint color, white and color white.

02:32.420 --> 02:34.400
Then I'll move down.

02:34.400 --> 02:43.190
I'll add an image view 200 DPI with height 140 DPI.

02:45.040 --> 02:50.110
ID equal image view and see dice.

02:50.680 --> 02:56.740
I'll move this image view down and I'll infer its constraints.

02:57.670 --> 03:01.330
You can see the dice is inferred here.

03:01.660 --> 03:08.950
To make it more professional, I'll add some margins to the left and right of this edit text.

03:09.310 --> 03:11.920
Let's create another activity.

03:15.970 --> 03:22.960
Activity, empty views, activity, and I'll name it as second activity.
