‫Hello, my friends.
‫So, are you excited to run our app?
‫Yes.
‫So click on this run application bot and the emulator will run and open inside Android.
‫Q okay, there is some errors.
‫Let's open the logcat and see what are the errors.
‫Okay.
‫A reader adapter requires a source ID to be text if you.
‫Let's scroll down and here goes by android.
‫X constraint cannot be casted to o OC cannot be casted to text view.
‫So let's go to the spinner item.
‫I think because here we should only use the widget, the text view, not the constraint out also.
‫So this says spinner item should only contain the.
‫Text the view directly.
‫So I will cut these attributes.
‫Give them to the text view.
‫I will remove the constraint out.
‫And from here, I will add.
‫Text if you.
‫If I put like this.
‫Like this.
‫And everything should work.
‫Fine.
‫I have removed the constraint layout.
‫Okay, guys.
‫So it's just making this layout or this file that's been an item that XML only contains the widget text
‫view.
‫So let's save the file and run the project here again.
‫And here we go.
‫This is our application.
‫So let's select from this.
‫I will translate from English.
‫Arabic.
‫And here, text translate.
‫Hello.
‫And oops, there is some error in the layout.
‫So let me also change the layout because the button has been disappeared.
‫Let me see.
‫What's the problem?
‫If we go to here this is.
‫Our constraint.
‫This is the constraint also.
‫So I will drag it up and this will be drag it up also.
‫And.
‫This will be also drag it up.
‫Now, these two constraints, I will drag them to the bottom.
‫So the text of you, I will make it related to the button.
‫And the translate button.
‫I will remove its constraint from above and link it to the button.
‫So now we have like this margin margin button.
‫I will make a margin button like
‫50 DPI, which is good rap content and match.
‫Let's run again and see if there are still errors in our layout.
‫I select from English, from Arabic and hello.
‫Now translate now downloading language model here.
‫And there is no translation.
‫Why?
‫Maybe because we didn't add that many fast project here.
‫So we need to use user's permission, request the internet, internet permission access here and let's
‫run again.
‫Clean the project and run again.
‫So like this you can take and make your experience in Android app development while you you encounter
‫all types of of errors.
‫I will put hello translate now downloading language model.
‫And there we go.
‫This is the translation here.
‫So you see, guys, it translated this text to the.
‫To the requested language.
‫Now let's add some configuration for the spinners and let's ensure that our layout will be configured
‫correctly.
‫Okay, so I closed this manifest.
‫Let's go back to here.
‫I will select The Spinners.
‫Margin top.
‫24 and after select rap content which is the high.
‫Okay.
‫And the width is.
‫Rap content was.
‫Now, if we drag it up here, it will be fine for the text and the translate button would be good.
‫Now let's run and see.
‫And.
‫English.
‫Arabic and now it's better.
‫So hello, translate now translating.
‫And this is the translated text.
‫Now let's add some background.
‫So I will copy.
‫These images you can select like this or select this wallpaper.
‫So I will.
‫Rename it as Wall.
‫I will copy it.
‫To Android studio drobo folder.
‫Paste.
‫And this is the wall.
‫So I will put like this the bank ground from that rubble and draw a bow
‫slash wall.
‫And this is good.
‫Now we need to make some edits for the colors.
‫Text color.
‫Black.
‫And font family would be sans serve.
‫And the spinner
‫text
‫or we can keep it blank from here.
‫And you can add the hint color.
‫Hint color would be black.
‫I would copy this property for the above spinner also.
‫That would be good.
‫It would be.
‫Margin.
‫Margin and.
‫And it would be good.
‫The width would be zero dpi.
‫Or I can wrap content and everything is working fine.
‫The button is good.
‫The translated text would be text color black.
‫So let's run and see our application.
‫And here we go.
‫Now it's better.
‫Select the text from here.
‫From.
‫From English to Arabic.
‫And the text we can put like this.
‫We insure from anglers and these are the spinners to Arabic and translate now.
‫And here we go.
‫And one last thing I need to change is the the spinner item.
‫I will make a rap content for the width and I will make the text color to white.
‫And let's run and see our final application.
‫And here we go.
‫You see guys that do and from a select so I select English to Arabic and here we enter the text.
‫Hello, my friends.
‫Let's translate now.
‫And here we go.
‫We have the translated text is here.
‫So this is our application.
‫You can also edit some some attributes of the widgets.
‫You can add more.
‫You can play with it.
‫So here we are, finally making this app works fine.
‫So I will make the text here, the translated text wide, and I will increase its size to like 3026
‫sp.
‫The final run.
‫To.
‫Arabic.
‫Hello, my friends.
‫And translate now.
‫And this is the final text.
‫Thank you, guys.
‫This is our application.
‫We have used the translate kit in the middle of the firebase and we have translated it correctly and
‫uses the translation algorithms and the translation API from the Android.
‫Google and Firebase.
‫So thank you, guys, I hope.
‫See you in.