Let's start by creating the new project in Android studio.
Select Empty Views Activity.
Click next and name the application as lucky number Select Java Finish.
Remember, I am teaching you how to solve problems, how to code your own apps later on.
So I want from you to follow me step by step as I think first step is designing layout.
So we go to the activity underscore main go to split mode and here I'll edit this text view.
I'll change this text to welcome to lucky number.
I'll add size 32 SP, which is good.
Now I need to add the edit text.
So edit text matchparent wrap content.
The id would be edit text and id.
I'll add a hint for this edit text please.
I'll drag this edit text and I'll infer its constraint.
Or I can simply delete the constraint and add the constraint to this and then moving it far from the
text view.
Then I need to create a button that allows the user to move to the second activity.
I'll give it a width as wrap content, wrap content id, btn and text equal to wish me luck.
Now I'll add some constraints to this button.
I can drag and drop it and I need one horizontal and one vertical constraint for every widget or every
view in the constraint layout.
Then I need to copy these images.
The drawable folder paste I have this dies the background number two and background number one.
For the main activity.
I'll add the attribute background drawable.
Background number one and I'll change the text view color to white.
Also the edit text, I'll add the attribute hint color, white and color white.
Then I'll move down.
I'll add an image view 200 DPI with height 140 DPI.
ID equal image view and see dice.
I'll move this image view down and I'll infer its constraints.
You can see the dice is inferred here.
To make it more professional, I'll add some margins to the left and right of this edit text.
Let's create another activity.
Activity, empty views, activity, and I'll name it as second activity.