‫Welcome back.
‫Now let's design the layout of this sphere and handle the calculations of this activity.
‫Go to activity underscore sphere dot XML file.
‫And here I will create two text views and one edit text and one button.
‫So I will start with edit text zero deep because I'm going to use the constraints and the height wrap
‫content ID edit text sphere text color be white.
‫And this depends on the background of this activity.
‫So I will add the background number two that I added to the drawable folder.
‫Hint.
‫Also I need a white hint and to end of parent start to start of parent and top to top of parent.
‫Then I need to add a text view.
‫And I will place this text view above the edit text.
‫Just cut this and I will add margin here with the edit text margin top 174 dpi, which is good okay.
‫And this text text color white I will add text attribute sphere volume.
‫Okay this is good.
‫Now let me add another text view and a button.
‫Also, you can drag and drop it below like this, but I prefer using this constraints.
‫I will add the button.
‫I will drag and drop it below and infer the constraints.
‫Okay, so this is good.
‫This is our layout for the sphere activity.
‫Let's move to the sphere activity and initialize these variables and widgets.
‫The first text view is text view two and the result is text view three.
‫You can use both types.
‫You can write like this, or you can use and pass the type of the widget here in the find view by id
‫generic type.
‫And here we go.
‫In the next video, we're going to handle the click event on the button and do the calculation for this
‫radius that it is passed by the edit text.