How to manage apps through recycleview activity in app?

Now it’s under remote branches so you want to download it onto your local system so step one start a code and then check out as and then click on ok so the same name uh click on ok and now if you notice that is downloaded on a local system so you are currently in in that starter code branch so let me give you a quick overview of what the starter code contains so um so again if you come to that java so app java package name and then main activity we have dog xv and then add edit activity let me show you what all of these are so the first one is activity underscore main which is basically a list of dots so let me show the layout decorations.

Now it shows this but it’s basically a list of doubts one tip that i if you want to see how it would look in the real app which uh you can do it now is right in xml so be sure to select the text part of the layout so let me go a little slow app res layout actively underscore main.xml double click on it so it should open the xml layout file then find the recyclerview tab be sure you’re in the text pane of this layout not the design not like this but the text pane and then under recyclerview before the self closing tag here type in tools and then that’s the colon and type in your list item and the autocomplete does the equal to and the quotation marks type in here item dog.

So you get to see how the the list will look so next is what is this item dog so that is just one item the layout for this one item so you can go over this layout we have a linear layout right it’s a linear arrangement horizontally and then within this we have a vertical linear arrangement um we have discussed like this kind of layout so this is done already for us three points of interest are there in this layout the image the breed name and the dog name right so in actively underscore meal we mean we have recyclerview which we covered yesterday oh sorry i mean which we covered the session before yesterday and then we have this one thing called floating action button which is the bottom right which is to create a new dog.

So if you click on this button you will get to this screen and what is this screen this screen is at the add edit activity so i’ll show you the layout file so it’s basically a number of these edit text which is actually we use something fancy which is uh which you can go like read over this and ask me questions if needed it’s the latest form of eric techs that are there uh prescribed by material design which we again covered a quick review material design is google’s guidelines for making a beautiful layout so it helps you to like if the name is empty and if you click save you see this you get this red thing for free we do not do this animation so uh you notice now you get this so and then the bleed it goes up.

That’s why we we’re using this text input edit text and text input layout instead of a um just instead of a plain edit text cool so you can go to this at your uh at your time and ask me questions if needed the last activity is activity underscore dog so we went over the first one the list of dogs you click on this this paw this beautiful paw icon it takes you to this activity which you can add a new dog and lastly is if you click on on a particular dog it takes it it takes you to the details page which is this page here it basically has an image dog name dog breed name age likes dislikes and notes so we have this here you can go with the layout again it’s we just use the same views that we usually use um so you can check it out.

Now in our uh java file so our main activity dot edit activity it’s the same thing it there’s list of activities in the main now activity shows the details add edit activity stores the the code for this now we actually have to implement it so now our job actually starts so a quick side note this project is currently set up with um let me show you with oops real-time database so with the database that we have set up here so it’s not set up to your database which we’re going to do soon so for now let’s just create the app with using this sample database and then by the end you can uh implement your database.

Now let’s head over to our code here so find app java package name and then main activity and let’s start doing our to-dos now to save time in case you just want to like have some fun just sit back and just see what’s going on you can actually uncomment these lines of code so the code is already already written for you or else we can just write it down and i’ll explain what each line of code means so if you want to just uncomment it out select it and then controls forward slash and it works so you can uncomment the lines of code out but i will write the code so first things first we want to create that path that i was mentioning this ref reference so it basically talks about i mean the path that this reference this ref points.

Leave a Comment