Hi everybody in this theater all we're going to go ahead and create another Android application.
So just click on this.
Start in your Android studio project and here for the application name just a pin here app 44 and then
click on next here.
You can actually choose the minimum SDK for your application.
So here just use the API 16 Android 4.1 jellybean as you can see here and then click on next and here
you can actually choose Blancher activity or you can actually choose the empty activity.
Shape this time choose this activity here empty activity and then click next and now click on finish.
So as you can see here now our application is actually created.
So let's actually double click on these arrays folder here and then double click and this layout folder.
And as you can see here this time we have only one example file and the name of this file is activity.
Underline that example.
OK.
So here selectees hello world takes you here.
And then press on delete key on your keyboard.
So now you want to actually design the user interface of our application.
So first of all let's actually drag our linearly out vertical at the center of this relatively out here.
And as you can see here we have a linearly out vertical inside these relatively out here.
OK so now let's actually drag a plaintext here inside these textfield.
Here we have some text fields.
So just select is plain text.
This is actually an edit text.
Select it and put it at the center at the center of this linearly alphabetical.
OK.
So as you can see here these attributes are related to these text here.
They lay out with as much apparent and delay out height is raw content and lay out gravity's center
underline horizontal.
As you can see here.
OK this is very important.
So now let's actually double click on these are the text here.
Double click on it and for the ID just type in here it is the name and then press on Enter key on your
keyboard.
So let's actually try and order textfield inside this linearly as vertical.
So just select the plain text here and then put it at the center of this linearly at vertical.
OK.
And double click on it.
And this time for the ID just type in here EDT email and then press on Enter key on your keyboard.
So now inside the properties that are actually related only to the EDT e-mail here you can actually
find the input type.
OK.
So let's actually find the input type attribute that is related to this actually to this edit text here.
So as you can see here this is in pool type.
Just open it here.
And as you can see here we can actually specify the type of the input that this text actually accepts.
OK.
So just select these text email address.
OK.
EDT email.
And for the info type.
Select this text email address and then check this checkbox.
OK so now let's actually right and are there any text into this linearly or vertical.
So just select it here and then put it at the center of this linearly at vertical and then at this time
double click on it and of for the ID just type in here EDT username.
OK.
And then present Enter key on your keyboard.
And now let's actually drag another text into this linearly or vertical.
So just select this one here and put it at the center of this linearly as a vertical WB it and for the
ID you just type in here EDT a password.
And then our present Enter key on your keyboard.
So now for the info type of this edit text here just typing in as you can see here we have some attributes
that are related to this.
It is e-passport.
So for the input type select text password as you can see here we have these text passport attributes
here.
Just select it and check the checkbox here.
OK.
So here you are actually specifying the input type that this text actually accepts.
Ok text passport.
Now this actually gives some hints to these these actually are text fields.
Select this one.
Here it is the name.
And now let's actually find the hint attributes.
So as you can see here we have actually a Heyns attribute that is related to this text field here.
So here for the hint of these added text here.
Just type in here please enter your name and then press an entity on your keyboard.
So as here we have actually a hint that is related to these edits here.
Please enter your username.
Just select a second.
Text here and this time for the hint.
Just type in here please enter your password OK and then present Enter key on your keyboard and this
time select this editor edit text here.
And for the Heyns just typing here please
enter your username and then press Enter key on your keyboard and then select this text here for the
hint just type in here please.
Enter your password and then press on and Turkey on your keyboard.
OK.
So hopefully that makes sense.
So now let's actually track an image into our project.
OK.
So here is our project structure here and now I want to actually drag an image into our projects on
my desktop.
I have this image so I just need to copy this image here.
I just need to double click on it and then select this copy tiger that PND and then here select is adorable
for that as you can see double click on it and here paste this image here and then click on OK.
So as you can see here now I have an image in my project inside this tribal folder.
So now let's actually write an image view into this linearly or horizontally.
So as you can see here this is our image view inside these widgets folder selected and then put it at
the center of this linearly out vertical.
So as you can see here this is an image view.
And now for the layout video let's actually assign the value one hundred and for the layout height assigned
a value 100 and then press on in Turkey on your keyboard.
So now it's actually double click on this image view here.
And first of all for the ID just type in here I m g animal and then press on Enter key on your keyboard.
And now let's actually select this as our See here just select this button here and select this project
tab here and then it's actually searched for our image.
Now I just need to type in Tiger.
So as you can see here this is our tiger here.
And then click on OK.
So here as you can see this is our target image.
So now of here inside the properties that are related to this image view.
Now let's actually find this cage type here.
So as you can see here we have these scale type here and selectees fit x y.
OK.
So it's going to fit this image up according to the it according to the x and y of this image.
OK.
And now let's actually let's try actually our radio group into this linearly out.
Well.
So as you can see here inside these containers folder I have this radio group here just select this
radio group here and put it below.
These are images you hear.
OK.
Just put it at the left of this image in the left of this linearly outwards the collocate this time.
Put it in the left OK at the left of this linear lay out vertical.
So as you can see here I have these radio here and now let's actually drag two radio buttons into these
radio group here.
So as you can see here inside these widgets folder I have these are radio groups.
Just select it and put it inside this radio group here inside these componentry section.
So as you can see here I have this radio call up here.
Let's actually try another radio button into this radio group here and here as you can see I have two
radio buttons these are radio group here.
So just select the first radio button and then double click on it and for the text just typing here
made and for the ID just type in here our radio radio made and then press on until key on your keyboard
and then lets actually select the second radio button here for the text just typing here female.
And then for the ID just type in here radio female.
And then our person entelechy on your keyboard.
So now let's actually drag about him into this linearly out vertical.
So as you can see here I have this button inside these widgets folder and select it just put it inside
at the center of this linearly out vertical as you can see here.
So as you can see here this is our button here.
And for the text just typing here at the values at the values and for the idea just type in here between
that and then press on Enter key on your keyboard.
So now as you can see here the design of our user interface is actually finished.
So now let's actually go inside our main activity the java file here and now we can actually put in
our own codes here.
OK.
Now inside the main activity class I'm going to actually pasting some lines of code here and then I'm
going to explain to you what's going on here.
So as you can see here these are the lines of code that I actually pasted here.
First of all I actually declared an object of type takes text and its name is it is the name again.
I have another object of type in the text.
It is email it it's username and password.
OK.
And here I have an image for you.
OK.
So here I actually declared an object of type image.
And its name is IMJ animal.
And here I have an object of type radio group as you can see here and its name is radio group bta.
And as you can see here gender's types are here I actually declarers actually created an object of type
strange and its name is gender type.
OK.
And I assigned an empty value to this object located this variable and here as you can see I have a
constant of type integer.
OK.
And its name is image request code and I assigned the value of 1000 to this of value.
So I'll talk more about this valuable later.
But for now I'll just put this value here put this a constant here inside your main activity class and
here as you can see I have another object and other valuable of type 3 and its name is photo path.
OK the path of the photo and I assigned antibodies to these valuable and here as you can see I actually
declared an object of type map and its name is bitmap.
OK.
So here inside is uncreate Meffert.
I'm going to actually instantiate these objects that I actually declared inside these main activity
class.
So here inside this uncreate class I'm going to pasting some lines of code and then I'm going to explain
to you what's going on here.
So as you can see here these are the lines of code that I actually pasted inside this uncreate Smurfette
in our main activity class.
So first of all I actually instantiated this EDT named Eddie takes it it you name it it takes it find
you by ID or that Id that it is you name it its e-mail.
And here as you can see our ID does it it team it to username or thought Id dot it its user name it
if he has spurred our thought id that it is the password.
I am animal Artaud ID that I am the animal.
And here as you can see I actually instantiated this radio group object radio group or that ID that
radio group.
So as you can see here there is an error here and you haven't specified an ID for this radio group object.
So let's actually go back to our activity underline mean I mean that exemplified.
And this actually selectees a radio group here inside our componentry section here.
And now let's actually find the attributes that is related to this radio group here.
So just select these attribute as you can see we have an id attribute related to this radio group and
for the ID just type in here the radio group and then press enter key on your keyboard.
So now let's actually go back to our main activity class and now as you can see this java file is now
recognizing this radio group ID.
OK Art that ID that radio group and here we have.
At our thoughts ideas bitti and at and here as you can see in line 45 I am making disport spot in dispute
here.
And as you can see here this is our PTEN at.
Ok I am making this part and I'll listen to the clicks of the user.
So BT aren't at that set on ticketless and our main activity at this.
OK.
And here as you can see I have a radio group that's set up change our listener so here as you can see
inside our activity underline minute example I want to actually make these radio buttons a listener
or two that actually clicks of the user.
So whenever the use of checks or uncheck these are actually these radio buttons.
OK.
It's going to actually listen to those touches and then it's going to respond accordingly with whether
it is actually checked or unchecked.
So as you can see here for that purpose of any to actually make this radio group and unchecked change
listener so as you can see here it is an error here and here as you can see I am not on any animal that
sits on click listener.
So again I am making this image.
This is your animal here.
A listener to the clicks of the user.
OK.
And here I am instantiating this bitmap object so bitmap assignment operator bitmap factory to decode
the resource.
And for the first argument you need to specify the resources of our application get resources.
And here we need to specify that the image inside our resources are thought tribal thought Tiger image
as you can see here and here I am making.
I am actually setting this image up for this image view.
I am I am the animal that set image bitmap bitmap.
OK so now as you can see we have an error here.
We have three errors.
First of all we set that up.
We want to make the SBT an add button or listeners to the clicks of the user and we assigned this context.
As you can see here as an argument to dismiss that said unclick listener but here in our class we need
to actually implement the unclick listener interface.
OK.
So that's the at this error is going to be eliminated.
So here in our class main activity extends app compress activity implements implements on click listener
uncle listener as you can see here we have two unclick listener interface.
The first one is for the view and the second one is for the dialog.
Just select the first one that is actually for the view view that on click the center and then press
the Enter key on your keyboard.
So so now as you can see it says implements we all thought unclick listener.
OK.
And now as you can see here this era is gone.
And as you can see here and here we have we don't have any error here.
As you can see we are also we are also making this IMT animal or animal a listener to the clicks of
the user.
But here as you can see we have an error because we need to actually implement the unchecked change
listener interface that is related to the radio group.
So now let's actually put a comma here after this view that unclick listener interface.
And then here I just need to type in a radio group Radio Group dots on checked change a listener and
that person enter key on your keyboard.
So now as you can see this class is also implementing this unchecked change the listener interface that
is related to this radio group and now the errors are gone.
And we don't have any error here but here as you can see now we have an error as you can see here.
So in order to actually make this error it is gone.
We need to actually implement some effects that are inside of these interfaces.
OK.
So we have some arm effects and we need to actually implement those methods in our main activity class.
So as you can see here there is also is our relationship between main activity class and this and these
two interfaces unclick the center and on to change the center.
So just click on this error here as you can see and then press on our Alt Enter key on your keyboard
and here as you can see it we can actually select this implement if it's here.
And then you can actually click on OK.
OK.
So this is one way to actually implement those required methods or there is another way here.
And inside this main activity class.
So after the end in calibrates of this uncreate method.
And inside these main activity class right click here and then click on generate and then actually can
implement methods.
And as you can see here these are the methods that we need to implement in our main activity class.
And then click on OK here.
So now as you can see the I.D. automatically generated these methods for us unchecked change and unclick
method.
So hopefully that makes sense.
So now in our unclear method as you can see here we have an unclear effect and inside Ismar inside this
method I want to actually paste in some lines of code here and then I'm going to explain to you what's
going on here.
So as you can see here these are the lines of code that I actually pasted here.
Inside these are inside this method.
So first of all I created a switch statement.
OK so each v.
So as you can see here we have this V that is actually of type view we get it.
So let's actually change this name to view and let's actually let's also change this name to view.
As you can see here.
So each view that get ID.
So if you want to actually switch between the IDs of our user interface components.
So as you can see here in our uncreate method I made this BTA add a listener to the clicks of the user
and I also made this IMJ animal.
Our listeners to the police of the user.