0 1 00:00:08,460 --> 00:00:08,890 OK. 1 2 00:00:08,930 --> 00:00:13,060 So at this point we have a plain Hello World app. 2 3 00:00:13,260 --> 00:00:15,100 So say we want to run this app. 3 4 00:00:15,180 --> 00:00:19,190 All we need to do is click on play here. 4 5 00:00:19,220 --> 00:00:26,170 Here you will see all the emulators that are available, if you click on run you will see the app running 5 6 00:00:26,200 --> 00:00:33,750 on the emulator let's give it some time to run. 6 7 00:00:33,810 --> 00:00:41,000 OK so here you can see the hello world app that was created out of the box so next we're going to look 7 8 00:00:41,000 --> 00:00:46,740 at UI elements. UI is not always important for reverse engineering. 8 9 00:00:47,020 --> 00:00:55,150 However there is the aspect of event handlers that might be of interest to us. 9 10 00:00:55,160 --> 00:00:59,570 So for example when you click on a button what is actually happening in the code 10 11 00:01:02,790 --> 00:01:03,670 Within the code, 11 12 00:01:03,690 --> 00:01:11,090 is there any reference to say in edit text within the user interface so for this we're going to create 12 13 00:01:11,090 --> 00:01:12,740 a simple button and an edit. 13 14 00:01:12,740 --> 00:01:17,200 Text and attach some code to them. 14 15 00:01:17,230 --> 00:01:17,580 OK. 15 16 00:01:17,590 --> 00:01:25,420 So in the resources, layout, main activity we can see the layout that is associated with the main activity. 16 17 00:01:26,970 --> 00:01:33,700 Actually if we go to our main activity we can see the layout we are referring to now in the layout. 17 18 00:01:33,700 --> 00:01:37,920 We have two views the design view, which is drag and drop. 18 19 00:01:38,560 --> 00:01:45,660 Then we have the text view which is the version of that UI. In the XML, 19 20 00:01:45,680 --> 00:01:51,780 you can for example add a text to view by copying and pasting the existing one. 20 21 00:01:51,860 --> 00:01:57,500 For example if we add more characters to the copied one we see that there are two text abuse behind 21 22 00:01:57,500 --> 00:01:58,430 each other. 22 23 00:01:58,730 --> 00:02:05,300 We do not need to go too deep into this but let's just add a button and an edit text for now. 23 24 00:02:05,320 --> 00:02:09,090 So first of all in the view you can set it to only see the blueprint. 24 25 00:02:10,810 --> 00:02:16,630 Then you can zoom in and out by scrolling in and out with control pressed or just by clicking on the 25 26 00:02:16,630 --> 00:02:19,410 zoom buttons OK. 26 27 00:02:19,420 --> 00:02:28,400 Let's drop in edit text and a button, if we would have to run this as it is you will see a few inconsistencies. 27 28 00:02:28,590 --> 00:02:31,040 So let's run. 28 29 00:02:31,260 --> 00:02:33,530 Here you can see they are on top of each other. 29 30 00:02:34,900 --> 00:02:39,650 This is because we need to configure the constraints. 30 31 00:02:39,720 --> 00:02:43,910 Again this is not too important but let's just make a simple constraint. 31 32 00:02:44,010 --> 00:02:50,730 So first thing we're going to add a top inside constraint for the edit text. 32 33 00:02:50,810 --> 00:02:53,240 Right now there is a zero default margin. 33 34 00:02:53,240 --> 00:02:56,740 Let's change this to 16. 34 35 00:02:56,760 --> 00:03:03,150 Next we're going to tell the button to relate it's position based on the edit text physician to do this. 35 36 00:03:03,150 --> 00:03:10,280 We're going to right click on the button and do show baseline click on the button and link the baselines 36 37 00:03:11,900 --> 00:03:13,180 also from the left side. 37 38 00:03:13,180 --> 00:03:18,550 We're going to create a left constraint linking the button to the edit text. 38 39 00:03:18,560 --> 00:03:23,720 Now if we run the app again you'll see the edit text on the left with the button on its side.