‫Hello, my friends.
‫In this video we are going to create the dialogue layout.
‫So when you scan a barcode, you will get you need to display the data that it contains.
‫So in order to display this data inside a dialog, we need a layout for this dialog and then we will
‫add its functionality later on in the main activity.
‫So for that, I need to create a new layout here in the inside the resources folder, inside the Druggable
‫folder and sorry inside that layout.
‫And I will create a new layout X layout resources.
‫Fine.
‫I will name it as button underscore dialog and I will click on.
‫Okay.
‫I would go in a split mode and here I will create a relatively out or image view here.
‫Image view.
‫Wrap content.
‫I will add a line per a line parent or here to that layout.
‫The source as RC it would be.
‫I see.
‫Underscore action.
‫Or I can make as durable.
‫Drobo.
‫I see.
‫I will create it.
‫Now action.
‫Close.
‫Alt plus.
‫Enter to create the Strobel folder and type as selected and click.
‫Okay.
‫And here I will paste.
‫This code, you can download it from the resources folder.
‫Ends the description below.
‫Or you can write them clearly.
‫This is.
‫That code of this AI action I see action clause or you can download the exe image or you can get it
‫as a p and g file.
‫You can copy it and paste it inside the resources folder inside the drobo like this.
‫Paste and it would be pasted as a PMG, so either an example or you can use the other.
‫So it is a vector, you can make it as a vector like this or you can add it as a PNG OC.
‫And it will be displayed like this.
‫I will name as I'd close.
‫And.
‫Here I will put another layout aligned parent left and right.
‫Lay out a line, let the left if it is an inside a relatively out.
‫So I will add here a relative layout
‫match parent and wrap content.
‫And here I will.
‫Drag and drop this relatively out android.
‫Align left layout.
‫Align left.
‫And it is true.
‫And.
‫A lion parent start is equal to true.
‫Okay.
‫This is for the image of you inside this relative layout, inside this relatively out.
‫We need to add another text, another widget, which is a text view.
‫So it's rap content and rap content for the width and height ID is equal to text underscore title and
‫the center horizontal is equal to true and the text is equal to string title.
‫Hello.
‫I'd text title and text alignment is center and the color is black.
‫It's good.
‫Now, after we have finished this relative layout, I need to move an add to another text view outside
‫this relatively at.
‫Okay.
‫So text of you here.
‫Text of you.
‫The rap content.
‫Rap content ID is equal to text underscore link.
‫If it if it contains any link.
‫So we are adding an image view here.
‫If the user if the QR code contains any links and we add it at this.
‫Oops ignored missing constraints.
‫If they use if the QR code contains a link, it will be displayed here.
‫If it contains a text, a title.
‫It will be displayed inside this text view.
‫It contains an image, a link for image, and will be displayed inside this image here and so on.
‫So one for the link, one for the visit link, one for the title and one for the image view.
‫Okay, so text link.
‫Margin.
‫Top margin top is equal to ten DPI
‫and the text alignment is equal to center.
‫Okay.
‫Margin gravity.
‫It would be center.
‫Horizontal.
‫Gravity.
‫Center.
‫Horizontal.
‫Under the text of you, we need to create another text view.
‫It's equal.
‫Its attributes would be rap content and rap content.
‫For width and height I'd visit and gravity center horizontal the margin top margin top is 12 DPI Padding
‫12 DPI left margin left.
‫Or here.
‫Padding or padding left would be 12 DPI padding button would be four dpi and text is text would be visit
‫link and text alignment would be center and the text color would be I prefer teal 700.
‫You see, guys, this is the visit link.
‫This is the visit link and the constraints OC.
‫So I will drag and drop it here.
‫The visit link and the here and the text.
‫It would be like this.
‫I will add the constraints and.
‫It would be like this.
‫I will add these constraints to it.
‫Now we have finished the button they look and the next video we are going to add the functionality of
‫this app.