1
00:00:00,450 --> 00:00:01,320
Hi everyone.

2
00:00:01,350 --> 00:00:03,360
So now it's time to code the application.

3
00:00:03,360 --> 00:00:06,680
So let's go to the main activity class here.

4
00:00:06,890 --> 00:00:10,320
Inside this class let's declare some valuables.

5
00:00:10,320 --> 00:00:12,680
So the first one is actually private.

6
00:00:12,720 --> 00:00:16,860
Let me show you the emulator first as against the first one is a button right.

7
00:00:16,980 --> 00:00:26,440
So I can actually say private's button PTEN actually take a picture with you and take a picture and

8
00:00:26,440 --> 00:00:27,650
then semi-colon.

9
00:00:27,940 --> 00:00:30,550
So the second one is again a button saved the picture.

10
00:00:30,550 --> 00:00:38,430
So again private's button Pythian saved the picture.

11
00:00:41,250 --> 00:00:42,580
Semicolon.

12
00:00:42,830 --> 00:00:44,710
And here we have an image view.

13
00:00:44,720 --> 00:00:50,140
So again private image view I m g.

14
00:00:50,150 --> 00:00:52,690
Photo semi-colon.

15
00:00:53,660 --> 00:00:56,130
And here we have this search bar here.

16
00:00:56,210 --> 00:00:57,830
This Let's see what actually.

17
00:00:57,830 --> 00:01:05,770
So I can say private's right 6 baud rate C but semicolon.

18
00:01:05,970 --> 00:01:08,700
So it is actually of type.

19
00:01:08,790 --> 00:01:11,620
So I forgot to put this type here.

20
00:01:12,060 --> 00:01:18,970
So private but it is of type but the name is Red Sipah private's search bar.

21
00:01:19,210 --> 00:01:23,530
And here it is a Green see actually green See Spot.

22
00:01:25,660 --> 00:01:38,380
Semi-colon private Tsukuba blue subpar blue spot semi-colon and we have these takes views takes the

23
00:01:39,170 --> 00:01:43,470
red colored value takes the green color value and takes the blue color value.

24
00:01:43,600 --> 00:01:51,260
So I can say private takes few takes the red color value

25
00:01:53,860 --> 00:02:05,250
semicolon private takes few takes the green color value semicolon private takes you blue color but it

26
00:02:05,530 --> 00:02:12,640
actually takes the blue color value takes the blue color value same color.

27
00:02:12,720 --> 00:02:19,170
So now it's time to initialize these variables that we declared here inside this main activity class

28
00:02:19,440 --> 00:02:21,240
insights on create MF'er.

29
00:02:21,240 --> 00:02:26,700
So remember that in Android lifecycle the uncreate if it is the first Mefford that is going to be called

30
00:02:26,970 --> 00:02:28,950
when the user runs the application.

31
00:02:29,070 --> 00:02:35,250
So it is the best place to initialize these variables into initialize our user interface components.

32
00:02:35,250 --> 00:02:42,900
So I can say Pythian take a picture assignment operator and now I can just cast this object to a button

33
00:02:42,900 --> 00:02:49,720
object fight you by id art that ID that PTEN take a picture semi-colon.

34
00:02:50,130 --> 00:02:54,930
So the second one is pithy and save the pictures which just came in here and save the picture assignment

35
00:02:54,930 --> 00:03:06,520
operator Potten find view by ID or that ID that PTEN see picture semi-colon.

36
00:03:06,600 --> 00:03:10,460
And here we have this image view so I am a photo assignment operator.

37
00:03:10,560 --> 00:03:13,160
Let's test this object to an image view.

38
00:03:14,120 --> 00:03:20,920
Find view ID are that ID that actually I photo or a semi-colon.

39
00:03:21,290 --> 00:03:25,900
And here we have this red search bar so Red Sea bar assignment operator.

40
00:03:25,910 --> 00:03:28,770
Let's cast this to a sleeper object.

41
00:03:28,970 --> 00:03:33,520
Find view Id artist Id that search bar.

42
00:03:33,680 --> 00:03:38,120
And here you can see the autocomplete feature of Android studio is helping me to choose one of these

43
00:03:38,120 --> 00:03:45,210
options such as this one red color Sipah semi-colon and now it's time to initialize the green.

44
00:03:45,260 --> 00:03:46,650
Assignment operator.

45
00:03:47,060 --> 00:03:57,810
So let's cast this object to see what object find view by I-T that ID that actually green Singapore

46
00:03:58,060 --> 00:04:00,250
green colors see Q-Bot semicolon.

47
00:04:00,730 --> 00:04:07,120
And here we have these Palosi bars so pollutes the part assignment operator cestus object to a simple

48
00:04:07,120 --> 00:04:17,140
object find view ID or that Id dot blue color See Spot semicolon and we have this one takes the red

49
00:04:17,140 --> 00:04:20,750
color value use the green color really and takes the blue color value.

50
00:04:20,800 --> 00:04:24,880
So the saving here takes the red color value assignment operator.

51
00:04:25,000 --> 00:04:33,010
Let's test this object to a text view object find view ID are that ID that you see actually red color

52
00:04:33,010 --> 00:04:34,490
value semicolon.

53
00:04:34,750 --> 00:04:40,720
And we have this one takes the green color radio so that they can hear takes the green color value assignment

54
00:04:40,720 --> 00:04:49,780
operator let's cast this object to a text view object find view by ID or that Id that takes the green

55
00:04:49,780 --> 00:04:57,400
color value semicolon and we have a this one takes the blue color value so takes the blue color value

56
00:04:57,460 --> 00:04:58,640
assignment operator.

57
00:04:58,660 --> 00:05:06,310
Let's test this object to a text view object find view by id r that ID that takes the blue color value

58
00:05:06,790 --> 00:05:11,580
blue color value semicolon so that it be initialized.

59
00:05:11,650 --> 00:05:13,900
Our user interface components here.

60
00:05:14,200 --> 00:05:15,190
So now.

