1
00:00:00,380 --> 00:00:04,090
Okay now that is done about a user interface is actually finished.

2
00:00:04,170 --> 00:00:09,780
OK so now let's actually go inside this main activity that Java find here and now let's actually delete

3
00:00:09,840 --> 00:00:12,970
these lines of code that are related to the Options menu.

4
00:00:13,170 --> 00:00:17,360
And then there is this block of code that is related to the floating action button.

5
00:00:17,520 --> 00:00:19,970
And now we can actually put in our own codes here.

6
00:00:19,980 --> 00:00:24,440
First of all let's actually create a class called animal here.

7
00:00:24,630 --> 00:00:32,430
So just click on File New and then click on Java class and as for the name of our class just type in

8
00:00:32,430 --> 00:00:35,680
here Alamein and then click on OK.

9
00:00:35,970 --> 00:00:37,790
So now as you can see this is our animation.

10
00:00:37,920 --> 00:00:43,600
So now I want to actually track some images into my project so I have the images on my desktop as I

11
00:00:43,600 --> 00:00:44,410
guess here.

12
00:00:44,460 --> 00:00:50,670
So I just need to actually select this adorable for that as you can see and hear I can actually copy

13
00:00:50,670 --> 00:00:51,590
these images.

14
00:00:51,660 --> 00:00:57,750
So I just need to right click on them and then copy 10 items and I just need to select this a drivable

15
00:00:57,750 --> 00:01:02,830
folder right click on it and then here I just need to select this paste here.

16
00:01:02,850 --> 00:01:03,490
OK.

17
00:01:03,930 --> 00:01:06,010
And now I just need to click on OK.

18
00:01:06,420 --> 00:01:08,740
So now as you can see our images are here.

19
00:01:08,840 --> 00:01:09,740
OK.

20
00:01:09,780 --> 00:01:15,360
So now now inside this Animal class I want to actually create two arrays here.

21
00:01:15,390 --> 00:01:19,620
So I'm just gonna paste in some lines of code here and then I'm going to explain to you what's going

22
00:01:19,620 --> 00:01:20,230
on here.

23
00:01:20,460 --> 00:01:25,560
So as you can see here I have an aesthetic error here of type integer and this array actually holds

24
00:01:26,010 --> 00:01:27,450
the ID.

25
00:01:27,570 --> 00:01:33,150
The idea of the resources of our image is as you can see here inside this triable folder and we have

26
00:01:33,150 --> 00:01:35,410
another static string array.

27
00:01:35,580 --> 00:01:38,280
So this era is actually an array of string values.

28
00:01:38,460 --> 00:01:45,150
And these are I actually hold this array actually hold the names of odd animals as you can see here.

29
00:01:45,510 --> 00:01:49,170
And now let's actually go back and say this main activity that double file here.

30
00:01:49,200 --> 00:01:53,750
So inside of this main activity class I'm going to actually declare some objects here.

31
00:01:54,090 --> 00:01:57,510
So as you can see here these are the lines of code that they actually pasted here.

32
00:01:57,510 --> 00:02:02,740
First of all in line 13 I actually declared an object of type view flipper.

33
00:02:02,790 --> 00:02:08,670
OK so as you can see here inside this content underline minute example you have an object and a component

34
00:02:08,670 --> 00:02:10,880
here called view view flipper.

35
00:02:11,010 --> 00:02:11,430
OK.

36
00:02:11,610 --> 00:02:17,910
So I actually declare this object and I actually are declared two objects of type image BOWDEN As you

37
00:02:17,910 --> 00:02:23,550
can see here the name of the first one is between an animal image next and the name of the second object

38
00:02:23,580 --> 00:02:28,940
is between an animal image previous so that you can see here inside this content underline minute example

39
00:02:29,140 --> 00:02:31,500
in situs linearly at horizontal.

40
00:02:31,550 --> 00:02:33,690
You have these two images here.

41
00:02:33,750 --> 00:02:38,590
Image buttons and now you have a view animator as you can see here.

42
00:02:38,730 --> 00:02:40,980
So I actually declare this object here.

43
00:02:41,160 --> 00:02:45,760
And inside this content underline mean that it mean that a symbol as you can see here you have this

44
00:02:46,020 --> 00:02:49,410
animator here inside these linearly alphabetically.

45
00:02:49,620 --> 00:02:55,830
So now inside these uncreate Meffert I'm going to actually instantiate these objects that they actually

46
00:02:55,860 --> 00:02:58,410
declared inside the main activity class.

47
00:02:58,410 --> 00:03:03,110
So now when I pasted some lines of code here and then I'm going to explain to you what's going on here.

48
00:03:03,120 --> 00:03:06,710
So as you can see here these are the lines of code that they actually pasted here.

49
00:03:06,720 --> 00:03:11,990
First of all they actually instantiated this between animal and animal image next button here.

50
00:03:12,000 --> 00:03:18,210
As you can see on here as you can see a cast that this object to an image BOTTEN object as you can see.

51
00:03:18,210 --> 00:03:23,780
And then here you referred to the ID of this object are that ID that bit here and in one image next.

52
00:03:23,850 --> 00:03:27,540
And here this is our BTA image previous As you can see here.

53
00:03:27,540 --> 00:03:30,800
I tested this object to an image but an object.

54
00:03:30,930 --> 00:03:36,550
And then here I referred to the idea of this object or that idea that between animate image previous.

55
00:03:36,780 --> 00:03:42,430
And we have this view Flipper here as you can see and hear I actually Chastity's object to of you Philippe

56
00:03:42,430 --> 00:03:43,160
an object.

57
00:03:43,350 --> 00:03:49,850
And here I referred to the idea of this object or that idea that you flipper and here as you can see

58
00:03:49,850 --> 00:03:56,910
we have this view animator object and then I actually cast this object to a view animated object find

59
00:03:56,910 --> 00:04:00,130
view by ID or that ID that view animator object.

60
00:04:00,210 --> 00:04:08,190
OK so now let's actually create some MFX inside the main activity class and then here after the end

61
00:04:08,190 --> 00:04:13,470
in calibrates of these uncreate Smurfette as you can see here here inside this class and then I'm going

62
00:04:13,470 --> 00:04:14,890
to try to create a method here.

63
00:04:14,970 --> 00:04:18,900
So I'm just going to paste the same lines of code here and then I'm going to explain to you what's going

64
00:04:18,900 --> 00:04:19,520
on here.

65
00:04:19,740 --> 00:04:23,940
So the first method that we want to actually create inside this class is this method.

66
00:04:24,000 --> 00:04:26,520
Let's set the layout programs for image view.

67
00:04:26,610 --> 00:04:27,150
OK.

68
00:04:27,150 --> 00:04:31,310
So as you can see the axis if I get off this MF for this public the return type is void.

69
00:04:31,380 --> 00:04:34,260
So this means that this method is going to return nothing.

70
00:04:34,440 --> 00:04:39,030
And the name of this method is let's lay out perhaps for image view and decide if it actually accepts

71
00:04:39,240 --> 00:04:41,010
an argument of type image view.

72
00:04:41,010 --> 00:04:46,280
As you can see here and inside this method I'm just specifying that image view that citadels perhaps.

73
00:04:46,290 --> 00:04:52,200
So here I want to actually specify that the image view of Viets and the image view height as you can

74
00:04:52,200 --> 00:04:52,860
see here.

75
00:04:53,020 --> 00:04:57,480
So certainly as new linearly out that layout problems.

76
00:04:57,570 --> 00:05:04,600
So this method is only valid our images if our viewers are going to be inside a linear layout.

77
00:05:04,610 --> 00:05:05,170
OK.

78
00:05:05,430 --> 00:05:11,660
So linearly out that lairds perhaps 1000 for the image of view and 1000 for the height of our imagery.

79
00:05:11,670 --> 00:05:12,510
OK.

80
00:05:12,730 --> 00:05:17,520
And now let's actually create another method here inside this main activity class.

