From the course: Building an Android App with Jetpack Libraries

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Create a custom layout for list rows

Create a custom layout for list rows - Android Tutorial

From the course: Building an Android App with Jetpack Libraries

Start my 1-month free trial

Create a custom layout for list rows

- My next step is to create a custom layout that controls what each List Item will look like. I'll create a new layout file for this named list item dot Xml. I'll right click on the app module and choose new Android Resource File, I'll set the Resource Type to layout and set the name. (Types code) The layout is created automatically with the root element of constraint layout, that's just what I want. Now I'll go back to Design Mode and I'm going to drag in a Floating Action Button. I'll go to the buttons category and drag that in. And then for the icon I'll choose ic underscore add, I'll go to Code View I'll make some changes. I'll set the layout with two or specific size of "72dp" and leave the height as wrap content. Next, I'll add a Layout margin and I'll set that value to adp. And then I'll set a fab size and set it to many. That means it'll be smaller than the kind of Floating Action Button you'd see in the…

Contents