Hi everyone.
So now it's time to code the application.
So let's go to the main activity class here.
Inside this class let's declare some valuables.
So the first one is actually private.
Let me show you the emulator first as against the first one is a button right.
So I can actually say private's button PTEN actually take a picture with you and take a picture and
then semi-colon.
So the second one is again a button saved the picture.
So again private's button Pythian saved the picture.
Semicolon.
And here we have an image view.
So again private image view I m g.
Photo semi-colon.
And here we have this search bar here.
This Let's see what actually.
So I can say private's right 6 baud rate C but semicolon.
So it is actually of type.
So I forgot to put this type here.
So private but it is of type but the name is Red Sipah private's search bar.
And here it is a Green see actually green See Spot.
Semi-colon private Tsukuba blue subpar blue spot semi-colon and we have these takes views takes the
red colored value takes the green color value and takes the blue color value.
So I can say private takes few takes the red color value
semicolon private takes few takes the green color value semicolon private takes you blue color but it
actually takes the blue color value takes the blue color value same color.
So now it's time to initialize these variables that we declared here inside this main activity class
insights on create MF'er.
So remember that in Android lifecycle the uncreate if it is the first Mefford that is going to be called
when the user runs the application.
So it is the best place to initialize these variables into initialize our user interface components.
So I can say Pythian take a picture assignment operator and now I can just cast this object to a button
object fight you by id art that ID that PTEN take a picture semi-colon.
So the second one is pithy and save the pictures which just came in here and save the picture assignment
operator Potten find view by ID or that ID that PTEN see picture semi-colon.
And here we have this image view so I am a photo assignment operator.
Let's test this object to an image view.
Find view ID are that ID that actually I photo or a semi-colon.
And here we have this red search bar so Red Sea bar assignment operator.
Let's cast this to a sleeper object.
Find view Id artist Id that search bar.
And here you can see the autocomplete feature of Android studio is helping me to choose one of these
options such as this one red color Sipah semi-colon and now it's time to initialize the green.
Assignment operator.
So let's cast this object to see what object find view by I-T that ID that actually green Singapore
green colors see Q-Bot semicolon.
And here we have these Palosi bars so pollutes the part assignment operator cestus object to a simple
object find view ID or that Id dot blue color See Spot semicolon and we have this one takes the red
color value use the green color really and takes the blue color value.
So the saving here takes the red color value assignment operator.
Let's test this object to a text view object find view ID are that ID that you see actually red color
value semicolon.
And we have this one takes the green color radio so that they can hear takes the green color value assignment
operator let's cast this object to a text view object find view by ID or that Id that takes the green
color value semicolon and we have a this one takes the blue color value so takes the blue color value
assignment operator.
Let's test this object to a text view object find view by id r that ID that takes the blue color value
blue color value semicolon so that it be initialized.
Our user interface components here.
So now.