‫Hello, my friends, and welcome back.
‫In this video, we're going to design the layout for the Add journal activity, and we will write some
‫codes for this journal activity to allow the user to enter and create a new post in Firebase databases.
‫So at first, as I told you, in this lectures and in this app, we are going to use copy paste layouts
‫in order to allow you to focus on the code and learning the firebase.
‫And you can download all of these source codes from the resources folder below.
‫As we can see, this is our layout.
‫It starts with a constraint layout.
‫And by the way, I will use the data binding.
‫So layout.
‫And here I will cut it and paste it at the end of this code.
‫Okay.
‫So again, it's a constraint layout.
‫Its background is this gradient that we've done before.
‫The image view here is the post.
‫So when the user clicks and selects the any picture from the gallery, it will be displayed here.
‫The post title.
‫The ID is post username underscore text view.
‫The second text view is called Post Date Text View.
‫The third widget is an image view here just for allowing the user to click on it to select an image
‫from the gallery.
‫So when the user select an image from the gallery, he needs to he needs to click on this image view
‫and it will be displayed here in this image view that we've talked about it at first.
‫Then we need an edit text here called Post Title ET.
‫This will be used to get the post title.
‫Another text view or edit text here to get the thoughts about the journal.
‫And a progress bar.
‫Its ID is post underscore progress bar in order to show the process of adding the progress that this
‫journal to the firebase.
‫So it will indicate it will indicate the process and the progress of adding new post to Firebase.
‫And the last thing is a button here, the save button, and it will be called and handling the click
‫events on it in order to allow the user to insert the post into Firebase database.
‫So this is the layout for the activity.
‫Underscore add Journal.
‫Now let's move to the Add journal Activity Kotlin class and start adding the codes.